From nobody Tue Dec 20 19:38:56 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Nc6MN5DFVz1Gmxv; Tue, 20 Dec 2022 19:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nc6MN4NS6z48KV; Tue, 20 Dec 2022 19:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671565136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCYlv1r0zPL95j7/RHTHMg9t7g06pPYNOq6Q5xrxHEY=; b=cgaC2NMI5lhTXeF028RuSz6PRqaedP27afTkXXCQvo4E/MnNV5tfwe9/10Ni0z4+YCooSW mI0jAbB2kapUObPxL7OHhV+olYcBKWx415DQGr+gDQL1Ch36RZtOUKpagvcawvdG9qcn9Y l5xz+2nbUZEwE6s61VTm+bGDytbKNzh4bbqayWp55Xebx9THsCBSHtAP06oswWvDBRlGiu 0G3n6FkIKfDGzVA9jHvPwOcZfINPaWnBfbm6GbSyCca71e6Ue9thQFwJoV6qxNih/Km6NX X2uYOzuYrqVYHh2ZG21UCwEhC1Klcx0lY3BnE9YepoS38VlREUYUJAPLjnV08g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671565136; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rCYlv1r0zPL95j7/RHTHMg9t7g06pPYNOq6Q5xrxHEY=; b=QtUfaHjvK6a2KeXintr3qabdlZFrRyjyYF1ROPED10lmtTh06fvN+YJwpJ8PUdDX4B6g9s HUgQlUL7k7D4VkE/2wGbagFE58U8ItZXnQLjP+81NHA/maofNjiULAzwCZbLdDJrIQUTl5 UDydKctHzixsx9J7+RRNsURycL7akRdMrRnhYVIIzLs/39cPEWh3JoX+zxp+VjHB8dHgAE WaYXfatCz60uPlhM3ciNYLerHM5s1cXPJx4l92s4Ec+bQqFSMkl1w0JXhrOvO/3nfpd7IE pLaDKI9qWn5gomdOZLbJsQtCQdzdYrHCUzEZTvbGFSPOHCUyP15D91b09GDC7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671565136; a=rsa-sha256; cv=none; b=nlcDtmsf3i5yS/dPCbr9DHcYQhG1LPMiUNmUismysn1R/oe3OeBuSSxAGE4nm0NyUNImD4 kjVWwVx9cjLDY4cRTchoNIel+SjhreRFo+TTezh3cvxs/bxa4H+oLSgyZXdyPTk9mhhGf2 uRuhKgpDqeMH5JUkIDbQxFYW1O7L8T4Xx8A8YK4Nm7l/qVEylsajkB4RlpFWtR/QHiqpwm TAsvGP0wo6CK2Wa6bOH92c0HaLVl66bToQY4IuhC8zae8yVSwuIIJC8UuWutqS2oyZ0gSn Q7h5OdoPAw1VyQ9v82QuWfwY2+jLaSSb1fZQ7tSluV9yAuE32mwHoYuX8UFp8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Nc6MN3S9fznF0; Tue, 20 Dec 2022 19:38:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BKJcuxI094458; Tue, 20 Dec 2022 19:38:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BKJcuTh094457; Tue, 20 Dec 2022 19:38:56 GMT (envelope-from git) Date: Tue, 20 Dec 2022 19:38:56 GMT Message-Id: <202212201938.2BKJcuTh094457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f0c143b3565a - main - ktls_tests: Ignore spurious errors from shutdown(2). List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0c143b3565abdc53ee387429473d2df7c7716f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f0c143b3565abdc53ee387429473d2df7c7716f7 commit f0c143b3565abdc53ee387429473d2df7c7716f7 Author: John Baldwin AuthorDate: 2022-12-20 19:38:07 +0000 Commit: John Baldwin CommitDate: 2022-12-20 19:38:07 +0000 ktls_tests: Ignore spurious errors from shutdown(2). For some of the "bad size" tests, the remote end can notice the error and drop the connection before the test program returns from write to call shutdown. In that case, shutdown fails with ENOTCONN. Permit these ENOTCONN errors without failing the test. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D37693 --- tests/sys/kern/ktls_test.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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);