aboutsummaryrefslogtreecommitdiff
path: root/qtest.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-03-26 10:04:43 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-26 10:08:12 -0500
commit0fbf01fe911e84c588be41636570f46f597113d6 (patch)
tree2a62ae0222bc875596a9fcee39bfa39e368e2b65 /qtest.c
parentcd18720a294bd7244ffda719677dd9c737317b67 (diff)
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 <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qtest.c')
-rw-r--r--qtest.c2
1 files changed, 1 insertions, 1 deletions
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);
}