selftests/nolibc: add a "run" target to start the kernel in QEMU
authorWilly Tarreau <w@1wt.eu>
Tue, 19 Jul 2022 21:44:47 +0000 (23:44 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 31 Aug 2022 12:17:45 +0000 (05:17 -0700)
commit662ea60e373be8a6b8a925b237cdb93a2af353c1
treea0535e5e8e0ecfb95d82f3320b7e50ad493eb73e
parent5c43fd7954108bd138f7a1b4db4fb997ae1dc696
selftests/nolibc: add a "run" target to start the kernel in QEMU

The "run" target will build the kernel and start it in QEMU. The
"rerun" target will not have the kernel dependency and will just try
to start QEMU. The QEMU architecture used to start the kernel is
derived from the configured ARCH. This might need to be improved
for archs which include different variants under the same name
(mips vs mipsel, +/-64, riscv32 vs riscv64). This could be tested
for i386, x86, arm, arm64, mips and riscv (the later two reporting
issues on some tests).

It is possible to pass a test specification for nolibc-test in the TEST
variable, which will be passed as-is as NOLIBC_TEST.

On success, the number of successful tests is printed. On failure, failed
lines are individually printed.

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/nolibc/Makefile