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

Martin Kletzander posted 21 patches 7 years, 6 months ago
Only 20 patches received!
[libvirt] [PATCH 01/21] Only output initialized capabilities with VIR_TEST_DEBUG > 1
Posted by Martin Kletzander 7 years, 6 months ago
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@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

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 01/21] Only output initialized capabilities with VIR_TEST_DEBUG > 1
Posted by Pavel Hrdina 7 years, 6 months ago
On Mon, Nov 13, 2017 at 09:50:16AM +0100, Martin Kletzander wrote:
> 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@redhat.com>
> ---
>  tests/testutils.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list