Skip to content

Commit ea46377

Browse files
selftests: Reorganize security test directories under security/
Consolidate security-related selftest directories into a unified security/ parent directory to improve test organization and maintainability. No functional changes to the tests themselves; this is purely a structural reorganization. Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
1 parent 26c1b70 commit ea46377

46 files changed

Lines changed: 21 additions & 20 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tools/testing/selftests/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ TARGETS += arm64
66
TARGETS += bpf
77
TARGETS += breakpoints
88
TARGETS += cachestat
9-
TARGETS += capabilities
109
TARGETS += cgroup
1110
TARGETS += clone3
1211
TARGETS += connector
@@ -51,11 +50,9 @@ TARGETS += kcmp
5150
TARGETS += kexec
5251
TARGETS += kselftest_harness
5352
TARGETS += kvm
54-
TARGETS += landlock
5553
TARGETS += lib
5654
TARGETS += livepatch
5755
TARGETS += lkdtm
58-
TARGETS += lsm
5956
TARGETS += membarrier
6057
TARGETS += memfd
6158
TARGETS += memory-hotplug
@@ -99,7 +96,11 @@ TARGETS += rseq
9996
TARGETS += rtc
10097
TARGETS += rust
10198
TARGETS += sched_ext
102-
TARGETS += seccomp
99+
TARGETS += security/capabilities
100+
TARGETS += security/landlock
101+
TARGETS += security/lsm
102+
TARGETS += security/safesetuid
103+
TARGETS += security/seccomp
103104
TARGETS += sgx
104105
TARGETS += signal
105106
TARGETS += size
File renamed without changes.

tools/testing/selftests/capabilities/Makefile renamed to tools/testing/selftests/security/capabilities/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ TEST_GEN_PROGS := test_execve
55
CFLAGS += -O2 -g -std=gnu99 -Wall $(KHDR_INCLUDES)
66
LDLIBS += -lcap-ng -lrt -ldl
77

8-
include ../lib.mk
8+
include ../../lib.mk
99

tools/testing/selftests/capabilities/test_execve.c renamed to tools/testing/selftests/security/capabilities/test_execve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <sys/prctl.h>
1919
#include <sys/stat.h>
2020

21-
#include "../kselftest.h"
21+
#include "../../kselftest.h"
2222

2323
static int nerrs;
2424
static pid_t mpid; /* main() pid is used to avoid duplicate test counts */

tools/testing/selftests/capabilities/validate_cap.c renamed to tools/testing/selftests/security/capabilities/validate_cap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <sys/prctl.h>
88
#include <sys/auxv.h>
99

10-
#include "../kselftest.h"
10+
#include "../../kselftest.h"
1111

1212
#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19)
1313
# define HAVE_GETAUXVAL
File renamed without changes.

tools/testing/selftests/landlock/Makefile renamed to tools/testing/selftests/security/landlock/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: GPL-2.0
22
#
3-
# First run: make -C ../../../.. headers_install
3+
# First run: make -C ../../../../.. headers_install
44

55
CFLAGS += -Wall -O2 $(KHDR_INCLUDES)
66

@@ -20,7 +20,7 @@ TEST_GEN_PROGS_EXTENDED := \
2020
$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread
2121
$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
2222

23-
include ../lib.mk
23+
include ../../lib.mk
2424

2525
# Targets with $(OUTPUT)/ prefix:
2626
$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread

tools/testing/selftests/landlock/audit.h renamed to tools/testing/selftests/security/landlock/audit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <sys/time.h>
2121
#include <unistd.h>
2222

23-
#include "../kselftest.h"
23+
#include "../../kselftest.h"
2424

2525
#ifndef ARRAY_SIZE
2626
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)