]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tests/unix_seqpacket: provide function that returns bound & listening sock
authorGleb Smirnoff <glebius@FreeBSD.org>
Wed, 28 Feb 2024 22:32:46 +0000 (14:32 -0800)
committerGleb Smirnoff <glebius@FreeBSD.org>
Wed, 28 Feb 2024 22:32:46 +0000 (14:32 -0800)
commit1f46c32c1f3d0ea2a4c748a24aad06329cfb5f5a
tree62e6eb81f3dd93c4f70cdfd164805af7a7035ba6
parentd6ef9649dd924f12974d66a0c29a4ede71407e7d
tests/unix_seqpacket: provide function that returns bound & listening sock

Use the function in mk_pair_of_sockets(), and in four existing tests -
'listen_bound', 'connect', 'shutdown_send' and 'shutdown_send_sigpipe'.
While here make mk_pair_of_sockets() return pointer to sockaddr_un instead
of path.  This also fixes bug of returning pointer to stack memory of
returning function.  However, the only caller that cares about this return
is temporarily ifdefed out.  No functional change intended.

Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D43852
tests/sys/kern/unix_seqpacket_test.c