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

Martin Kletzander mkletzan at redhat.com
Tue Nov 25 12:23:46 UTC 2014


On Tue, Nov 25, 2014 at 05:10:04PM +0530, Prerna Saxena wrote:
>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 at linux.vnet.ibm.com>
>---
> 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);

No need to change the condition, but it doesn't hurt and looks better.

ACK, will push in a while.

Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141125/92dc3b1a/attachment-0001.sig>


More information about the libvir-list mailing list