public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [RESEND PATCH] selftests/filesystems: Fix build warning on anon_inode_test
@ 2025-09-19 10:49 Ranganath V N
  2025-10-06  7:43 ` [PATCH] " Ranganath V N
  0 siblings, 1 reply; 2+ messages in thread
From: Ranganath V N @ 2025-09-19 10:49 UTC (permalink / raw)
  To: Shuah Khan, Christian Brauner, Jeff Layton, Mark Brown,
	linux-kselftest, linux-kernel
  Cc: linux-kernel-mentees, Ranganath V N

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] selftests/filesystems: Fix build warning on anon_inode_test
  2025-09-19 10:49 [RESEND PATCH] selftests/filesystems: Fix build warning on anon_inode_test Ranganath V N
@ 2025-10-06  7:43 ` Ranganath V N
  0 siblings, 0 replies; 2+ messages in thread
From: Ranganath V N @ 2025-10-06  7:43 UTC (permalink / raw)
  To: brauner, broonie, jlayton, shuah
  Cc: linux-kernel-mentees, linux-kernel, linux-kselftest

>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);

Hi Christian Brauner,

I just wanted to kindlyfollow up on this patch.
I'd appreicate any feedback or comments when you have chance.

Regards,
Rangaanth

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-06  7:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-19 10:49 [RESEND PATCH] selftests/filesystems: Fix build warning on anon_inode_test Ranganath V N
2025-10-06  7:43 ` [PATCH] " Ranganath V N

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox