selftests/nolibc: make evaluation of test conditions
authorThomas Weißschuh <linux@weissschuh.net>
Tue, 11 Jul 2023 09:48:39 +0000 (11:48 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 23 Aug 2023 02:40:22 +0000 (04:40 +0200)
commit3097783ecf3b963a6b700f32b6190b0910e39724
tree9de6e742fe4891188f2ca4203199af0e7ed7ead7
parent67d108e2a2bd258b49902ea9d85c25a53a7c5e5b
selftests/nolibc: make evaluation of test conditions

If "cond" is a multi-token statement the behavior of the preprocessor
will lead to the negation "!" to be only applied to the first token.
Although currently no test uses such multi-token conditions but it can
happen at any time.

Put braces around "cond" to ensure the negation works as expected.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
tools/testing/selftests/nolibc/nolibc-test.c