diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-03-10 13:25:00 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2023-03-10 13:25:16 +0000 |
| commit | 1955ad42b3b71a2083bd6d2aec0d9a10dd78eb21 (patch) | |
| tree | e5ee929501e59231963474bc8e6e8f71c6287310 /libexec | |
| parent | 64c2a712d661db9be31f02fe97c3b59710290ae3 (diff) | |
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/tftpd/tests/functional.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c index 8c35daf5cd65..36f22ea33294 100644 --- a/libexec/tftpd/tests/functional.c +++ b/libexec/tftpd/tests/functional.c @@ -319,7 +319,13 @@ setup(struct sockaddr_storage *to, uint16_t idx) ATF_REQUIRE_EQ(getcwd(pwd, sizeof(pwd)), pwd); /* Must bind(2) pre-fork so it happens before the client's send(2) */ - ATF_REQUIRE((server_s = socket(protocol, SOCK_DGRAM, 0)) > 0); + server_s = socket(protocol, SOCK_DGRAM, 0); + if (server_s < 0 && errno == EAFNOSUPPORT) { + atf_tc_skip("This test requires IPv%d support", + protocol == PF_INET ? 4 : 6); + } + ATF_REQUIRE_MSG(server_s >= 0, + "socket failed with error %s", strerror(errno)); ATF_REQUIRE_EQ_MSG(bind(server_s, server_addr, len), 0, "bind failed with error %s", strerror(errno)); |
