From nobody Tue Sep 22 13:14:57 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 4hq0v765llz6tgHq; Tue, 22 Sep 2026 13:14:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hq0v75ZFkz4MlR; Tue, 22 Sep 2026 13:14:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790082899; 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: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=rrTtkWz/+M9cnd4l4KXqJfvQiEJjxhiR3+iEC7nvIHw=; b=dFI/mTGAAjnwBmUR6pP6mpDmxrfugP/Qqsy8j/3V4mAsTK4NGnWnDfeyTXRA+Cygm3AlKf ForuiKUt/IAqey66y45YRiptvw8w5ZWIKHCf72toHpwUf1rUMIL1EIxMBTYywgwqPINgv6 onE4mLI5+KBhq5axBzCsF44mFsf+LIeSwnTY7+B7mn9vlkeuzNG4R9Rx1VwioUvbU/c7aS JhPK9nKjsba1vzr1bzxq5DiWfT70XicyKenACcu9GffDRzOrAQUcnYea59WJ3OZj0mgXAU zewV7dRt4B1lY2dGWxnLCJVYwiuP79/GN4GqJ/68BA3oTUUi8xA1oTvNy6t9+g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790082899; b=tPA03O8olIvP3iwb2X+zqRDTJAUEjUpG2qDv9DZUtdFvyovc5z96y8IPYK9No8u93NV3iF uRdiijBrNYAchREirc+qRTY8UrawdALgSoIxC/WiiIO5DMOvHt7PSHpfJ5No1gM5QX2+jX TtmmlcwOWJMgilrBmV8/IZa0hAxqf2NSmFmbbpCqxLeJDxgJ/DnmeCnQ7BKaQoKFkGR0uo F5IH/wS7Fvi6JkzkWlexbK6B1hNxHwLEZ5KovoZywcP/et1t1wW3C46/WR3epa13ZUUmSl uGin8AF2f3yJKxxwa2BVpQNVk1vleNNPooDGogh736CHJ7oJdUoMOEZB4IRcAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790082899; 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: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=rrTtkWz/+M9cnd4l4KXqJfvQiEJjxhiR3+iEC7nvIHw=; b=QAkggjytQ/PleFbVgVQv+8vb7jeKwRrYhTbnZ0IwDJ7b9zxndpPq3FACMhrh6vg8CxyEAw UrUDJ4m2iU0W+9meOQlgh8VLH2QK/hdZ+IfAwhxsc2p4/AvbhL1QDUxXSM4U4Okvvgd9AR 1vMfpb4MQTEkXAOuZo55a2v2UNKdwhY286FGByLDxL0zPHcfLEy0vTxA9Dsmbkd1iIbAK9 +7IHuhdWJikQxNjerMPPWZa2oKXlUg7N/+D/unF4gg2cMIHe4c4HP5rcH/8Ubjo3kNW3it q5PkomhTdjzMzIUoGTw8To4Y7AX1WS2MWX7YSVD8g3cTYbrEht91SVhtCicYrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4hq0v71n54zpy2; Tue, 22 Sep 2026 13:14:59 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: Date: Tue, 22 Sep 2026 08:14:57 -0500 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 6f3445006aa0 - main - [tests] lib/libc/gen:assert_test: skip tests when NDEBUG set To: Enji Cooper , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6ab22091.3fd77.2b258f0@gitrepo.freebsd.org> Content-Language: en-US From: Kyle Evans Autocrypt: addr=kevans@FreeBSD.org; keydata= xjMEWySaMRYJKwYBBAHaRw8BAQdAdk/Fqvvw2gwIzw2l1UAbv5mrT35Y5ylfHyUBEcWY3AzN H0t5bGUgRXZhbnMgPGtldmFuc0BGcmVlQlNELm9yZz7ClgQTFggAPgIbAwULCQgHAgYVCgkI CwIEFgIDAQIeAQIXgBYhBPv/ZC7g03RcLBP+TBlOtBOHRwt7BQJlp2YoBQkQJmZ1AAoJEBlO tBOHRwt7krYBAPnGTE/v9EcirWF5oGU+J19nr0wOpPCQzMOxCf5e2km5AQDHIznIhaLvZYUw LlxiBE7MEs/2w4WfXRgW+LuAkzedCc44BFskmjESCisGAQQBl1UBBQEBB0B84DgMSsY6hG+1 o57XJAuqj+dVfG+esKnEiO6T886KYAMBCAfCfgQYFggAJgIbDBYhBPv/ZC7g03RcLBP+TBlO tBOHRwt7BQJlp2ZOBQkQJmadAAoJEBlOtBOHRwt75v8A/Aq5ti6ACDG6/Hfodp9rfed9UQIH q45o6ymUj2TnhTJWAP45Wtv80BB+TiEcWCG7kcOYB3hcqZlD8k8vfito8b3KBA== In-Reply-To: <6ab22091.3fd77.2b258f0@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/22/26 01:30, Enji Cooper wrote: > The branch main has been updated by ngie: > > URL: https://cgit.FreeBSD.org/src/commit/?id=6f3445006aa05550f14af65b04276c3d25169941 > > commit 6f3445006aa05550f14af65b04276c3d25169941 > Author: Enji Cooper > AuthorDate: 2026-09-22 06:22:57 +0000 > Commit: Enji Cooper > CommitDate: 2026-09-22 06:30:30 +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 > --- > contrib/netbsd-tests/lib/libc/gen/t_assert.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > Hi, Why not just #undef NDEBUG right before we include ? Given that it's a test of the feature, I think it makes plenty of sense to ignore the user-requested preference for just this one scenario where we want to confirm that the feature isn't coincidentally broken. Thanks, Kyle Evans > 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); >