[tip: core/rseq] selftests/rseq: Avoid an ordered comparison of function pointers
From: tip-bot2 for Sasha Levin
Date: Sun Nov 08 2026 - 07:44:39 EST
The following commit has been merged into the core/rseq branch of tip:
Commit-ID: f99b08f3e685e6276ea899a51f00d0d1f2cad4ca
Gitweb: https://git.kernel.org/tip/f99b08f3e685e6276ea899a51f00d0d1f2cad4ca
Author: Sasha Levin <sashal@xxxxxxxxxx>
AuthorDate: Sun, 11 Oct 2026 18:33:36 -04:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Sun, 08 Nov 2026 13:41:53 +01:00
selftests/rseq: Avoid an ordered comparison of function pointers
ASSERT_NE() compares its arguments with the relational operators when
printing a failure, which clang flags for function pointers:
legacy_check.c:41:2: warning: ordered comparison of function pointers [-Wordered-compare-function-pointers]
Check the result of signal() with ASSERT_TRUE() instead.
Fixes: fdf4eb632683b ("selftests/rseq: Validate legacy behavior")
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Link: https://patch.msgid.link/20261011223358.2327625-8-sashal@xxxxxxxxxx
---
tools/testing/selftests/rseq/legacy_check.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rseq/legacy_check.c b/tools/testing/selftests/rseq/legacy_check.c
index 3f7de4e..b59c4cb 100644
--- a/tools/testing/selftests/rseq/legacy_check.c
+++ b/tools/testing/selftests/rseq/legacy_check.c
@@ -38,7 +38,7 @@ FIXTURE_SETUP(legacy)
ASSERT_EQ(res, 0);
}
- ASSERT_NE(signal(SIGUSR1, sigfn), SIG_ERR);
+ ASSERT_TRUE(signal(SIGUSR1, sigfn) != SIG_ERR);
}
FIXTURE_TEARDOWN(legacy)