networkxml2firewalltest: Strip path from test output via virCommandSetDryRun

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>
This commit is contained in:
Peter Krempa 2021-04-06 11:21:21 +02:00
parent 01c357a4c9
commit 76af07c278

View 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