From nobody Thu Nov 12 23:59:50 2026 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 4jQcng14qnz6xq9V for ; Thu, 12 Nov 2026 23:59:51 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jQcnf67Ygz4XYJ for ; Thu, 12 Nov 2026 23:59:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794527990; 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=yd+cIydEZiHe8NXDf3KSRgr/PusOu9kH0SRr3aco5b4=; b=MsiRi3S2LQ2ZBAthNm57w2RkWXuCUc+BUDBlOmD/ml8PATtiFANWObZWSDT6ml8wEpoNQl 20RGUE9lX66OLhn4cKspRCszBUNWPvyrcXZsmFRzu7+urodOhr7TT2C1ML/3Lm5Sb8Ukud ws6b6jdfoIwe2TV3uTz9iaYqlHnEApM0sT75rGyhtCuglrfM9FzOQdDVaqtuMLVT95UunO nQmRdAkqzT32jG9fkPD9UNN7KwKyFW5Jxjogk6nwE7h8kIG/E0FjxpUGvsghnkY04u1Dgp gObFTaoumlUU3IM35uPaY3NBarawZ8sYlgs7S5vojx4aRgbGOLNxKdese3lnVg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794527990; b=Fk/NlIdg/e5PMSUiVl8/VFNy74KfMuXqObJ+NWvAPNmGlm/GjYxnkP/ZUE9ags/zMg4cMM CIxKF/sJkDqEAZvtFnMCor878EruCSVl/L+elZ7h9zwymRb5/D4ER1xQ3cKM5u5/ew5uuT iu7/LA8kFlnK2lWHB0nQBcrDQF6rNKZT68H4BoBYjXr28adSKcCTX1bG7A+gvZxitXeYjn qL7spCSB+2t9DNOdnXodj855Wp2XtOn0kVZAyJy+lmoS5mZPN/6ihad+UTn/GjzAEwIGRK UlkfAP55UDw3IS5qnkrCVIeWZZW3bxUTSwYJpu+yrpjzS3GgV7rNaMt2BRZy/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794527990; 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=yd+cIydEZiHe8NXDf3KSRgr/PusOu9kH0SRr3aco5b4=; b=qlI7oEaWV7/VcKL9fllRkOlpVh4OB+rCzoPI4jfuLlstnLDJ4AdA6P6sW5RiO+Heza1aPY K9bUVPSfKqMBjkjV2xiehbq5P8GclFxLuhkyUO+mgkpsWw96PAw8dIeZXCkQoEv3rUvLOd OLPB7IO1fezrjF1uYUnMrFuyAAF+7fGalCvZ/cm40cUctNveU2PdUO2oGJ7IdkJEr4aT22 PyG9hxw9oiJmzBN8aBAnVg5niQRfBINfwKhJf6xJV3/pjgGMX6W2rZ5JtrxfnWy7v6D7RU nV0+sRqMdqnJWG3gLIXv5rdU/LLNp6HqKShKrosomnqMXiy9vEiw9sdrlcQqqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jQcnf5j2mz1P2G for ; Thu, 12 Nov 2026 23:59:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 10773 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 23:59:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Enji Cooper Subject: git: de6328af0c8c - main - tests/sys/kern/ssl_sendfile: :eagain_vs_eof: improve failure messaging List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de6328af0c8c0284d28574364db3b8d98d51e005 Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 23:59:50 +0000 Message-Id: <6af652f6.10773.23c7dab7@gitrepo.freebsd.org> The branch main has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=de6328af0c8c0284d28574364db3b8d98d51e005 commit de6328af0c8c0284d28574364db3b8d98d51e005 Author: Enji Cooper AuthorDate: 2026-11-12 23:55:46 +0000 Commit: Enji Cooper CommitDate: 2026-11-12 23:59:37 +0000 tests/sys/kern/ssl_sendfile: :eagain_vs_eof: improve failure messaging Convert many raw `ATF_REQUIRE(..)` macro calls to `ATF_REQUIRE_MSG(..)` and output the sbytes attached to the context in provide meaningful information with failure messages. While here, fix a typo in a comment and some indentation in another testcase (:random). PR: 299447 MFC after: 1 week --- tests/sys/kern/ssl_sendfile.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/sys/kern/ssl_sendfile.c b/tests/sys/kern/ssl_sendfile.c index ad938b65ef19..d44296c90750 100644 --- a/tests/sys/kern/ssl_sendfile.c +++ b/tests/sys/kern/ssl_sendfile.c @@ -350,7 +350,7 @@ ATF_TC_BODY(random, tc) require_sbytes(&c, (ssize_t)expect); } - common_cleanup(&c); + common_cleanup(&c); } /* Truncate the file while sendfile(2) is working on it. */ @@ -470,11 +470,12 @@ ATF_TC_BODY(eagain_vs_eof, tc) /* * Exercise short write due to no buffer space on non-blocking - * socket. Internall sendfile(2) returns -1 and errno == EAGAIN. + * socket. Internal sendfile(2) returns -1 and errno == EAGAIN. */ ATF_REQUIRE(pthread_mutex_lock(&c.mtx) == 0); sendme_locked_wait(&c, 0, FSIZE, true); - ATF_REQUIRE(c.sbytes > 0); + ATF_REQUIRE_MSG(c.sbytes > 0, "c.sbytes <= 0: %jd", + (ossl_ssize_t)c.sbytes); ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == 0); #if 0 /* see https://github.com/openssl/openssl/issues/29742 */ ATF_REQUIRE(BIO_should_retry(SSL_get_wbio(c.srv))); @@ -484,7 +485,8 @@ ATF_TC_BODY(eagain_vs_eof, tc) * Exercise second attempt on already full buffer. */ sendme_locked_wait(&c, 0, FSIZE, true); - ATF_REQUIRE(c.sbytes == -1); + ATF_REQUIRE_MSG(c.sbytes == -1, "c.sbytes != -1: %jd", + (ossl_ssize_t)c.sbytes); ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == SSL_ERROR_WANT_WRITE); ATF_REQUIRE(BIO_should_retry(SSL_get_wbio(c.srv))); @@ -505,7 +507,8 @@ ATF_TC_BODY(eagain_vs_eof, tc) * rather than asserts that this is a correct behavior. */ sendme_locked_wait(&c, FSIZE, 0, true); - ATF_REQUIRE(c.sbytes == 0); + ATF_REQUIRE_MSG(c.sbytes == 0, "c.sbytes != 0: %jd", + (ossl_ssize_t)c.sbytes); ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == SSL_ERROR_SYSCALL); #if 0 /* see https://github.com/openssl/openssl/issues/29742 */ ATF_REQUIRE(!BIO_should_retry(SSL_get_wbio(c.srv))); @@ -515,7 +518,8 @@ ATF_TC_BODY(eagain_vs_eof, tc) * Exercise short write due to end of file. */ sendme_locked_wait(&c, FSIZE - 100, 0, true); - ATF_REQUIRE(c.sbytes == 100); + ATF_REQUIRE_MSG(c.sbytes == 100, "c.sbytes != 100: %jd", + (ossl_ssize_t)c.sbytes); ATF_REQUIRE(SSL_get_error(c.srv, c.sbytes) == 0); #if 0 /* see https://github.com/openssl/openssl/issues/29742 */ ATF_REQUIRE(!BIO_should_retry(SSL_get_wbio(c.srv)));