Searched hist:f49896d7d9a69b7565a59f5085c78ca1c08c7dd7 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/tools/testing/selftests/nolibc/ |
H A D | nolibc-test.c | diff f49896d7d9a69b7565a59f5085c78ca1c08c7dd7 Tue Jul 19 16:44:40 CDT 2022 Willy Tarreau <w@1wt.eu> selftests/nolibc: exit with poweroff on success when getpid() == 1
The idea is to ease automated testing under qemu. If the test succeeds while running as PID 1, indicating the system was booted with init=/test, let's just power off so that qemu can exit with a successful code. In other situations it will exit and provoke a panic, which may be caught for example with CONFIG_PVPANIC.
Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
|