mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 19:18:23 +00:00
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>
This commit is contained in:
2
qtest.c
2
qtest.c
@@ -191,7 +191,7 @@ static void GCC_FMT_ATTR(2, 3) qtest_send(CharDriverState *chr,
|
|||||||
len = vsnprintf(buffer, sizeof(buffer), fmt, ap);
|
len = vsnprintf(buffer, sizeof(buffer), fmt, ap);
|
||||||
va_end(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) {
|
if (qtest_log_fp && qtest_opened) {
|
||||||
fprintf(qtest_log_fp, "%s", buffer);
|
fprintf(qtest_log_fp, "%s", buffer);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user