summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2024-07-20 20:03:14 +0300
committerKees Cook <kees@kernel.org>2024-07-23 04:25:47 +0300
commitb6f5ee4d53019443fb99dd23bc08680b1244ccfa (patch)
treeafaaac60d7987c758ed562e6be3a848ddf26c718
parent21f93108306026b8066db31c24a097192c8c36c7 (diff)
downloadlinux-b6f5ee4d53019443fb99dd23bc08680b1244ccfa.tar.xz
execve: Move KUnit tests to tests/ subdirectory
Move the exec KUnit tests into a separate directory to avoid polluting the local directory namespace. Additionally update MAINTAINERS for the new files. Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: SeongJae Park <sj@kernel.org> Acked-by: Christian Brauner <brauner@kernel.org> Link: https://lore.kernel.org/r/20240720170310.it.942-kees@kernel.org Signed-off-by: Kees Cook <kees@kernel.org>
-rw-r--r--MAINTAINERS3
-rw-r--r--fs/binfmt_elf.c2
-rw-r--r--fs/exec.c2
-rw-r--r--fs/tests/binfmt_elf_kunit.c (renamed from fs/binfmt_elf_test.c)0
-rw-r--r--fs/tests/exec_kunit.c (renamed from fs/exec_test.c)0
5 files changed, 4 insertions, 3 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 8dfbe998f175..5fa7e129a59e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -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
index 11d734fec366..11d734fec366 100644
--- a/fs/binfmt_elf_test.c
+++ b/fs/tests/binfmt_elf_kunit.c
diff --git a/fs/exec_test.c b/fs/tests/exec_kunit.c
index 7c77d039680b..7c77d039680b 100644
--- a/fs/exec_test.c
+++ b/fs/tests/exec_kunit.c