selftests/nolibc: avoid warnings during intptr tests
authorWilly Tarreau <w@1wt.eu>
Sun, 6 Aug 2023 10:58:52 +0000 (12:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2023 03:17:57 +0000 (05:17 +0200)
commitca283457b3c675e5ab6762a750b1b9c495864993
tree2c91cc52dd7411842728643a879d572f9e6b6e89
parent202a0bd12f877497eb73a42b22cf2562fb255963
selftests/nolibc: avoid warnings during intptr tests

Recent fix ceb528feb7c8 ("selftests/nolibc: avoid gaps in test numbers")
had the annoying side effect of always returning skipped tests, which
are normally supposed to happen only when certain features are missing
to run the test (missing kernel options, toolchain not supporting
stack-protector etc). As such there are now always warnings. Let's
modify the test to not use the condition and instead use a ternary
expression to check the result.

Fixes: ceb528feb7c8 ("selftests/nolibc: avoid gaps in test numbers")
Cc: Thomas Weiƃ<9F>schuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
tools/testing/selftests/nolibc/nolibc-test.c