提交 6c62122e 编写于 作者: R Roman Bolshakov 提交者: Andrea Bolognani

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: NRoman Bolshakov <r.bolshakov@yadro.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 9ce035e4
...@@ -50,7 +50,7 @@ static int testFormat(virSocketAddr *addr, const char *addrstr, bool pass) ...@@ -50,7 +50,7 @@ static int testFormat(virSocketAddr *addr, const char *addrstr, bool pass)
return pass ? -1 : 0; return pass ? -1 : 0;
if (STRNEQ(newaddrstr, addrstr)) { if (STRNEQ(newaddrstr, addrstr)) {
virTestDifference(stderr, newaddrstr, addrstr); virTestDifference(stderr, addrstr, newaddrstr);
VIR_FREE(newaddrstr); VIR_FREE(newaddrstr);
return pass ? -1 : 0; return pass ? -1 : 0;
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册