From nobody Tue Nov 4 12:05:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1503942054110762.8457239751037; Mon, 28 Aug 2017 10:40:54 -0700 (PDT) Received: from localhost ([::1]:40829 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmO1q-00040C-Oo for importer@patchew.org; Mon, 28 Aug 2017 13:40:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmO0w-0003Ns-FC for qemu-devel@nongnu.org; Mon, 28 Aug 2017 13:39:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmO0t-0005O7-Bh for qemu-devel@nongnu.org; Mon, 28 Aug 2017 13:39:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48346) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmO0t-0005Nx-5d; Mon, 28 Aug 2017 13:39:51 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DB8C94ACB5; Mon, 28 Aug 2017 17:39:49 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-110.ams2.redhat.com [10.36.116.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id C33E081890; Mon, 28 Aug 2017 17:39:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DB8C94ACB5 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=thuth@redhat.com From: Thomas Huth To: qemu-devel@nongnu.org, Igor Mammedov , "Michael S. Tsirkin" Date: Mon, 28 Aug 2017 19:39:45 +0200 Message-Id: <1503941985-25657-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 28 Aug 2017 17:39:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH for-2.11] tests/bios-tables: Silence some messages with V=1, print them with V=2 only 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: qemu-trivial@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" When running "make check-qtest-x86_64 V=3D1", the output is currently flood= ed with "Looking for expected file ..." and "Using expected file ..." messages. None of the other tests is doing that with V=3D1, so this is a little bit annoying. Let's only print these debug messages when we're running the test with V=3D2 or higher. Signed-off-by: Thomas Huth --- tests/bios-tables-test.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 564da45..289ee45 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -40,6 +40,7 @@ typedef struct { int required_struct_types_len; } test_data; =20 +static bool really_verbose; static char disk[] =3D "tests/acpi-test-disk-XXXXXX"; static const char *data_dir =3D "tests/acpi-test-data"; #ifdef CONFIG_IASL @@ -395,7 +396,7 @@ static GArray *load_expected_aml(test_data *data) try_again: aml_file =3D g_strdup_printf("%s/%s/%.4s%s", data_dir, data->machi= ne, (gchar *)&signature, ext); - if (getenv("V")) { + if (really_verbose) { fprintf(stderr, "\nLooking for expected file '%s'\n", aml_file= ); } if (g_file_test(aml_file, G_FILE_TEST_EXISTS)) { @@ -407,7 +408,7 @@ try_again: goto try_again; } g_assert(exp_sdt.aml_file); - if (getenv("V")) { + if (really_verbose) { fprintf(stderr, "\nUsing expected file '%s'\n", aml_file); } ret =3D g_file_get_contents(aml_file, &exp_sdt.aml, @@ -812,6 +813,11 @@ int main(int argc, char *argv[]) { const char *arch =3D qtest_get_arch(); int ret; + const char *v_env =3D getenv("V"); + + if (v_env && *v_env >=3D '2') { + really_verbose =3D true; + } =20 ret =3D boot_sector_init(disk); if(ret) --=20 1.8.3.1