]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
selftests/nolibc: fix EXPECT_NZ macro
authorBenjamin Berg <benjamin.berg@intel.com>
Thu, 31 Jul 2025 20:12:22 +0000 (22:12 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Mon, 1 Sep 2025 18:48:41 +0000 (20:48 +0200)
The expect non-zero macro was incorrect and never used. Fix its
definition.

Fixes: 362aecb2d8cfa ("selftests/nolibc: add basic infrastructure to ease creation of nolibc tests")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://lore.kernel.org/r/20250731201225.323254-2-benjamin@sipsolutions.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/testing/selftests/nolibc/nolibc-test.c

index cc4d730ac4656fb5944d50be9477a3dfefb00aa0..d074878eb234129046e301b732eac6a267551299 100644 (file)
@@ -196,8 +196,8 @@ int expect_zr(int expr, int llen)
 }
 
 
-#define EXPECT_NZ(cond, expr, val)                     \
-       do { if (!(cond)) result(llen, SKIPPED); else ret += expect_nz(expr, llen; } while (0)
+#define EXPECT_NZ(cond, expr)                          \
+       do { if (!(cond)) result(llen, SKIPPED); else ret += expect_nz(expr, llen); } while (0)
 
 static __attribute__((unused))
 int expect_nz(int expr, int llen)