summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin.berg@intel.com>2025-07-31 22:12:22 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-15 11:59:58 +0200
commit8ef1bbcc40e570b72582b883793d64942279dba1 (patch)
tree5aa84e5df28f64f7a921b900abfca66332717822 /tools/testing
parent8ffe812280c4cbc8e089a0eede75d1fa458adac5 (diff)
downloadlinux-8ef1bbcc40e570b72582b883793d64942279dba1.tar.gz
linux-8ef1bbcc40e570b72582b883793d64942279dba1.tar.bz2
linux-8ef1bbcc40e570b72582b883793d64942279dba1.zip
selftests/nolibc: fix EXPECT_NZ macro
[ Upstream commit 6d33ce3634f99e0c6c9ce9fc111261f2c411cb48 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/nolibc/nolibc-test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/selftests/nolibc/nolibc-test.c
index 6fba7025c5e3..d73bff23c61e 100644
--- a/tools/testing/selftests/nolibc/nolibc-test.c
+++ b/tools/testing/selftests/nolibc/nolibc-test.c
@@ -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)