]> git.ipfire.org Git - thirdparty/util-linux.git/commit
tests: (lsfd) make DGRAM socketpair to mitigate the change of protoname
authorMasatake YAMATO <yamato@redhat.com>
Sat, 27 Nov 2021 00:39:42 +0000 (09:39 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Sat, 27 Nov 2021 00:52:53 +0000 (09:52 +0900)
commita60ac11fe0087584f37329b4733edfade3452c64
tree76cfeeadba53142e3d47194f6f7b306b9ef0fad1
parent57d9fd2bea629f211bdd30a12cacc759c0b4f93b
tests: (lsfd) make DGRAM socketpair to mitigate the change of protoname

The protoname for a socket can be get from its xattr slot of
/proc/$PID/fd/$FD.

The protoname for (AF_UNIX, SOCK_STREAM) sockets was changed
from "UNIX" to "UNIX-STREAM" in
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=94531cfcbe79c3598acf96806627b2137ca32eb9

As the result, the test case, mkfds-socketpair doesn't work well on a
newer kernel.

To mitigate the impact of the change in the kernel, use (AF_UNIX, SOCK_DGRAM)
for making a socket pair.

In the commit, the protoname of (AF_UNIX, SOCK_DGRAM) sockets was also
changed to "UNIX-DGRAM". However, it was renamed back to "UNIX" in
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0edf0824e0dc359ed76bf96af986e6570ca2c0b9

Partially close #1511.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/ts/lsfd/mkfds-socketpair