diff options
-rw-r--r-- | main-loop.c | 3 | ||||
-rw-r--r-- | stubs/Makefile.objs | 1 | ||||
-rw-r--r-- | stubs/qtest.c | 14 |
3 files changed, 17 insertions, 1 deletions
diff --git a/main-loop.c b/main-loop.c index c3c9c28fba..8a854938e7 100644 --- a/main-loop.c +++ b/main-loop.c @@ -25,6 +25,7 @@ #include "qemu-common.h" #include "qemu/timer.h" #include "qemu/sockets.h" // struct in_addr needed for libslirp.h +#include "sysemu/qtest.h" #include "slirp/libslirp.h" #include "qemu/main-loop.h" #include "block/aio.h" @@ -208,7 +209,7 @@ static int os_host_main_loop_wait(int64_t timeout) if (!timeout && (spin_counter > MAX_MAIN_LOOP_SPIN)) { static bool notified; - if (!notified) { + if (!notified && !qtest_enabled()) { fprintf(stderr, "main-loop: WARNING: I/O thread spun for %d iterations\n", MAX_MAIN_LOOP_SPIN); diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index df3aa7a64e..59c5a54239 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -18,6 +18,7 @@ stub-obj-y += mon-print-filename.o stub-obj-y += mon-protocol-event.o stub-obj-y += mon-set-error.o stub-obj-y += pci-drive-hot-add.o +stub-obj-y += qtest.o stub-obj-y += reset.o stub-obj-y += set-fd-handler.o stub-obj-y += slirp.o diff --git a/stubs/qtest.c b/stubs/qtest.c new file mode 100644 index 0000000000..e671ed8e8e --- /dev/null +++ b/stubs/qtest.c @@ -0,0 +1,14 @@ +/* + * qtest stubs + * + * Copyright (c) 2014 Linaro Limited + * Written by Peter Maydell + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu-common.h" + +/* Needed for qtest_allowed() */ +bool qtest_allowed; |