From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a498M-0003u2-Ft for qemu-devel@nongnu.org; Wed, 02 Dec 2015 10:15:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a498L-0007jR-He for qemu-devel@nongnu.org; Wed, 02 Dec 2015 10:15:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a498L-0007jH-CQ for qemu-devel@nongnu.org; Wed, 02 Dec 2015 10:15:53 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id EF5B4C6585 for ; Wed, 2 Dec 2015 15:15:52 +0000 (UTC) From: Paolo Bonzini Date: Wed, 2 Dec 2015 16:15:39 +0100 Message-Id: <1449069340-10419-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1449069340-10419-1-git-send-email-pbonzini@redhat.com> References: <1449069340-10419-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 3/4] main-loop: suppress warnings under qtest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" From: "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_driver instead. Cc: Peter Maydell Signed-off-by: Michael S. Tsirkin Message-Id: <1448882964-22433-1-git-send-email-mst@redhat.com> Signed-off-by: Paolo Bonzini --- main-loop.c | 2 +- stubs/qtest.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/main-loop.c b/main-loop.c index df28670..5877615 100644 --- a/main-loop.c +++ b/main-loop.c @@ -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); diff --git a/stubs/qtest.c b/stubs/qtest.c index dc17594..4dfde61 100644 --- a/stubs/qtest.c +++ b/stubs/qtest.c @@ -12,3 +12,8 @@ /* Needed for qtest_allowed() */ bool qtest_allowed; + +bool qtest_driver(void) +{ + return false; +} -- 2.5.0