* [PATCH] tests/qtest/qom-test: Stop spamming the test log
@ 2023-01-18 12:25 Thomas Huth
2023-01-18 12:31 ` Daniel P. Berrangé
2023-01-18 14:42 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Huth @ 2023-01-18 12:25 UTC (permalink / raw)
To: qemu-devel
Cc: Daniel P . Berrangé, Peter Maydell, Paolo Bonzini,
Eduardo Habkost, Thomas Huth
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).
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tests/qtest/qom-test: Stop spamming the test log
2023-01-18 12:25 [PATCH] tests/qtest/qom-test: Stop spamming the test log Thomas Huth
@ 2023-01-18 12:31 ` Daniel P. Berrangé
2023-01-18 14:42 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Daniel P. Berrangé @ 2023-01-18 12:31 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel, Peter Maydell, Paolo Bonzini, Eduardo Habkost
On Wed, Jan 18, 2023 at 01:25:57PM +0100, Thomas Huth wrote:
> 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).
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> tests/qtest/qom-test.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tests/qtest/qom-test: Stop spamming the test log
2023-01-18 12:25 [PATCH] tests/qtest/qom-test: Stop spamming the test log Thomas Huth
2023-01-18 12:31 ` Daniel P. Berrangé
@ 2023-01-18 14:42 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-01-18 14:42 UTC (permalink / raw)
To: Thomas Huth, qemu-devel
Cc: Daniel P . Berrangé, Peter Maydell, Paolo Bonzini,
Eduardo Habkost
On 18/1/23 13:25, Thomas Huth wrote:
> 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).
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> tests/qtest/qom-test.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-18 14:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18 12:25 [PATCH] tests/qtest/qom-test: Stop spamming the test log Thomas Huth
2023-01-18 12:31 ` Daniel P. Berrangé
2023-01-18 14:42 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).