[PATCH v2 06/25] tests: storagepoolxml2argvtest: Use integrated command path stripping

Peter Krempa pkrempa at redhat.com
Fri Apr 9 12:50:08 UTC 2021


Replace virTestClearCommandPath by virCommandToStringFull which allows
to strip the command prefix internally.

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

diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c
index 967d1f21a8..0279437f63 100644
--- a/tests/storagepoolxml2argvtest.c
+++ b/tests/storagepoolxml2argvtest.c
@@ -74,12 +74,11 @@ testCompareXMLToArgvFiles(bool shouldFail,
         goto cleanup;
     };

-    if (!(actualCmdline = virCommandToString(cmd, false))) {
+    if (!(actualCmdline = virCommandToStringFull(cmd, false, true))) {
         VIR_TEST_DEBUG("pool type '%s' failed to get commandline", defTypeStr);
         goto cleanup;
     }

-    virTestClearCommandPath(actualCmdline);
     if (virTestCompareToFile(actualCmdline, cmdline) < 0)
         goto cleanup;

-- 
2.30.2




More information about the libvir-list mailing list