commit | ac31999720389842c6d9ee128dbb629df067c1fa | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Sun Feb 27 20:38:17 2022 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Mon Mar 21 18:08:48 2022 +0100 |
tree | 5ae20a766cb8f1b4c4cd38e81253d03c26d9ad4a | |
parent | 0bf633c2775bcd0c5683b0e0e770ba7e2b30ba13 [diff] |
tools/nolibc/test: 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>