[PATCH 21/24] networkxml2firewalltest: Use internal wrapping of command line arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virCommandSetDryRun allows to invoke virCommandToString so that the
command string is already wrapped.

We now also need to load the base arguments file without unwrapping the
arguments.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/networkxml2firewalltest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c
index cfdb549f81..2babaecc7f 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, true, testCommandDryRun, NULL);
+    virCommandSetDryRun(dryRunToken, &buf, true, true, testCommandDryRun, NULL);

     if (!(def = virNetworkDefParseFile(xml, NULL)))
         goto cleanup;
@@ -115,7 +115,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
     if (STRPREFIX(actual, baseargs))
         actual += strlen(baseargs);

-    if (virTestCompareToFile(actual, cmdline) < 0)
+    if (virTestCompareToFileFull(actual, cmdline, false) < 0)
         goto cleanup;

     ret = 0;
@@ -189,7 +189,7 @@ mymain(void)

     basefile = g_strdup_printf("%s/networkxml2firewalldata/base.args", abs_srcdir);

-    if (virTestLoadFile(basefile, &baseargs) < 0)
+    if (virFileReadAll(basefile, INT_MAX, &baseargs) < 0)
         return EXIT_FAILURE;

     DO_TEST("nat-default");
-- 
2.30.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux