[libvirt] [PATCH 01/21] Only output initialized capabilities with VIR_TEST_DEBUG > 1

Martin Kletzander mkletzan at redhat.com
Mon Nov 13 08:50:16 UTC 2017


Currenty virTestInit() outputs all capabilities that it created when running
with VIR_TEST_DEBUG=1.  Since this is quite a lot of output for every call of
this function (and it is not needed until debugging a really deep-down issue)
let's just output the info when VIR_TEST_DEBUG is strictly greater than 1.

Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---
 tests/testutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/testutils.c b/tests/testutils.c
index 915cd3b7925b..a991562adffe 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -1208,7 +1208,7 @@ virCapsPtr virTestGenericCapsInit(void)
         goto error;
 
 
-    if (virTestGetDebug()) {
+    if (virTestGetDebug() > 1) {
         char *caps_str;
 
         caps_str = virCapabilitiesFormatXML(caps);
-- 
2.15.0




More information about the libvir-list mailing list