[PATCH 09/24] networkxml2firewalltest: Strip path from test output via virCommandSetDryRun

Peter Krempa pkrempa at redhat.com
Wed Apr 7 15:09:32 UTC 2021


Enable the internal path clearing instead of using
virTestClearCommandPath.

Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 tests/networkxml2firewalltest.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c
index 2e4ff59fa6..cfdb549f81 100644
--- a/tests/networkxml2firewalltest.c
+++ b/tests/networkxml2firewalltest.c
@@ -98,7 +98,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
     char *actual;
     VIR_COMMAND_DRY_RUN_TOKEN;

-    virCommandSetDryRun(dryRunToken, &buf, false, false, testCommandDryRun, NULL);
+    virCommandSetDryRun(dryRunToken, &buf, false, true, testCommandDryRun, NULL);

     if (!(def = virNetworkDefParseFile(xml, NULL)))
         goto cleanup;
@@ -107,7 +107,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
         goto cleanup;

     actual = actualargv = virBufferContentAndReset(&buf);
-    virTestClearCommandPath(actualargv);

     /* The first network to be created populates the
      * libvirt global chains. We must skip args for
-- 
2.30.2




More information about the libvir-list mailing list