Skip to content

Commit f1227dc

Browse files
gctuckershuahkh
authored andcommitted
selftests/landlock: fix broken include of linux/landlock.h
Revert part of the earlier changes to fix the kselftest build when using a sub-directory from the top of the tree as this broke the landlock test build as a side-effect when building with "make -C tools/testing/selftests/landlock". Reported-by: Mickaël Salaün <[email protected]> Fixes: a917dd9 ("selftests/landlock: drop deprecated headers dependency") Fixes: f2745dc ("selftests: stop using KSFT_KHDR_INSTALL") Signed-off-by: Guillaume Tucker <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
1 parent 568035b commit f1227dc

File tree

1 file changed

+5
-2
lines changed
  • tools/testing/selftests/landlock

1 file changed

+5
-2
lines changed

tools/testing/selftests/landlock/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ TEST_GEN_PROGS := $(src_test:.c=)
99
TEST_GEN_PROGS_EXTENDED := true
1010

1111
OVERRIDE_TARGETS := 1
12+
top_srcdir := ../../../..
1213
include ../lib.mk
1314

15+
khdr_dir = $(top_srcdir)/usr/include
16+
1417
$(OUTPUT)/true: true.c
1518
$(LINK.c) $< $(LDLIBS) -o $@ -static
1619

17-
$(OUTPUT)/%_test: %_test.c ../kselftest_harness.h common.h
18-
$(LINK.c) $< $(LDLIBS) -o $@ -lcap
20+
$(OUTPUT)/%_test: %_test.c $(khdr_dir)/linux/landlock.h ../kselftest_harness.h common.h
21+
$(LINK.c) $< $(LDLIBS) -o $@ -lcap -I$(khdr_dir)

0 commit comments

Comments
 (0)