From 0fbf01fe911e84c588be41636570f46f597113d6 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Tue, 26 Mar 2013 10:04:43 -0500 Subject: qtest: use synchronous I/O for char device Peter reported that rtc-test would periodically hang. It turns out this was due to an EAGAIN occurring on qemu_chr_fe_write. Instead of heavily refactoring qtest, just use a synchronous version of the write operation for qemu_chr_fe_write to address this problem. Reported-by: Peter Maydell Signed-off-by: Anthony Liguori --- qtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qtest.c') diff --git a/qtest.c b/qtest.c index 5e0e9ec791..b03b68adb3 100644 --- a/qtest.c +++ b/qtest.c @@ -191,7 +191,7 @@ static void GCC_FMT_ATTR(2, 3) qtest_send(CharDriverState *chr, len = vsnprintf(buffer, sizeof(buffer), fmt, ap); va_end(ap); - qemu_chr_fe_write(chr, (uint8_t *)buffer, len); + qemu_chr_fe_write_all(chr, (uint8_t *)buffer, len); if (qtest_log_fp && qtest_opened) { fprintf(qtest_log_fp, "%s", buffer); } -- cgit v1.2.3