main-loop: suppress warnings under qtest
PATCH 1/1 main-loop: suppress warnings under qtest
commit 01c22f2cdd4fcf02276ea10f48253850a5fd7259 ("main-loop: Suppress "I/O thread spun" warnings for qtest") doesn't actually disable the warning for everyone since some tests don't run under the qtest accelerator.
Check qtest_driver instead.
Cc Peter Maydell <[email protected]>
Signed-off-by Michael S. Tsirkin <[email protected]>
--- main-loop.c | 2 +- stubs/qtest.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)
main-loop.c +1 -1
@@ -230,7 +230,7 @@ static int os_host_main_loop_wait(int64_t timeout)if (!timeout && (spin_counter >MAX_MAIN_LOOP_SPIN )) {static bool notified; -if (!notified && !qtest_enabled ()) { +if (!notified && !qtest_driver ()) {fprintf (stderr,"main-loop: WARNING: I/O thread spun for %d iterations\n" ,MAX_MAIN_LOOP_SPIN );
stubs/qtest.c +5 -0
@@ -12,3 +12,8 @@/* Needed for qtest_allowed() */ bool qtest_allowed; + +bool qtest_driver (void ) +{ +return false; +}
Signature · 1 line
MST
Paolo Bonzini
AppliedQuoted 33 lines · Michael S. Tsirkin
commit
01c22f2cdd4fcf02276ea10f48253850a5fd7259("main-loop: Suppress "I/O thread spun" warnings for qtest") doesn't actually disable the warning for everyone since some tests don't run under the qtest accelerator.Check
qtest_driverinstead.Cc Peter Maydell <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- main-loop.c | 2 +- stubs/qtest.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)main-loop.c +1
-1@@ -230,7 +230,7 @@ static int os_host_main_loop_wait(int64_t timeout)if (!timeout && (spin_counter >MAX_MAIN_LOOP_SPIN )) {static bool notified; -if (!notified && !qtest_enabled ()) { +if (!notified && !qtest_driver ()) {fprintf (stderr,"main-loop: WARNING: I/O thread spun for %d iterations\n" ,MAX_MAIN_LOOP_SPIN );stubs/qtest.c +0
-0
stubs/qtest.c line 19
Quoted 8 lines
stubs/qtest.c +5
-0@@ -12,3 +12,8 @@/* Needed for qtest_allowed() */ bool qtest_allowed; + +bool qtest_driver (void ) +{ +return false; +}
Queued for 2.5, thanks. Will send pull request tomorrow morning.
Paolo