Skip to content
Commit 869c7889 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Thomas Weißschuh
Browse files

selftests: harness: Stop using setjmp()/longjmp()



Usage of longjmp() was added to ensure that teardown is always run in
commit 63e6b2a4 ("selftests/harness: Run TEARDOWN for ASSERT failures")
However instead of calling longjmp() to the teardown handler it is easier to
just call the teardown handler directly from __bail().
Any potential duplicate teardown invocations are harmless as the actual
handler will only ever be executed once since
commit fff37bd3 ("selftests/harness: Fix fixture teardown").

Additionally this removes a incompatibility with nolibc,
which does not support setjmp()/longjmp().

Signed-off-by: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250505-nolibc-kselftest-harness-v4-12-ee4dd5257135@linutronix.de


Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
parent f46ddc2c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment