Commit f1227dc7 authored by Guillaume Tucker's avatar Guillaume Tucker Committed by Shuah Khan
Browse files

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: default avatarMickaël Salaün <mic@digikod.net>
Fixes: a917dd94 ("selftests/landlock: drop deprecated headers dependency")
Fixes: f2745dc0 ("selftests: stop using KSFT_KHDR_INSTALL")
Signed-off-by: default avatarGuillaume Tucker <guillaume.tucker@collabora.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 568035b0
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -9,10 +9,13 @@ TEST_GEN_PROGS := $(src_test:.c=)
TEST_GEN_PROGS_EXTENDED := true

OVERRIDE_TARGETS := 1
top_srcdir := ../../../..
include ../lib.mk

khdr_dir = $(top_srcdir)/usr/include

$(OUTPUT)/true: true.c
	$(LINK.c) $< $(LDLIBS) -o $@ -static

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