[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/27] tests/qtest/qom-test: Stop spamming the test log
From: |
Thomas Huth |
Subject: |
[PULL 02/27] tests/qtest/qom-test: Stop spamming the test log |
Date: |
Tue, 31 Jan 2023 11:11:40 +0100 |
We are still facing the issues that our test logs in the gitlab CI
are too big (and thus cut off). A huge part is still caused by the
qom-test that prints the path and name of each object it looks at
by default. That's too much. Let's be silent by default, and only
print the object path+name when running with V=2 (and the properties
only with V=3 and higher).
Message-Id: <20230118122557.1668860-1-thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/qom-test.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/tests/qtest/qom-test.c b/tests/qtest/qom-test.c
index d380261f8f..d677f87c8e 100644
--- a/tests/qtest/qom-test.c
+++ b/tests/qtest/qom-test.c
@@ -14,7 +14,7 @@
#include "qemu/cutils.h"
#include "libqtest.h"
-static bool verbose;
+static int verbosity_level;
static void test_properties(QTestState *qts, const char *path, bool recurse)
{
@@ -24,7 +24,9 @@ static void test_properties(QTestState *qts, const char
*path, bool recurse)
QListEntry *entry;
GSList *children = NULL, *links = NULL;
- g_test_message("Obtaining properties of %s", path);
+ if (verbosity_level >= 2) {
+ g_test_message("Obtaining properties of %s", path);
+ }
response = qtest_qmp(qts, "{ 'execute': 'qom-list',"
" 'arguments': { 'path': %s } }", path);
g_assert(response);
@@ -51,7 +53,7 @@ static void test_properties(QTestState *qts, const char
*path, bool recurse)
}
} else {
const char *prop = qdict_get_str(tuple, "name");
- if (verbose) {
+ if (verbosity_level >= 3) {
g_test_message("-> %s", prop);
}
tmp = qtest_qmp(qts,
@@ -109,8 +111,8 @@ int main(int argc, char **argv)
{
char *v_env = getenv("V");
- if (v_env && atoi(v_env) >= 2) {
- verbose = true;
+ if (v_env) {
+ verbosity_level = atoi(v_env);
}
g_test_init(&argc, &argv, NULL);
--
2.31.1
- [PULL 00/27] qtest and misc patches, Thomas Huth, 2023/01/31
- [PULL 01/27] tests/qtest: netdev: test stream and dgram backends, Thomas Huth, 2023/01/31
- [PULL 06/27] travis.yml: Use the libfdt from the distro instead of the submodule, Thomas Huth, 2023/01/31
- [PULL 09/27] qemu/bswap: Replace bswapXX() by compiler __builtin_bswap(), Thomas Huth, 2023/01/31
- [PULL 02/27] tests/qtest/qom-test: Stop spamming the test log,
Thomas Huth <=
- [PULL 03/27] tests/qtest/bios-tables-test: Make the test less verbose by default, Thomas Huth, 2023/01/31
- [PULL 05/27] configs/targets/nios2-softmmu: Add TARGET_NEED_FDT=y to the nios2 config, Thomas Huth, 2023/01/31
- [PULL 15/27] MAINTAINERS: Abort HAXM maintenance, Thomas Huth, 2023/01/31
- [PULL 13/27] qemu/bswap: Use compiler __builtin_bswap() on FreeBSD, Thomas Huth, 2023/01/31
- [PULL 17/27] tests/tcg: Do not build/run TCG tests if TCG is disabled, Thomas Huth, 2023/01/31
- [PULL 08/27] tests/docker/dockerfiles: Add libfdt to the i386 and to the riscv64 container, Thomas Huth, 2023/01/31
- [PULL 20/27] tests/qtest/vnc-display-test: Disable on Darwin, Thomas Huth, 2023/01/31
- [PULL 11/27] qemu/bswap: Remove <byteswap.h> dependency, Thomas Huth, 2023/01/31
- [PULL 14/27] qemu/bswap: Use compiler __builtin_bswap() on NetBSD, Thomas Huth, 2023/01/31
- [PULL 10/27] qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap(), Thomas Huth, 2023/01/31