[PATCH 1/2] tests : Fix failure reporting for tests/nwfilterebiptablestest.c

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

 



Tests run with 'make check' generally report their results as :

Expected:
...

Actual:
...

'nwfilterebiptablestest' reports its outcome in opposite sequence, which
is confusing for an end-user.
This changes 'nwfilterebpitablestest' to report results in a consistent
fashion.

Signed-off-by: Prerna Saxena <prerna@xxxxxxxxxxxxxxxxxx>
---
 tests/nwfilterebiptablestest.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/tests/nwfilterebiptablestest.c b/tests/nwfilterebiptablestest.c
index e04bc21..f62e046 100644
--- a/tests/nwfilterebiptablestest.c
+++ b/tests/nwfilterebiptablestest.c
@@ -114,8 +114,8 @@ testNWFilterEBIPTablesAllTeardown(const void *opaque ATTRIBUTE_UNUSED)
     actual = virBufferContentAndReset(&buf);
     virtTestClearCommandPath(actual);
 
-    if (STRNEQ_NULLABLE(actual, expected)) {
-        virtTestDifference(stderr, actual, expected);
+    if (STRNEQ_NULLABLE(expected, actual)) {
+        virtTestDifference(stderr, expected, actual);
         goto cleanup;
     }
 
@@ -185,8 +185,8 @@ testNWFilterEBIPTablesTearOldRules(const void *opaque ATTRIBUTE_UNUSED)
     actual = virBufferContentAndReset(&buf);
     virtTestClearCommandPath(actual);
 
-    if (STRNEQ_NULLABLE(actual, expected)) {
-        virtTestDifference(stderr, actual, expected);
+    if (STRNEQ_NULLABLE(expected, actual)) {
+        virtTestDifference(stderr, expected, actual);
         goto cleanup;
     }
 
@@ -234,8 +234,8 @@ testNWFilterEBIPTablesRemoveBasicRules(const void *opaque ATTRIBUTE_UNUSED)
     actual = virBufferContentAndReset(&buf);
     virtTestClearCommandPath(actual);
 
-    if (STRNEQ_NULLABLE(actual, expected)) {
-        virtTestDifference(stderr, actual, expected);
+    if (STRNEQ_NULLABLE(expected, actual)) {
+        virtTestDifference(stderr, expected, actual);
         goto cleanup;
     }
 
@@ -268,8 +268,8 @@ testNWFilterEBIPTablesTearNewRules(const void *opaque ATTRIBUTE_UNUSED)
     actual = virBufferContentAndReset(&buf);
     virtTestClearCommandPath(actual);
 
-    if (STRNEQ_NULLABLE(actual, expected)) {
-        virtTestDifference(stderr, actual, expected);
+    if (STRNEQ_NULLABLE(expected, actual)) {
+        virtTestDifference(stderr, expected, actual);
         goto cleanup;
     }
 
@@ -340,8 +340,8 @@ testNWFilterEBIPTablesApplyBasicRules(const void *opaque ATTRIBUTE_UNUSED)
     actual = virBufferContentAndReset(&buf);
     virtTestClearCommandPath(actual);
 
-    if (STRNEQ_NULLABLE(actual, expected)) {
-        virtTestDifference(stderr, actual, expected);
+    if (STRNEQ_NULLABLE(expected, actual)) {
+        virtTestDifference(stderr, expected, actual);
         goto cleanup;
     }
 
@@ -430,8 +430,8 @@ testNWFilterEBIPTablesApplyDHCPOnlyRules(const void *opaque ATTRIBUTE_UNUSED)
     actual = virBufferContentAndReset(&buf);
     virtTestClearCommandPath(actual);
 
-    if (STRNEQ_NULLABLE(actual, expected)) {
-        virtTestDifference(stderr, actual, expected);
+    if (STRNEQ_NULLABLE(expected, actual)) {
+        virtTestDifference(stderr, expected, actual);
         goto cleanup;
     }
 
@@ -503,8 +503,8 @@ testNWFilterEBIPTablesApplyDropAllRules(const void *opaque ATTRIBUTE_UNUSED)
     actual = virBufferContentAndReset(&buf);
     virtTestClearCommandPath(actual);
 
-    if (STRNEQ_NULLABLE(actual, expected)) {
-        virtTestDifference(stderr, actual, expected);
+    if (STRNEQ_NULLABLE(expected, actual)) {
+        virtTestDifference(stderr, expected, actual);
         goto cleanup;
     }
 
-- 
1.9.3

-- 
Prerna Saxena

Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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]