From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=erx1EJeH; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 06B855A0269 for ; Fri, 15 May 2026 10:20:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1778833220; bh=lwOhCP3uLrncfDBg3CJ7HyzW1lzz2qWoUzS+s8lqhVM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=erx1EJeH5cbgJoZAToZTh3vhnOy/wtNuYnd0Xr/LnqeE/FDV8fYDvOh7LRQUwwwd+ gdNIzyjaLVs+XoOV/NNI4JYdhfqiBWfjpI0Q986PMNgp3xRuZsRlq73wJXGXhiiXV+ q/e3a8duoAd2RBkfAojhjBagiw3bdK9LXvlevV1lLht3EZSWpc7qVeg8bQtz386dy4 KZBvxeWyYSSBvLBVhhZ/KyiLrAaD3PBIzlAB4KetTxG8U339FjooZCxwcB9+AbP15g JPhE6l3Byna9g3/pgqYKq07Vq7TOQYwXjC1yik59g6P9fdrgGIhxM4VtAXGpDDwFNh yB8L4gXTrl7qg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gH0W80PHlz4w23; Fri, 15 May 2026 18:20:20 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 3/3] test: Add test for builds with -DNDEBUG Date: Fri, 15 May 2026 14:13:12 +1000 Message-ID: <20260515041312.317644-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260515041312.317644-1-david@gibson.dropbear.id.au> References: <20260515041312.317644-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 5Y3L3CNR4SQHAX7D7PUQRJRPTROJFK6B X-Message-ID-Hash: 5Y3L3CNR4SQHAX7D7PUQRJRPTROJFK6B X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Jan Palus , David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Since bc872d91765d we omit assert()s if the NDEBUG preprocessor symbol is defined, as is the case with the standard library assert(3). However, none of our tests verify that we can actually build that way. Add an extra test to test/build/build.py tto verify this. Fixes: bc872d91765d ("treewide: Spell ASSERT() as assert()") Signed-off-by: David Gibson --- test/build/build.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/build/build.py b/test/build/build.py index eeee5acc..59de014a 100755 --- a/test/build/build.py +++ b/test/build/build.py @@ -77,6 +77,20 @@ for bin in BINARIES: exeter.register('make_all', test_make, 'all', BINARIES) +@exeter.test +def test_ndebug() -> None: + """Test build with -NDEBUG + + Tests that we can build all binaries with -DNDEBUG (warnings are + expected, though). Doesn't test that they actually work. + """ + + with clone_sources(): + sh('make all CPPFLAGS="-DNDEBUG" CFLAGS="-w"') + for b in BINARIES: + assert Path(b).exists(), f"{b} wasn't made" + + @exeter.test def test_install_uninstall() -> None: """Test `make install` and `make uninstall` -- 2.54.0