Skip to content

Commit 21bffcb

Browse files
SherryYang1shuahkh
authored andcommitted
selftests/seccomp: Fix seccomp failure by adding missing headers
seccomp_bpf failed on tests 47 global.user_notification_filter_empty and 48 global.user_notification_filter_empty_threaded when it's tested on updated kernel but with old kernel headers. Because old kernel headers don't have definition of macro __NR_clone3 which is required for these two tests. Since under selftests/, we can install headers once for all tests (the default INSTALL_HDR_PATH is usr/include), fix it by adding usr/include to the list of directories to be searched. Use "-isystem" to indicate it's a system directory as the real kernel headers directories are. Signed-off-by: Sherry Yang <sherry.yang@oracle.com> Tested-by: Sherry Yang <sherry.yang@oracle.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent a7e793a commit 21bffcb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/seccomp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: GPL-2.0
2-
CFLAGS += -Wl,-no-as-needed -Wall
2+
CFLAGS += -Wl,-no-as-needed -Wall -isystem ../../../../usr/include/
33
LDFLAGS += -lpthread
44

55
TEST_GEN_PROGS := seccomp_bpf seccomp_benchmark

0 commit comments

Comments
 (0)