From nobody Sun Nov 01 01:18:08 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 4jHH5Y2qqDz6vX9w for ; Sun, 01 Nov 2026 01:18:09 +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 4jHH5Y1DfXz4Dyq for ; Sun, 01 Nov 2026 01:18:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793495889; 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=WxrF1IxJVkhBdc9CpbZdlxtPWircuDbV1Rm1Ogier4g=; b=aAVbVRWufdm3iT429svnZWXpUGSR3Rt5e/3VbD7h8AM3xlkvZOBxGoPd1bEZQv+z7o5oMi yAPGiD8aQ6cWN3QujW66pTvK1ksaYzksWbNcs7Z7mXLd1Hs/gfkWuI1Cw8xmHRznZPq7m5 QcXBId9OsQcYMtLuGexxJFrH9DndV+F3L1yoV90KIXUCI+9WmoZi4XWqDWW3MiGsTp1gd2 UzpfClPmBbtrNyFpEgWiZftKlw6WeKX9Tkzx6kz6oB0fuyNdFwHd9bMJ2r69DOUXhdB2Xz eus6TWdb4fXNZooy31MXhelAxO2e+xWPDm6blCn+5ptFo8LRM9fMw+roHsrlnA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793495889; b=RgLBgqyNiofSZyh9Es3vTvrsKqpuoJnAKTg0oQzJhM8FXSMp/1vYFCJ31JWzl4nSg/VMQG EKH5tlIN2vBq4G+8QsmzmTYJua9ny7R/quVdSFZ4vfHTxIh5SpDxxfX/beOUiaDMPMneI1 N+Uxmxj0Hh5xPLd8nS1FXb5yzQI+qb0mIiaG48K7j5tCt7rk6czaLQV9cMKMHXcIyEuKUM sjGf2f4heZY3OpxmsLcZuArq9prv+XRek3tjUW/FhPNE6U5yG1GA8JCkpKfGHR936BOnjG TvAZWTtndBUkU0Gdzg2nTZPhZF8LC/jrszn8lHgsZk25v72ydfSPV0PvgBRZww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793495889; 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=WxrF1IxJVkhBdc9CpbZdlxtPWircuDbV1Rm1Ogier4g=; b=dH3wSzz59sRwzQk6GKSPvz0Gx3yemIPxcUN/QU9dNwnXOp3fvBwJr+8qFzoBmr1OOIL4Em hHIeZJZoLRqfWXA8y+pxF5E3yq8FFVGwdGJihBgZkICoPKD1EJrueuErMAQUjO1pgumWLv P8YGQaPmDEbkr4XZl6bJpbAbiI07feZoVw0NnQiJB7ne527tvazYEHqBLVpKSx89hzWoEe WRq5G8Tw6JtTpiwZhlRZaKZDZUfjfswHgfXMg4EgiEuZqd9e/LRnlQXtSyVIqu2mH4IeGp pFm8CEqEzPkmq1m6wVHUkYgFwS5X8A/RPOFWORp5/pfryIIPq05epOO9hiFrYQ== 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 4jHH5X73Gtzdf5 for ; Sun, 01 Nov 2026 01:18:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23797 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Nov 2026 01:18:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: 8957a039f857 - stable/15 - [tests] lib/libc/gen:assert_test: undefine `NDEBUG` List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/15 X-Git-Reftype: branch X-Git-Commit: 8957a039f85726fa20808140e2967cc56ab72f26 Auto-Submitted: auto-generated Date: Sun, 01 Nov 2026 01:18:08 +0000 Message-Id: <6ae69350.23797.8d7d39a@gitrepo.freebsd.org> The branch stable/15 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=8957a039f85726fa20808140e2967cc56ab72f26 commit 8957a039f85726fa20808140e2967cc56ab72f26 Author: Enji Cooper AuthorDate: 2026-10-02 19:27:51 +0000 Commit: Enji Cooper CommitDate: 2026-11-01 01:18:00 +0000 [tests] lib/libc/gen:assert_test: undefine `NDEBUG` In the event `NDEBUG` was defined, `assert` would become a no-op, breaking some of the expectations in `assert_test` around `assert(..)` failing generating a coredump. This is a better approach than the previous one committed in 6f3445006a as it continues to test the `assert(..)` function instead of just skipping it if `NDEBUG` was defined. Suggested by: kevans MFC after: 4 days MFC with: 6f3445006a Fixes: 6f3445006a Differential Revision: https://reviews.freebsd.org/D60253 (cherry picked from commit 9d5a33d9c294b01cead6ff65b0773b5b5ab85ccd) --- contrib/netbsd-tests/lib/libc/gen/t_assert.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/contrib/netbsd-tests/lib/libc/gen/t_assert.c b/contrib/netbsd-tests/lib/libc/gen/t_assert.c index b4023223b446..cec98c3beed0 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_assert.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_assert.c @@ -28,6 +28,12 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +#if defined(__FreeBSD__) +/* TODO: upstream this. */ +#undef NDEBUG +#endif + #include __RCSID("$NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $"); @@ -43,18 +49,6 @@ __RCSID("$NetBSD: t_assert.c,v 1.3 2017/01/10 15:17:57 christos Exp $"); #include #include -#ifdef __FreeBSD__ -/* TODO: upstream this. */ -static void -skip_if_ndebug_set(void) -{ - -#ifdef NDEBUG - atf_tc_skip("Testcase requires code to be compiled without -DNDEBUG."); -#endif -} -#endif - static void disable_corefile(void) { @@ -86,10 +80,6 @@ ATF_TC_BODY(assert_false, tc) pid_t pid; int sta; -#ifdef __FreeBSD__ - skip_if_ndebug_set(); -#endif - pid = fork(); ATF_REQUIRE(pid >= 0); @@ -128,10 +118,6 @@ ATF_TC_BODY(assert_true, tc) pid_t pid; int sta; -#ifdef __FreeBSD__ - skip_if_ndebug_set(); -#endif - pid = fork(); ATF_REQUIRE(pid >= 0);