From: Kees Cook <kees@kernel.org>
To: Al Viro <viro@zeniv.linux.org.uk>, David Gow <davidgow@google.com>
Cc: Kees Cook <kees@kernel.org>, SeongJae Park <sj@kernel.org>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Eric Biederman <ebiederm@xmission.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: [PATCH v2] execve: Move KUnit tests to tests/ subdirectory
Date: Sat, 20 Jul 2024 10:03:14 -0700 [thread overview]
Message-ID: <20240720170310.it.942-kees@kernel.org> (raw)
Move the exec KUnit tests into a separate directory to avoid polluting
the local directory namespace. Additionally update MAINTAINERS for the
new files and mark myself as Maintainer.
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Kees Cook <kees@kernel.org>
---
v1: https://lore.kernel.org/lkml/20240717212230.work.346-kees@kernel.org/
v2: file suffix changed to _kunit instead of _test
I'll toss this into -next and send it to Linus before -rc1 closes.
---
Cc: David Gow <davidgow@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-mm@kvack.org
---
MAINTAINERS | 5 +++--
fs/binfmt_elf.c | 2 +-
fs/exec.c | 2 +-
fs/{binfmt_elf_test.c => tests/binfmt_elf_kunit.c} | 0
fs/{exec_test.c => tests/exec_kunit.c} | 0
5 files changed, 5 insertions(+), 4 deletions(-)
rename fs/{binfmt_elf_test.c => tests/binfmt_elf_kunit.c} (100%)
rename fs/{exec_test.c => tests/exec_kunit.c} (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 8dfbe998f175..396bd1f1e4b9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8211,8 +8211,8 @@ S: Maintained
F: rust/kernel/net/phy.rs
EXEC & BINFMT API, ELF
+M: Kees Cook <keescook@chromium.org>
R: Eric Biederman <ebiederm@xmission.com>
-R: Kees Cook <keescook@chromium.org>
L: linux-mm@kvack.org
S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/execve
@@ -8220,7 +8220,8 @@ F: Documentation/userspace-api/ELF.rst
F: fs/*binfmt_*.c
F: fs/Kconfig.binfmt
F: fs/exec.c
-F: fs/exec_test.c
+F: fs/tests/binfmt_*_kunit.c
+F: fs/tests/exec_kunit.c
F: include/linux/binfmts.h
F: include/linux/elf.h
F: include/uapi/linux/binfmts.h
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 40111451aa95..04e748c5955f 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -2152,5 +2152,5 @@ core_initcall(init_elf_binfmt);
module_exit(exit_elf_binfmt);
#ifdef CONFIG_BINFMT_ELF_KUNIT_TEST
-#include "binfmt_elf_test.c"
+#include "tests/binfmt_elf_kunit.c"
#endif
diff --git a/fs/exec.c b/fs/exec.c
index 5b580ff8d955..32d6537ece07 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -2244,5 +2244,5 @@ fs_initcall(init_fs_exec_sysctls);
#endif /* CONFIG_SYSCTL */
#ifdef CONFIG_EXEC_KUNIT_TEST
-#include "exec_test.c"
+#include "tests/exec_kunit.c"
#endif
diff --git a/fs/binfmt_elf_test.c b/fs/tests/binfmt_elf_kunit.c
similarity index 100%
rename from fs/binfmt_elf_test.c
rename to fs/tests/binfmt_elf_kunit.c
diff --git a/fs/exec_test.c b/fs/tests/exec_kunit.c
similarity index 100%
rename from fs/exec_test.c
rename to fs/tests/exec_kunit.c
--
2.34.1
next reply other threads:[~2024-07-20 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 17:03 Kees Cook [this message]
2024-07-22 7:35 ` [PATCH v2] execve: Move KUnit tests to tests/ subdirectory Christian Brauner
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=20240720170310.it.942-kees@kernel.org \
--to=kees@kernel.org \
--cc=brauner@kernel.org \
--cc=davidgow@google.com \
--cc=ebiederm@xmission.com \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.