Browse files

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 <>
  • Loading branch information...
Anthony Liguori
Anthony Liguori committed Mar 26, 2013
1 parent cd18720 commit 0fbf01fe911e84c588be41636570f46f597113d6
Showing with 1 addition and 1 deletion.
  1. +1 −1 qtest.c
@@ -191,7 +191,7 @@ static void GCC_FMT_ATTR(2, 3) qtest_send(CharDriverState *chr,
len = vsnprintf(buffer, sizeof(buffer), fmt, 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);

0 comments on commit 0fbf01f

Please sign in to comment.