From patchwork Mon Oct 17 18:09:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 683268 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3syRTT35sQz9s2G for ; Tue, 18 Oct 2016 05:25:33 +1100 (AEDT) Received: from localhost ([::1]:34965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwCbJ-0004qO-TG for incoming@patchwork.ozlabs.org; Mon, 17 Oct 2016 14:25:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwCM7-0007nH-7r for qemu-devel@nongnu.org; Mon, 17 Oct 2016 14:09:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwCM3-0007RF-Ub for qemu-devel@nongnu.org; Mon, 17 Oct 2016 14:09:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52626) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwCM3-0007R9-Po for qemu-devel@nongnu.org; Mon, 17 Oct 2016 14:09:43 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1868DC067C09 for ; Mon, 17 Oct 2016 18:09:43 +0000 (UTC) Received: from localhost (ovpn-116-162.phx2.redhat.com [10.3.116.162]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9HI9fx0030895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 17 Oct 2016 14:09:42 -0400 From: Max Reitz To: qemu-devel@nongnu.org Date: Mon, 17 Oct 2016 20:09:39 +0200 Message-Id: <20161017180939.27912-1-mreitz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Mon, 17 Oct 2016 18:09:43 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] main-loop: Suppress I/O thread warning under qtest X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , "Michael S . Tsirkin" , Max Reitz Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We do not want to display the "I/O thread spun" warning for test cases that run under qtest. The first attempt for this (commit 01c22f2cdd4fcf02276ea10f48253850a5fd7259) tested whether qtest_enabled() was true. Commit 21a24302e85024dd7b2a151158adbc1f5dc5c4dd correctly recognized that just testing qtest_enabled() is not sufficient since there are some tests that do not use the qtest accelerator but just the qtest character device, and thus replaced qtest_enabled() by qtest_driver(). However, there are also some tests that only use the qtest accelerator and not the qtest chardev; perhaps most notably the bash iotests. Therefore, we have to check both qtest_enabled() and qtest_driver(). Signed-off-by: Max Reitz --- main-loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-loop.c b/main-loop.c index 6a7f8d3..889b5bf 100644 --- a/main-loop.c +++ b/main-loop.c @@ -232,7 +232,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_driver()) { + if (!notified && !qtest_enabled() && !qtest_driver()) { fprintf(stderr, "main-loop: WARNING: I/O thread spun for %d iterations\n", MAX_MAIN_LOOP_SPIN);