From 6c62122e0615172068a6286428740024f8084264 Mon Sep 17 00:00:00 2001 From: Roman Bolshakov Date: Thu, 8 Aug 2019 13:37:46 +0300 Subject: [PATCH] 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 Reviewed-by: Andrea Bolognani --- tests/sockettest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sockettest.c b/tests/sockettest.c index 0c6c79f2a9..859f02e51e 100644 --- a/tests/sockettest.c +++ b/tests/sockettest.c @@ -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 {