[PATCH v2 1/4] selftests: move openat2 tests to selftests/filesystems/

Aleksa Sarai posted 4 patches 9 hours ago
[PATCH v2 1/4] selftests: move openat2 tests to selftests/filesystems/
Posted by Aleksa Sarai 9 hours ago
These tests really should've always belonged there, doubly so now that
they include a lot of other generic filesystem-related tests.

Suggested-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Aleksa Sarai <aleksa@amutable.com>
---
 tools/testing/selftests/{ => filesystems}/openat2/.gitignore           | 0
 tools/testing/selftests/{ => filesystems}/openat2/Makefile             | 3 ++-
 tools/testing/selftests/{ => filesystems}/openat2/helpers.c            | 0
 tools/testing/selftests/{ => filesystems}/openat2/helpers.h            | 0
 tools/testing/selftests/{ => filesystems}/openat2/openat2_test.c       | 0
 tools/testing/selftests/{ => filesystems}/openat2/rename_attack_test.c | 0
 tools/testing/selftests/{ => filesystems}/openat2/resolve_test.c       | 0
 7 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/openat2/.gitignore b/tools/testing/selftests/filesystems/openat2/.gitignore
similarity index 100%
rename from tools/testing/selftests/openat2/.gitignore
rename to tools/testing/selftests/filesystems/openat2/.gitignore
diff --git a/tools/testing/selftests/openat2/Makefile b/tools/testing/selftests/filesystems/openat2/Makefile
similarity index 91%
rename from tools/testing/selftests/openat2/Makefile
rename to tools/testing/selftests/filesystems/openat2/Makefile
index 185dc76ebb5f..f36dedccedb6 100644
--- a/tools/testing/selftests/openat2/Makefile
+++ b/tools/testing/selftests/filesystems/openat2/Makefile
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 
+CFLAGS += $(KHDR_INCLUDES)
 CFLAGS += -Wall -O2 -g -fsanitize=address -fsanitize=undefined
 TEST_GEN_PROGS := openat2_test resolve_test rename_attack_test
 
@@ -13,6 +14,6 @@ endif
 
 LOCAL_HDRS += helpers.h
 
-include ../lib.mk
+include ../../lib.mk
 
 $(TEST_GEN_PROGS): helpers.c
diff --git a/tools/testing/selftests/openat2/helpers.c b/tools/testing/selftests/filesystems/openat2/helpers.c
similarity index 100%
rename from tools/testing/selftests/openat2/helpers.c
rename to tools/testing/selftests/filesystems/openat2/helpers.c
diff --git a/tools/testing/selftests/openat2/helpers.h b/tools/testing/selftests/filesystems/openat2/helpers.h
similarity index 100%
rename from tools/testing/selftests/openat2/helpers.h
rename to tools/testing/selftests/filesystems/openat2/helpers.h
diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/filesystems/openat2/openat2_test.c
similarity index 100%
rename from tools/testing/selftests/openat2/openat2_test.c
rename to tools/testing/selftests/filesystems/openat2/openat2_test.c
diff --git a/tools/testing/selftests/openat2/rename_attack_test.c b/tools/testing/selftests/filesystems/openat2/rename_attack_test.c
similarity index 100%
rename from tools/testing/selftests/openat2/rename_attack_test.c
rename to tools/testing/selftests/filesystems/openat2/rename_attack_test.c
diff --git a/tools/testing/selftests/openat2/resolve_test.c b/tools/testing/selftests/filesystems/openat2/resolve_test.c
similarity index 100%
rename from tools/testing/selftests/openat2/resolve_test.c
rename to tools/testing/selftests/filesystems/openat2/resolve_test.c

-- 
2.53.0