tests: Fix message for IP parse/format failures

Confusing message is printed when a parse/format sockettest fails. E.g.
there's a test that parses/formats ::ffff and the format fails like that:
  38) Test format ::ffff family AF_UNSPEC ...
  Offset 2
  Expect [0.0.255.255]
  Actual [ffff]

It should be instead:
  38) Test format ::ffff family AF_UNSPEC ...
  Offset 2
  Expect [ffff]
  Actual [0.0.255.255]

Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Roman Bolshakov 2019-08-08 13:37:46 +03:00 committed by Andrea Bolognani
parent 9ce035e404
commit 6c62122e06

View File

@ -50,7 +50,7 @@ static int testFormat(virSocketAddr *addr, const char *addrstr, bool pass)
return pass ? -1 : 0;
if (STRNEQ(newaddrstr, addrstr)) {
virTestDifference(stderr, newaddrstr, addrstr);
virTestDifference(stderr, addrstr, newaddrstr);
VIR_FREE(newaddrstr);
return pass ? -1 : 0;
} else {