[libvirt] [PATCH] tests: Use fixedcontent variable

Martin Kletzander mkletzan at redhat.com
Thu Sep 15 09:25:45 UTC 2016


Commit ca32929908bbc94116493ad8915e7cd7ae0f57d5 added function
virTestCompareToFile(), but forgot to use a fixedcontent value for the
actual comparison.  That lead to VIR_TEST_DEBUG=1 showing (for some
tests) all the actual output from the first error to the end of the
string due to the difference being an endline in the end.

Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---
Pushed as 'trivial'.

 tests/testutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/testutils.c b/tests/testutils.c
index 8ea6ab82ad5a..f87628edee68 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -709,7 +709,7 @@ virTestCompareToFile(const char *strcontent,
                         filecontent)) {
         virTestDifferenceFull(stderr,
                               filecontent, filename,
-                              strcontent, NULL);
+                              fixedcontent, NULL);
         goto failure;
     }

--
2.10.0




More information about the libvir-list mailing list