From nobody Thu Oct 9 02:18:30 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6F43238C0F; Fri, 20 Jun 2025 21:39:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750455589; cv=none; b=KkxS7Rc7Gzfp5hm4R4mLFP7R+PIsfcuospWrGmahloLLxQDdQzwK0oXnHf62TFkyVLnONGMt4+tkmHqZGd54MORg0SESp0eGNeQUxZd7wh8ucg641+glyHzSqSu3VLNS7NtfIlHUoQbqhmrJSzni8oy2wmbFoR2StUgWVzbTknI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750455589; c=relaxed/simple; bh=txCjIBp7fMZKfcJXO+z5XgGsJrosp+zHd4noDHk6vuM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FRaWPfyrNhPf7dC7mYakV/URrD1ouIuKz6o7lgje9JiLoogtHSWHaP1o37wz0DwpoWvSpbzEqdQASvii2AyGuS6ABrYxW5ZmSJIvEozBhqD1YDoArF20OHm5wcR2eSr3Hw/9LEDaVJNS8KriBM7AxI7/sp8DDwuYL6Ado/IBDqY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=Hsy2oohI; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="Hsy2oohI" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1750455579; bh=txCjIBp7fMZKfcJXO+z5XgGsJrosp+zHd4noDHk6vuM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Hsy2oohIoz1NwDn9O1muFKJAOlWoVuw6/i8Mh8a8UL4pQxdZLkAuDJM/OKYOzqeXC pNp0yk3XBajEQTw+qUF6V3rKdhtkBU44hLmzMjTr2yJnr0X87zWBKnJbxQz8CLaF3y 0oOoi57r0vnHKBJWyYySbIiiOQORy3TWDGpIpHgs= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 20 Jun 2025 23:39:30 +0200 Subject: [PATCH 1/4] selftests/nolibc: drop implicit defconfig executions Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250620-nolibc-selftests-v1-1-f6b2ce7c5071@weissschuh.net> References: <20250620-nolibc-selftests-v1-0-f6b2ce7c5071@weissschuh.net> In-Reply-To: <20250620-nolibc-selftests-v1-0-f6b2ce7c5071@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1750455578; l=1451; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=txCjIBp7fMZKfcJXO+z5XgGsJrosp+zHd4noDHk6vuM=; b=9zHfwAxtjs6za0X3hhzrn51nKfJiXL4ElfDNl5TtE/Bs09o+iaqlrGyJSsTDdqHHi8Sq9tk1M 8hGY3i3oB+MD1cNSMiYbymxsmc13G1ayEp+txVut9mSMv3b6qh2cLwo X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Commit d7d271ec30dd ("selftests/nolibc: execute defconfig before other targ= ets") accidentally introduced implicit executions of the defconfig target. These executions were unintentional and come from a misunderstanding of ordering dependencies. Drop the dependencies again. Reported-by: Mark Brown Closes: https://lore.kernel.org/all/3d5128b9-b4b6-4a8e-94ce-ea5ff4ea655b@si= rena.org.uk/ Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/nolibc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selfte= sts/nolibc/Makefile index 147ce411b46ac84ea3ee0f91a55a7bb6c0712626..41b97dfd02bff3fb57f4d2b73b7= 18f5c389d25e9 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -307,10 +307,10 @@ defconfig: $(MAKE) -C $(srctree) ARCH=3D$(ARCH) CC=3D$(CC) CROSS_COMPILE=3D$(CROSS_= COMPILE) olddefconfig < /dev/null; \ fi =20 -kernel: | defconfig +kernel: $(Q)$(MAKE) -C $(srctree) ARCH=3D$(ARCH) CC=3D$(CC) CROSS_COMPILE=3D$(CRO= SS_COMPILE) $(IMAGE_NAME) < /dev/null =20 -kernel-standalone: initramfs | defconfig +kernel-standalone: initramfs $(Q)$(MAKE) -C $(srctree) ARCH=3D$(ARCH) CC=3D$(CC) CROSS_COMPILE=3D$(CRO= SS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=3D$(CURDIR)/initramfs < /= dev/null =20 # run the tests after building the kernel --=20 2.50.0 From nobody Thu Oct 9 02:18:30 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A6EB8238178; Fri, 20 Jun 2025 21:39:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750455589; cv=none; b=GMtm+HGt3S9rXntEAHF7tliPVJgu1Bhc9WHrHkJ3Hr1JOYGYkYDP3DzQoAbMAZtAb+AfTGgjqCwUP/deIn6Kf4NaKA3Pwj/sQ3KOXPPp1Tb01ndT9z96c26xDr/r5rLrXa1XGZcGZsdNqm4tjQoj/UqHpyyUyDf7O6Pf5NMhEbE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750455589; c=relaxed/simple; bh=6ml43yk9vOCtPWikBGN5ZCduTpE8kt0rfUh8lqsvMj4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sewlcLRw2juxO49xn32aDCNWpcemL++JPJvc4whyhknZN6wnn9uoGR+nBI05WNs82NYgePY3gyyWGjA1cWzHinf+RC5NoQf+U5mqrv72VoBH/aGrwQ+/Py+u/LoTR420WPEPM5D7UDkMQ9WAl1SG1dgAhTJoiSkSFYdNRs0zc0c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=C9SVEg7/; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="C9SVEg7/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1750455579; bh=6ml43yk9vOCtPWikBGN5ZCduTpE8kt0rfUh8lqsvMj4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=C9SVEg7/3edLKq9BxGqCoKi0TK9ulapsfcg1kxaMk+5t3AhgQ5xQokAHL3s+rKb/1 OsLuQgL+sHpKfqa2C9dtVSm+/VGnE8XSVVphqCrA6ga2QWHsaeWb6rHRV5L9MoOwzD CJIUmLT9icjfHRpnIZcFQ/dizL0uXY8eO5Yt6mwM= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 20 Jun 2025 23:39:31 +0200 Subject: [PATCH 2/4] selftests/nolibc: split out CFLAGS logic Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250620-nolibc-selftests-v1-2-f6b2ce7c5071@weissschuh.net> References: <20250620-nolibc-selftests-v1-0-f6b2ce7c5071@weissschuh.net> In-Reply-To: <20250620-nolibc-selftests-v1-0-f6b2ce7c5071@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1750455578; l=2577; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=6ml43yk9vOCtPWikBGN5ZCduTpE8kt0rfUh8lqsvMj4=; b=kya2WzdcUMU0j+ht31ZZrJE3DWAcrPDj7HtBvA5GOekBCkyTZWKRtDDacqSfOdHCalFOHbEqh hUTeSvMwJtaAS4zXFjLLv7+ylaYexs0LmIXK1+ZnB+x0/mk+F69X9l/ X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Some upcoming changes will reuse the CFLAGS. Split the computation into a reusable Makefile. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/nolibc/Makefile | 12 ++++-------- tools/testing/selftests/nolibc/Makefile.include | 10 ++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selfte= sts/nolibc/Makefile index 41b97dfd02bff3fb57f4d2b73b718f5c389d25e9..6d62f350d0c16405785a8aabc7f= 5741b82e55370 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -195,14 +195,10 @@ CFLAGS_sparc32 =3D $(call cc-option,-m32) ifeq ($(origin XARCH),command line) CFLAGS_XARCH =3D $(CFLAGS_$(XARCH)) endif -_CFLAGS_STACKPROTECTOR =3D $(call cc-option,-fstack-protector-all) $(call = cc-option,-mstack-protector-guard=3Dglobal) -CFLAGS_STACKPROTECTOR ?=3D $(call try-run, \ - echo 'void foo(void) {}' | $(CC) -x c - -o - -S $(CLANG_CROSS_FLAGS) $(_C= FLAGS_STACKPROTECTOR) | grep -q __stack_chk_guard, \ - $(_CFLAGS_STACKPROTECTOR)) -CFLAGS_SANITIZER ?=3D $(call cc-option,-fsanitize=3Dundefined -fsanitize-t= rap=3Dall) -CFLAGS ?=3D -Os -fno-ident -fno-asynchronous-unwind-tables -std=3Dc89 -W = -Wall -Wextra \ - $(call cc-option,-fno-stack-protector) $(call cc-option,-Wmissing-protot= ypes) \ - $(CFLAGS_XARCH) $(CFLAGS_STACKPROTECTOR) $(CFLAGS_SANITIZER) $(CFLAGS_EX= TRA) + +include Makefile.include + +CFLAGS ?=3D $(CFLAGS_NOLIBC_TEST) $(CFLAGS_XARCH) $(CFLAGS_EXTRA) LDFLAGS :=3D =20 LIBGCC :=3D -lgcc diff --git a/tools/testing/selftests/nolibc/Makefile.include b/tools/testin= g/selftests/nolibc/Makefile.include new file mode 100644 index 0000000000000000000000000000000000000000..66287fafbbe07e1750e31c3b238= 8ac4be1e7f8ae --- /dev/null +++ b/tools/testing/selftests/nolibc/Makefile.include @@ -0,0 +1,10 @@ +# SPDX-License-Identifier: GPL-2.0 + +__CFLAGS_STACKPROTECTOR =3D $(call cc-option,-fstack-protector-all) $(call= cc-option,-mstack-protector-guard=3Dglobal) +_CFLAGS_STACKPROTECTOR ?=3D $(call try-run, \ + echo 'void foo(void) {}' | $(CC) -x c - -o - -S $(CLANG_CROSS_FLAGS) $(__= CFLAGS_STACKPROTECTOR) | grep -q __stack_chk_guard, \ + $(__CFLAGS_STACKPROTECTOR)) +_CFLAGS_SANITIZER ?=3D $(call cc-option,-fsanitize=3Dundefined -fsanitize-= trap=3Dall) +CFLAGS_NOLIBC_TEST ?=3D -Os -fno-ident -fno-asynchronous-unwind-tables -s= td=3Dc89 -W -Wall -Wextra \ + $(call cc-option,-fno-stack-protector) $(call cc-option,-Wmissing-protot= ypes) \ + $(_CFLAGS_STACKPROTECTOR) $(_CFLAGS_SANITIZER) --=20 2.50.0 From nobody Thu Oct 9 02:18:30 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66B5A23717C; Fri, 20 Jun 2025 21:39:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750455590; cv=none; b=Tm7ZDP55RVevOP3cj9oZPId6oQ8g1YQstjcxtedsfVfFUE+awQj6DQDAaf2R7p4AMi15eL3vPD9iIQgCcyFCoYRgoasnykS+UyqkqNk8Km5Fxv9Uxl2Lj2Vw2M0xBmjYCGhkkl1OSCkqtq5jH9VOpxmrKXsd8ebFT3gGTB27DrU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750455590; c=relaxed/simple; bh=muvONxb2wPgiwglaesqALOnMRz4u14VQeWzPjdB/Kxo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oN+nkYXzNX87vPlNRvUTyJL2IMjuyMyw9FYFyVUv+0al/wmNOlZFNvuX+IAc3lpzsMAT5e1IUqj2RF269SxB7fEA+kE1ouqGv5VVkYfKSl8fpcUoBAWwru+W8bvWWQaPvLDbV36mdd4Q/caW9DcEYIda7fBT2an1A0CKT3h8cbI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=DsKhrjJV; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="DsKhrjJV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1750455579; bh=muvONxb2wPgiwglaesqALOnMRz4u14VQeWzPjdB/Kxo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DsKhrjJVQCqePvtRQASrU9cE6/lQSlIjeZP4CGiIHc+uWMiwWK9+Yi8aEFSrEZvRW /hd5NHBDNE9rgOMq6gAtaUrYdbOFxOwtxLSY50Zd8h2TYYI3FJr1IJF4tfJ/Ax3G7p k9jBCNnNgqdlnqw1LYZynJeckmwG6O8EjivmBE6U= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 20 Jun 2025 23:39:32 +0200 Subject: [PATCH 3/4] selftests/nolibc: rename Makefile Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250620-nolibc-selftests-v1-3-f6b2ce7c5071@weissschuh.net> References: <20250620-nolibc-selftests-v1-0-f6b2ce7c5071@weissschuh.net> In-Reply-To: <20250620-nolibc-selftests-v1-0-f6b2ce7c5071@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1750455578; l=1615; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=muvONxb2wPgiwglaesqALOnMRz4u14VQeWzPjdB/Kxo=; b=aDlqUmSlmo5eRGJOlLK6yeUEVneC37p0I83yh78sFEvH1yj0JsrZXGSlHRxOeVsRK+tj0IXIm GDkqmvJDDYICFDgpoliKaYv33cP1s1+qB7Na3vlq31fZ3h3wzrLKKSf X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The nolibc tests are not real kselftests, they work differently and provide a different interface. Users trying to use them like real selftests may be confused and the tests are not executed by CI systems. To make space for an integration with the kselftest framework, move the custom tests out of the way. The custom tests are still useful to keep as they provide functionality not provided by kselftests. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Willy Tarreau --- tools/testing/selftests/nolibc/{Makefile =3D> Makefile.nolibc} | 0 tools/testing/selftests/nolibc/run-tests.sh | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selfte= sts/nolibc/Makefile.nolibc similarity index 100% rename from tools/testing/selftests/nolibc/Makefile rename to tools/testing/selftests/nolibc/Makefile.nolibc diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/se= lftests/nolibc/run-tests.sh index 8277599e6441a933d9c1ec5003acf49b06df226f..279fbd93ef70497868689b7f1e1= 4ddc6c5c1a15f 100755 --- a/tools/testing/selftests/nolibc/run-tests.sh +++ b/tools/testing/selftests/nolibc/run-tests.sh @@ -169,7 +169,7 @@ test_arch() { if [ "$werror" -ne 0 ]; then CFLAGS_EXTRA=3D"$CFLAGS_EXTRA -Werror" fi - MAKE=3D(make -j"${nproc}" XARCH=3D"${arch}" CROSS_COMPILE=3D"${cross_comp= ile}" LLVM=3D"${llvm}" O=3D"${build_dir}") + MAKE=3D(make -f Makefile.nolibc -j"${nproc}" XARCH=3D"${arch}" CROSS_COMP= ILE=3D"${cross_compile}" LLVM=3D"${llvm}" O=3D"${build_dir}") =20 case "$test_mode" in 'system') --=20 2.50.0 From nobody Thu Oct 9 02:18:30 2025 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66AAE218596; Fri, 20 Jun 2025 21:39:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750455590; cv=none; b=kC0KkhDW64tPUhyOTB91cJYR3QIc78MMNbK0iRbjFJYU+/p2FV6Bi9SLOv5fGifWs6CQDcSNEQ5mrLPivXjfcvdo3nxfmfufodIHGtLbkKZG9sWesHDfPTnYhvM2E7QG7s5Kv9noL80zp5hOdGtM2jhUkhtWsNi+VpTs1Yd58I0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750455590; c=relaxed/simple; bh=DOp3MwDL1Dnv3cqUgbx/x6jmoScWW6MBfnQhM9z8lRA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=AJu2Pp9pJL8LSuiUjVkwVfl4xOd0GvQv8aG2S7kHFbQeShIvg810RAeNthJDzVFbog8OSstu10zBG9L9g7qNaVqx6Bszsn8xfCMgby54zWFjEHpKSXuAdmmBrR1sp476uSFrlz7DVV1NVrHL/Vh92UCuWD0bAFQ4Af67UUvko20= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=WaSFYBJK; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="WaSFYBJK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1750455579; bh=DOp3MwDL1Dnv3cqUgbx/x6jmoScWW6MBfnQhM9z8lRA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=WaSFYBJKC4rfklM4SwzPunmurZPltXvSPl7O/IQ7KYHAjk/3ZseariVY2pQKfft34 N9SDQOvm3xkYg1IbkR0/ulaA3DpGqhDJqfQmIu9wyzgo9y00PYis2OksK74VjFh8Ug QZ6fKGpQXBRfm3NFgWPGAQqTmElviz/fTSxg1Oao= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 20 Jun 2025 23:39:33 +0200 Subject: [PATCH 4/4] selftests/nolibc: integrate with kselftests Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250620-nolibc-selftests-v1-4-f6b2ce7c5071@weissschuh.net> References: <20250620-nolibc-selftests-v1-0-f6b2ce7c5071@weissschuh.net> In-Reply-To: <20250620-nolibc-selftests-v1-0-f6b2ce7c5071@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1750455578; l=1744; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=DOp3MwDL1Dnv3cqUgbx/x6jmoScWW6MBfnQhM9z8lRA=; b=bjes1PZdG70MWZuu3CSg/Qp5M4R1cEKxyXXbjJBjHqD/fvhoYGGTKoulmJAuxsO2sVm3xR02E +KfpKZDPu/+BOZ/ooxBo0hWzvKgxI3D5QK/X1/ifUwvEyhiJMgBqn5n X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= Hook up nolibc-test with the kselftests framework. This enables CI systems and developers to easily execute the tests. While nolibc-test does not emit KTAP output itself that is not a problem, as the kselftest executor will wrap the output in KTAP. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/Makefile | 1 + tools/testing/selftests/nolibc/Makefile | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Mak= efile index 339b31e6a6b592217eca1c03068f21728ea024b4..3a4c98102f6967c4a1586104a56= 0418292b3f31d 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -77,6 +77,7 @@ TARGETS +=3D net/ovpn TARGETS +=3D net/packetdrill TARGETS +=3D net/rds TARGETS +=3D net/tcp_ao +TARGETS +=3D nolibc TARGETS +=3D nsfs TARGETS +=3D pci_endpoint TARGETS +=3D pcie_bwctrl diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selfte= sts/nolibc/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..fc7a65ca5fdd77576be49d62279= 39ec5451a814a --- /dev/null +++ b/tools/testing/selftests/nolibc/Makefile @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: GPL-2.0 + +TEST_GEN_PROGS :=3D nolibc-test + +include ../lib.mk +include $(top_srcdir)/scripts/Makefile.compiler + +cc-option =3D $(call __cc-option, $(CC),,$(1),$(2)) + +include Makefile.include + +CFLAGS =3D -nostdlib -nostdinc -static \ + -isystem $(top_srcdir)/tools/include/nolibc -isystem $(top_srcdir)/usr/i= nclude \ + $(CFLAGS_NOLIBC_TEST) + +ifeq ($(LLVM),) +LDLIBS :=3D -lgcc +endif + +$(OUTPUT)/nolibc-test: nolibc-test.c nolibc-test-linkage.c | headers --=20 2.50.0