Commit 0fbf01fe authored by Anthony Liguori's avatar Anthony Liguori

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: default avatarPeter Maydell <>
Signed-off-by: default avatarAnthony Liguori <>
parent cd18720a
......@@ -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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment