lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <49a3c3f75e2f433f42112a246b20488bf7c9e7f4.1687706332.git.falcon@tinylab.org>
Date:   Mon, 26 Jun 2023 00:43:48 +0800
From:   Zhangjin Wu <falcon@...ylab.org>
To:     thomas@...ch.de, w@....eu
Cc:     falcon@...ylab.org, arnd@...db.de, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: [PATCH v1 21/22] selftests/nolibc: allow run tests on all targets

This lists all of the supported architectures and allow testing for all
of them.

These targets are supported:

- run-user-all: testing run-user for all architectures
- run-all / run-default-all: testing run-default for all architectures
- run-tiny-all: testing run-tiny for all architectures

Signed-off-by: Zhangjin Wu <falcon@...ylab.org>
---
 tools/testing/selftests/nolibc/Makefile | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index 3e7e51bd7082..470923dc10e1 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -164,6 +164,18 @@ ifeq (run-default, $(MAKECMDGOALS))
 AUTOCONFIG ?= defconfig
 endif
 
+# allow run tests on all architectures: run-user-all, run-all (=run-default-all), run-tiny-all
+ARCHS   ?= $(shell sed -ne 's/^DEFCONFIG_\([^ ]*\) .*/\1/p' $(CURDIR)/Makefile)
+GOALS   ?= run-user run-tiny run-default
+RUN_ALL ?= _t=$@; t=$${_t%-all}; [ "$$t" = "run" ] && t=run-default; \
+	   if echo $(GOALS) | grep -wq "$$t"; then \
+		for a in $(ARCHS); do echo "Testing $$t for $${a}:"; make $$t ARCH=$$a; cp $(CURDIR)/run.out $(CURDIR)/run-$$a.out; done; \
+		echo "\n\nTesting summary of $$t:\n"; \
+		for a in $(ARCHS); do echo $${a}:; echo; $(REPORT) $(CURDIR)/run-$$a.out; echo; done; \
+	   else \
+		echo "Ignoring unknown target: $$t, available targets: $(GOALS)"; \
+	   fi
+
 # allow switch nolibc headers include method: 1 for sysroot, 0 for nolibc.h
 SYSROOT ?= 1
 
@@ -255,6 +267,10 @@ rerun:
 	$(Q)qemu-system-$(QEMU_ARCH) -display none -no-reboot -kernel "$(srctree)/$(IMAGE)" -serial stdio $(QEMU_ARGS) $(LOG_OUTPUT)
 	$(Q)$(REPORT) $(CURDIR)/run.out
 
+# test for all architectures
+%-all:
+	$(Q)$(RUN_ALL)
+
 clean:
 	$(call QUIET_CLEAN, sysroot)
 	$(Q)rm -rf sysroot
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ