From nobody Sun Nov 01 01:17:27 2026 X-Original-To: dev-commits-src-branches@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 4jHH4l2xlJz6vWTj for ; Sun, 01 Nov 2026 01:17:27 +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 4jHH4l1K9Dz4D8l for ; Sun, 01 Nov 2026 01:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793495847; 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=bb5Fa/NAYIzGAlrtEzdQEjOhieWRfWT2ueSvvgcw020=; b=O/Yfz1ZNmb1GK6KfOkuBWXTREj2HAzwJ/tm0xf9OiOsYTisOcVaLiXJfi39xsfDW5fVeok Hg4vGTeLLP8i482Oj27LhNX4Rcd8el48t/yl+luLySU3PVZ3OLGGLrGcAzye7cBqCdqJUr sVjwFB5zQYK2uI7ugDVZCWAFSkAtOkmHAFLgMp16ZZLjiRr22nZJnDclexCtcbe7B3XX8u DmvNdH+NxzwKDaLSy7U+DbWeJDnzCfBntXrgJFQ3TuYuE/sNyc/r/f0epyecAHnMxmV9qp B0Ec2ibxuo7C+KhiwfePQ8UakMn+Mg7+CdiYN0fzLgTO5RYfh2/c63Olw/th3A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793495847; b=sOsqgwY1DR5tuqSeopMxTWrjK3mtMUreP9SFayaftTrbzpYsJ8BvLML3B7Zmvn5iUvWxa4 Z1kcX6/zYd3mqjWrV6GClXJnOfxNNUjXEBBkJMRUwyT7POmw1snoVTWpNrpzNokMkVnLJV thYMLRKs79wHGbcYF+nnhDNbqYe/pdPX6j3eMCzOnqlNjzn8j5sG31E/+GAD8zWaLhykEZ 1h3mmPK7s77cG5kczzS2N01DfK2TFQ1riqzrcb/apN6m6DfsYlKGhj5EqMbTOOU6lLZ6k8 B9Z/z92GvLE7DmhnsxFrre3hgrPrggMv3ZqefRGTFmSAoYR6AhBX3NCPPb8TYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793495847; 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=bb5Fa/NAYIzGAlrtEzdQEjOhieWRfWT2ueSvvgcw020=; b=KaBNv0sqoLhAADtSNXKl4aooDaa51v87YMOfzT3NuCkAOdHcOTk1E05C30gWKAyCdHqVDt I+isdDEcOjwtG9SkFv2nb8FRBa2slBxn0mAske4jm+THSycQVaul3m5Hr3x5Rx67purIlo U+wVdFDnkB5ACkCs8Zx1QSixBZ84sAix2Vm5AywT0Z6Nl4kq5QnMUzQLyOrkJK37OVQKEn EWSbSoL6/6BQx71i8fkX0AdqZr7PaNK23jPmSLGq3F8hQhjBCQ4d3y+qZEsmf43cPGNjIn u5o4lPBzNOw+ackObAl/Jj/CvESZRy54tpX98yH6vQyUVzgi1waBBHnfqC3CZg== 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 4jHH4l0jkMzdMN for ; Sun, 01 Nov 2026 01:17:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22455 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 01 Nov 2026 01:17:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: aafeb0e36673 - stable/14 - [tests] lib/libc/gen:assert_test: skip tests when NDEBUG set List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD 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/14 X-Git-Reftype: branch X-Git-Commit: aafeb0e36673dc44011208ed3a7686df5ea81597 Auto-Submitted: auto-generated Date: Sun, 01 Nov 2026 01:17:27 +0000 Message-Id: <6ae69327.22455.45bcf9a8@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=aafeb0e36673dc44011208ed3a7686df5ea81597 commit aafeb0e36673dc44011208ed3a7686df5ea81597 Author: Enji Cooper AuthorDate: 2026-09-22 06:22:57 +0000 Commit: Enji Cooper CommitDate: 2026-11-01 01:05:31 +0000 [tests] lib/libc/gen:assert_test: skip tests when NDEBUG set In the event that NDEBUG is specified in CFLAGS--which is most likely triggered via `MK_ASSERT_DEBUG` == "no" -- all assert(3) statements are optimized out by design. This breaks the assert(3) tests as they specifically rely on assert(3) actually raising a `SIGABRT` instead of quietly succeeding. Skip both tests if `NDEBUG` is set. There's no sense running the `assert(true)` test if the result could instead be a false positive. MFC after: 2 weeks (cherry picked from commit 6f3445006aa05550f14af65b04276c3d25169941) --- contrib/netbsd-tests/lib/libc/gen/t_assert.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/contrib/netbsd-tests/lib/libc/gen/t_assert.c b/contrib/netbsd-tests/lib/libc/gen/t_assert.c index ce73015142d6..b4023223b446 100644 --- a/contrib/netbsd-tests/lib/libc/gen/t_assert.c +++ b/contrib/netbsd-tests/lib/libc/gen/t_assert.c @@ -43,6 +43,18 @@ __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) { @@ -74,6 +86,10 @@ ATF_TC_BODY(assert_false, tc) pid_t pid; int sta; +#ifdef __FreeBSD__ + skip_if_ndebug_set(); +#endif + pid = fork(); ATF_REQUIRE(pid >= 0); @@ -112,6 +128,10 @@ ATF_TC_BODY(assert_true, tc) pid_t pid; int sta; +#ifdef __FreeBSD__ + skip_if_ndebug_set(); +#endif + pid = fork(); ATF_REQUIRE(pid >= 0);