From: Ranganath V N <vnranganath.20@gmail.com>
To: Shuah Khan <shuah@kernel.org>,
Christian Brauner <brauner@kernel.org>,
Jeff Layton <jlayton@kernel.org>, Mark Brown <broonie@kernel.org>,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: linux-kernel-mentees@lists.linuxfoundation.org,
Ranganath V N <vnranganath.20@gmail.com>
Subject: [RESEND PATCH] selftests/filesystems: Fix build warning on anon_inode_test
Date: Fri, 19 Sep 2025 16:19:47 +0530 [thread overview]
Message-ID: <20250919104948.67953-1-vnranganath.20@gmail.com> (raw)
clang warning null passed where non-null argument is expected.
anon_inode_test.c:45:19: warning: argument 3 null where non-null expected [-Wnonnull]
45 | ASSERT_LT(execveat(fd_context, "", NULL, NULL, AT_EMPTY_PATH), 0);
| ^~~~~~~~
Signed-off-by: Ranganath V N <vnranganath.20@gmail.com>
---
Adding missed mainters to the patch
tools/testing/selftests/filesystems/anon_inode_test.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/filesystems/anon_inode_test.c b/tools/testing/selftests/filesystems/anon_inode_test.c
index 73e0a4d4fb2f..f796dad679db 100644
--- a/tools/testing/selftests/filesystems/anon_inode_test.c
+++ b/tools/testing/selftests/filesystems/anon_inode_test.c
@@ -38,11 +38,13 @@ TEST(anon_inode_no_chmod)
TEST(anon_inode_no_exec)
{
int fd_context;
+ static char *argv[] = { NULL };
+ static char *envp[] = { NULL };
fd_context = sys_fsopen("tmpfs", 0);
ASSERT_GE(fd_context, 0);
- ASSERT_LT(execveat(fd_context, "", NULL, NULL, AT_EMPTY_PATH), 0);
+ ASSERT_LT(execveat(fd_context, "", argv, envp, AT_EMPTY_PATH), 0);
ASSERT_EQ(errno, EACCES);
EXPECT_EQ(close(fd_context), 0);
--
2.43.0
next reply other threads:[~2025-09-19 10:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 10:49 Ranganath V N [this message]
2025-10-06 7:43 ` [PATCH] selftests/filesystems: Fix build warning on anon_inode_test Ranganath V N
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=20250919104948.67953-1-vnranganath.20@gmail.com \
--to=vnranganath.20@gmail.com \
--cc=brauner@kernel.org \
--cc=broonie@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=shuah@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