]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
netbsd-tests: Fix the libc stat_socket test
authorMark Johnston <markj@FreeBSD.org>
Fri, 14 Jan 2022 20:00:01 +0000 (15:00 -0500)
committerMark Johnston <markj@FreeBSD.org>
Fri, 21 Jan 2022 00:52:36 +0000 (19:52 -0500)
commit812345b1d469e5bb90f5487fef1e4ab16890cc7a
treeaee94676d3183c97478f0db943ea55e8ba175fdc
parent2077f85a63f2855fd0e1658d3655b60302db6ebd
netbsd-tests: Fix the libc stat_socket test

The test tries to connect a socket to a closed port at 127.0.0.1.  It
sets O_NONBLOCK on the socket first and expects to get EINPROGRESS from
connect(2), but this is not guaranteed, ECONNREFUSED is possible.
Handle both cases, and re-enable the test.

PR: 240621
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 95c75073d3d1ca9dcae41784453172f199bb2c0f)
contrib/netbsd-tests/lib/libc/sys/t_stat.c