diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-12-20 19:38:07 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-12-20 19:38:07 +0000 |
commit | f0c143b3565abdc53ee387429473d2df7c7716f7 (patch) | |
tree | 90c73c4672256542e7ad36899070c6454911ca44 /tests | |
parent | 177034c44ed18d99e6cc85dfddd2bb04b41d38ac (diff) | |
download | src-f0c143b3565abdc53ee387429473d2df7c7716f7.tar.gz src-f0c143b3565abdc53ee387429473d2df7c7716f7.zip |
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sys/kern/ktls_test.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/sys/kern/ktls_test.c b/tests/sys/kern/ktls_test.c index 9488ac24f4cc..85998fcbdf80 100644 --- a/tests/sys/kern/ktls_test.c +++ b/tests/sys/kern/ktls_test.c @@ -1893,7 +1893,13 @@ test_ktls_receive_bad_size(const atf_tc_t *tc, struct tls_enable *en, rv = write(sockets[1], outbuf, outbuf_len); ATF_REQUIRE_INTEQ((ssize_t)outbuf_len, rv); - ATF_REQUIRE(shutdown(sockets[1], SHUT_WR) == 0); + /* + * The other end may notice the error and drop the connection + * before this executes resulting in shutdown() failing with + * ENOTCONN. Ignore this error if it occurs. + */ + if (shutdown(sockets[1], SHUT_WR) != 0) + ATF_REQUIRE_ERRNO(ENOTCONN, true); ktls_receive_tls_error(sockets[0], EMSGSIZE); |