]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
networkxml2firewalltest: Strip path from test output via virCommandSetDryRun
authorPeter Krempa <pkrempa@redhat.com>
Tue, 6 Apr 2021 09:21:21 +0000 (11:21 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 12 Apr 2021 13:55:10 +0000 (15:55 +0200)
Enable the internal path clearing instead of using
virTestClearCommandPath.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
tests/networkxml2firewalltest.c

index 2974d3f2af653cb8e669fd4e25f8c4f334fcb325..16249c49fdaa1651bf8f483d060b6f2e51f53210 100644 (file)
@@ -98,7 +98,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
     char *actual;
     g_autoptr(virCommandDryRunToken) dryRunToken = virCommandDryRunTokenNew();
 
-    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