]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virshtest: Drop support for testing against hardcoded strings
authorPeter Krempa <pkrempa@redhat.com>
Fri, 22 Mar 2024 14:10:15 +0000 (15:10 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 2 Apr 2024 12:24:30 +0000 (14:24 +0200)
Now that all tests were converted, this is no longer needed.

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

index 02bfb363c44e41b72cd79f3a808c57dfac440452..926f919d8dc14fa2a8216b02915514e855099e06 100644 (file)
@@ -36,7 +36,6 @@ static void testFilterLine(char *buffer,
 
 static int
 testCompareOutputLit(const char *expectFile,
-                     const char *expectData,
                      const char *filter,
                      const char *const argv[])
 {
@@ -64,15 +63,8 @@ testCompareOutputLit(const char *expectFile,
     if (filter)
         testFilterLine(actual, filter);
 
-    if (expectData) {
-        if (virTestCompareToString(expectData, actual) < 0)
-            return -1;
-    }
-
-    if (expectFile) {
-        if (virTestCompareToFileFull(actual, expectFile, false) < 0)
-            return -1;
-    }
+    if (virTestCompareToFileFull(actual, expectFile, false) < 0)
+        return -1;
 
     return 0;
 }
@@ -103,7 +95,7 @@ static int testCompare(const void *data)
                                   abs_srcdir, info->testname);
     }
 
-    return testCompareOutputLit(outfile, NULL, info->filter, info->argv);
+    return testCompareOutputLit(outfile, info->filter, info->argv);
 }