]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-socket-util: fix test for address parsing w/o IPv6 support 18828/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 1 Mar 2021 10:25:45 +0000 (11:25 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 1 Mar 2021 10:27:03 +0000 (11:27 +0100)
commitbfc2274db7357b05061801471b62b1a052c47a90
treec00fad09a752134a853acdb878b0c6a5188e7a1a
parent5ada98cdc7e7966bb2912d8a21d3e95176da671f
test-socket-util: fix test for address parsing w/o IPv6 support

sockaddr_pretty() is the function that is ultimately called to print
the address, and afaics, it'll always use 0.0.0.0 if family==AF_INET.
So the test must have always been broken on systems with IPv6 support.

Fixes a failure in semaphore debian autopkgtest ci:
"65535" → ✓ 0 → "0.0.0.0:65535" (expect 0 / "[::]:65535") 15:15
Assertion 'streq(out, expected ?: in)' failed at src/test/test-socket-netlink.c:32, function test_socket_address_parse_one(). Aborting. 15:15
src/test/test-socket-netlink.c