From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F84CC433DB for ; Mon, 15 Feb 2021 13:34:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8195060200 for ; Mon, 15 Feb 2021 13:34:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8195060200 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lBe1f-0004b6-L2 for qemu-devel@archiver.kernel.org; Mon, 15 Feb 2021 08:34:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lBdjz-0005bS-7n for qemu-devel@nongnu.org; Mon, 15 Feb 2021 08:16:39 -0500 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]:41553) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lBdjx-0005Xf-NN for qemu-devel@nongnu.org; Mon, 15 Feb 2021 08:16:38 -0500 Received: by mail-ed1-x531.google.com with SMTP id v9so3592594edw.8 for ; Mon, 15 Feb 2021 05:16:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=v8B7dQMP2+1i46OpqrqPq2fC3acQ71+O471l3ttFlJY=; b=hiTUKrZrGkPhopODUfpsPxZwxzIIeEMvBIEXLUyM79v64KFVbsNnJ1orwwH8RticO4 qZrgC8f/Pl8+YGSDCNI6wF0DdFbSVNSCyEIP6POPsB7gYFFc3CmWIZYV96F/ydXjC8A9 2sQuZpj6W/6wlkJov86tzH3h5MBE2EK39NKd9wBTQaT+MP8dQi0AFgoTCt5IlWekPitj ng+tVLnC1yybhnibUB/zDW4w71CNCALa1GvhqLbdbb3A/Tr6XPw1PZkeSOWm9ADZLA3e 7QHCrboy2g5vShKam0c9WAoBlRZt+VKRH49XdUdqraSoCS072+hwxpvHrSG5AvRZxV8z rzrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=v8B7dQMP2+1i46OpqrqPq2fC3acQ71+O471l3ttFlJY=; b=ewcVN4zrSZdpaIjaj/MwckWy9qg3vAeHabD8TS4oH7qnw7EbYnyfLI8AAYl0AoyeRZ GjX03UHraloyMFPNLuQ+Ci4XghmLwBfAW5gv34yOqiXfhyHv7CrPnp22OVfTdk3bwrK2 t0C6Sp3JezNm6uWNXOfq9kPgPOmQpaClQWeTB55jDJfcOJO+nV32vjFauilyLFYxEyUF saow/P81Akkxw2kAwWw0upYoyv4vXv7uCnwvGWVp6G5cwkrPdS/9JiGbOtOPP5oMS3ER jaM4qQDdDIbXXXDI8VFgBzIWjpoOAfcpcjoQBITfIF/frWu3hsnm9E6+825AZWUSQS1b 80CQ== X-Gm-Message-State: AOAM53129HZf8biK9N1kR6u5gJK76+N4j7rYDCsjzAHjJ9zb/YtCBuzg dqnL8t1FsuuSRn9NzEXVO6eHEMfSqZ4= X-Google-Smtp-Source: ABdhPJzozOxVWZXlcERSiL/085JHb5KtJ2mcv8l0R3+wH0sFuN4c9PeHKe3C882e/FpqShMRKB3xrw== X-Received: by 2002:a05:6402:216:: with SMTP id t22mr13687550edv.168.1613394996463; Mon, 15 Feb 2021 05:16:36 -0800 (PST) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id o4sm9950184edw.78.2021.02.15.05.16.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Feb 2021 05:16:36 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 12/19] tests/qtest/qos-test: dump environment variables if verbose Date: Mon, 15 Feb 2021 14:16:19 +0100 Message-Id: <20210215131626.65640-13-pbonzini@redhat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210215131626.65640-1-pbonzini@redhat.com> References: <20210215131626.65640-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x531.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christian Schoenebeck Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: qemu_oss--- via If qtests are run in verbose mode (i.e. if --verbose CL argument was provided) then print all environment variables to stdout before running the individual tests. It is common nowadays, at least being able to output all config vectors in a build chain, especially if it is required to investigate build- and test-issues on foreign/remote machines, which includes environment variables. In the context of writing new test cases this is also useful for finding out whether there are already some existing options for common questions like is there a preferred location for writing test files to? Is there a maximum size for test data? Is there a deadline for running tests? Use qos_printf() instead of g_test_message() to avoid the latter cluttering the output. Signed-off-by: Christian Schoenebeck Message-Id: <21d77b33c578d80b5bba1068e61fd3562958b3c2.1611704181.git.qemu_oss@crudebyte.com> Signed-off-by: Paolo Bonzini --- tests/qtest/qos-test.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/qtest/qos-test.c b/tests/qtest/qos-test.c index d98ef78613..b279b6f816 100644 --- a/tests/qtest/qos-test.c +++ b/tests/qtest/qos-test.c @@ -313,9 +313,16 @@ static void walk_path(QOSGraphNode *orig_path, int len) * machine/drivers/test objects * - Cleans up everything */ -int main(int argc, char **argv) +int main(int argc, char **argv, char** envp) { g_test_init(&argc, &argv, NULL); + if (g_test_verbose()) { + qos_printf("ENVIRONMENT VARIABLES: {\n"); + for (char **env = envp; *env != 0; env++) { + qos_printf("\t%s\n", *env); + } + qos_printf("}\n"); + } qos_graph_init(); module_call_init(MODULE_INIT_QOM); module_call_init(MODULE_INIT_LIBQOS); -- 2.29.2