Commit Graph

5 Commits

Author SHA1 Message Date
eca8b5b26a Print both values of changing address length in sockname family syscalls
* net.c (decode_sockname): Print both user and kernel address lengths
when the value changes.
* tests/net-y-unix.c (main): Update expected output.
* tests/net-yy-unix.c (main): Likewise.
* tests/net.expected: Likewise.
2016-07-12 10:54:25 +00:00
f52753aad5 net.c: skip details of too short socket addresses
* net.c (print_sockaddr): Print socket address details only when
the address size is greater than sizeof(struct sockaddr.sa_family).
(print_sockaddr_data_un): Remove handling of addrlen == 2.
* tests/net-y-unix.c (main): Update expected pattern.
* tests/net-yy-unix.c (main): Likewise.
* tests/net.expected: Likewise.
2016-06-23 01:10:17 +00:00
e139cbe969 Consistently use AF_UNIX over AF_LOCAL
As these constants have the same value 1, let's use and print only one
of them, e.g. AF_UNIX.

* xlat/addrfams.in (AF_LOCAL): Remove.
* tests/net-accept-connect.c (main): Replace AF_LOCAL with AF_UNIX.
* tests/net-y-unix.c: Likewise.
* tests/net-yy-unix.c: Likewise.
* tests/netlink_unix_diag.c: Likewise.
2016-06-20 22:52:49 +00:00
71fe62e6b7 Replace PF_* constants with AF_*
AF_* constants appear to be more standardized, and in practice there's
always a one to one relationship between AF_* and PF_*, so let's
use AF_* instead of PF_*.

* xlat/domains.in: Remove.
* net.c: Do not define PF_UNSPEC.  Stop including "xlat/domains.h".
Replace PF_* with AF_*.  Replace domains with addrfams.
* tests/inet-cmsg.c: Replace PF_INET with AF_INET.
* tests/net-yy-inet.c: Likewise.
* tests/netlink_inet_diag.c: Likewise.
* tests/net-accept-connect.c: Replace PF_LOCAL with AF_LOCAL.
* tests/net-y-unix.c: Likewise.
* tests/net-yy-unix.c: Likewise.
* tests/netlink_unix_diag.c: Likewise.
* tests/net.expected: Replace PF_ with AF_.
2016-04-04 01:35:28 +00:00
751fcb8f8a tests: replace net-fd.test with net-y-unix.test
Unlike the former test that was based on match_grep,
the new one uses match_diff and does more rigorous testing.

* tests/net-y-unix.c: New file.
* tests/net-y-unix.test: New test.
* tests/net-fd.test: Remove.
* tests/net-fd.expected: Remove.
* tests/.gitignore: Add net-y-unix.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(TESTS): Replace net-fd.test with net-y-unix.test.
(net-fd.log): Remove.
(EXTRA_DIST): Remove net-fd.expected.
2016-02-03 16:09:34 +00:00