* [PATCH] execve: Move KUnit tests to tests/ subdirectory
@ 2024-07-17 21:22 Kees Cook
2024-07-18 6:04 ` David Gow
0 siblings, 1 reply; 3+ messages in thread
From: Kees Cook @ 2024-07-17 21:22 UTC (permalink / raw)
To: Al Viro
Cc: Kees Cook, Christian Brauner, Jan Kara, Eric Biederman, David Gow,
Linus Torvalds, linux-fsdevel, linux-mm, linux-kernel,
linux-hardening
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.
Signed-off-by: Kees Cook <kees@kernel.org>
---
I'll toss this into -next and send it to Linus before -rc1 closes.
---
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: David Gow <davidgow@google.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/{ => tests}/binfmt_elf_test.c | 0
fs/{ => tests}/exec_test.c | 0
5 files changed, 5 insertions(+), 4 deletions(-)
rename fs/{ => tests}/binfmt_elf_test.c (100%)
rename fs/{ => tests}/exec_test.c (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 8dfbe998f175..35474718c05b 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_*_test.c
+F: fs/tests/exec_test.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..1a032811b304 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_test.c"
#endif
diff --git a/fs/exec.c b/fs/exec.c
index 5b580ff8d955..5a59063c50b1 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_test.c"
#endif
diff --git a/fs/binfmt_elf_test.c b/fs/tests/binfmt_elf_test.c
similarity index 100%
rename from fs/binfmt_elf_test.c
rename to fs/tests/binfmt_elf_test.c
diff --git a/fs/exec_test.c b/fs/tests/exec_test.c
similarity index 100%
rename from fs/exec_test.c
rename to fs/tests/exec_test.c
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] execve: Move KUnit tests to tests/ subdirectory
2024-07-17 21:22 [PATCH] execve: Move KUnit tests to tests/ subdirectory Kees Cook
@ 2024-07-18 6:04 ` David Gow
2024-07-18 17:46 ` SeongJae Park
0 siblings, 1 reply; 3+ messages in thread
From: David Gow @ 2024-07-18 6:04 UTC (permalink / raw)
To: Kees Cook
Cc: Al Viro, Christian Brauner, Jan Kara, Eric Biederman,
Linus Torvalds, linux-fsdevel, linux-mm, linux-kernel,
linux-hardening
On Thu, 18 Jul 2024 at 05:22, Kees Cook <kees@kernel.org> wrote:
>
> 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.
>
> Signed-off-by: Kees Cook <kees@kernel.org>
> ---
> I'll toss this into -next and send it to Linus before -rc1 closes.
> ---
With s/_test/_kunit (once the docs changes are sorted), this looks good.
Reviewed-by: David Gow <davidgow@google.com>
Cheers,
-- David
> 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: David Gow <davidgow@google.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/{ => tests}/binfmt_elf_test.c | 0
> fs/{ => tests}/exec_test.c | 0
> 5 files changed, 5 insertions(+), 4 deletions(-)
> rename fs/{ => tests}/binfmt_elf_test.c (100%)
> rename fs/{ => tests}/exec_test.c (100%)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 8dfbe998f175..35474718c05b 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_*_test.c
> +F: fs/tests/exec_test.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..1a032811b304 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_test.c"
> #endif
> diff --git a/fs/exec.c b/fs/exec.c
> index 5b580ff8d955..5a59063c50b1 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_test.c"
> #endif
> diff --git a/fs/binfmt_elf_test.c b/fs/tests/binfmt_elf_test.c
> similarity index 100%
> rename from fs/binfmt_elf_test.c
> rename to fs/tests/binfmt_elf_test.c
> diff --git a/fs/exec_test.c b/fs/tests/exec_test.c
> similarity index 100%
> rename from fs/exec_test.c
> rename to fs/tests/exec_test.c
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] execve: Move KUnit tests to tests/ subdirectory
2024-07-18 6:04 ` David Gow
@ 2024-07-18 17:46 ` SeongJae Park
0 siblings, 0 replies; 3+ messages in thread
From: SeongJae Park @ 2024-07-18 17:46 UTC (permalink / raw)
To: David Gow
Cc: SeongJae Park, Kees Cook, Al Viro, Christian Brauner, Jan Kara,
Eric Biederman, Linus Torvalds, linux-fsdevel, linux-mm,
linux-kernel, linux-hardening
On Thu, 18 Jul 2024 14:04:14 +0800 David Gow <davidgow@google.com> wrote:
> On Thu, 18 Jul 2024 at 05:22, Kees Cook <kees@kernel.org> wrote:
> >
> > 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.
> >
> > Signed-off-by: Kees Cook <kees@kernel.org>
> > ---
> > I'll toss this into -next and send it to Linus before -rc1 closes.
> > ---
>
> With s/_test/_kunit (once the docs changes are sorted), this looks good.
I have no strong opinion, but I agree to David's rationale [1] on preferrence
of _kunit overall, and would prefer having a consistent and simple rule.
[1] https://lore.kernel.org/CABVgOS=B29PcKyhVXtTk47k_BhjSaoxL8eF15fVhzty_0syeSQ@mail.gmail.com
>
> Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-18 17:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-17 21:22 [PATCH] execve: Move KUnit tests to tests/ subdirectory Kees Cook
2024-07-18 6:04 ` David Gow
2024-07-18 17:46 ` SeongJae Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).