From: Sasha Levin <sashal@kernel.org>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Peter Zijlstra <peterz@infradead.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Boqun Feng <boqun@kernel.org>, Shuah Khan <shuah@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Thomas Gleixner <tglx@kernel.org>,
Dmitry Vyukov <dvyukov@google.com>
Cc: Sasha Levin <sashal@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
llvm@lists.linux.dev
Subject: [PATCH] selftests/rseq: avoid an ordered comparison of function pointers
Date: Sun, 11 Oct 2026 18:33:36 -0400 [thread overview]
Message-ID: <20261011223358.2327625-8-sashal@kernel.org> (raw)
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")
Assisted-by: LLM
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 3f7de4e283033..b59c4cb874ea1 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)
--
2.53.0
reply other threads:[~2026-10-11 22:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261011223358.2327625-8-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=boqun@kernel.org \
--cc=dvyukov@google.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mathieu.desnoyers@efficios.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=tglx@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®