summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/nolibc
diff options
context:
space:
mode:
authorZhangjin Wu <falcon@tinylab.org>2023-07-15 21:35:39 +0300
committerWilly Tarreau <w@1wt.eu>2023-08-23 05:40:22 +0300
commitb81434073b7a113f37f2a2b69c6c28605d4ffb6f (patch)
treed01165a480ceb54b1d2ff4aeef4fa8cba5617ec2 /tools/testing/selftests/nolibc
parent48967b73f8fe7e64e1d292e963dd45daff4ffa60 (diff)
downloadlinux-b81434073b7a113f37f2a2b69c6c28605d4ffb6f.tar.xz
selftests/nolibc: allow run nolibc-test locally
It is able to run nolibc-test directly without qemu-user when the target machine is the same as the host machine. Sometimes, the result running locally may help a lot when the qemu-user package is too old. When the target machine differs from the host machine, it is also able to run nolibc-test directly with qemu-user-static + binfmt_misc. Link: https://lore.kernel.org/lkml/ZKutZwIOfy5MqedG@1wt.eu/ Signed-off-by: Zhangjin Wu <falcon@tinylab.org> Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'tools/testing/selftests/nolibc')
-rw-r--r--tools/testing/selftests/nolibc/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index d31d6cea82e2..b42e67b1a7e2 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -133,10 +133,16 @@ nolibc-test: nolibc-test.c sysroot/$(ARCH)/include
libc-test: nolibc-test.c
$(QUIET_CC)$(CC) -o $@ $<
+# local libc-test
run-libc-test: libc-test
$(Q)./libc-test > "$(CURDIR)/run.out" || :
$(Q)$(REPORT) $(CURDIR)/run.out
+# local nolibc-test
+run-nolibc-test: nolibc-test
+ $(Q)./nolibc-test > "$(CURDIR)/run.out" || :
+ $(Q)$(REPORT) $(CURDIR)/run.out
+
# qemu user-land test
run-user: nolibc-test
$(Q)qemu-$(QEMU_ARCH) ./nolibc-test > "$(CURDIR)/run.out" || :