Skip to content

Commit

Permalink
selftests/landlock: fix broken include of linux/landlock.h
Browse files Browse the repository at this point in the history
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 <mic@digikod.net>
Fixes: a917dd9 ("selftests/landlock: drop deprecated headers dependency")
Fixes: f2745dc ("selftests: stop using KSFT_KHDR_INSTALL")
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
  • Loading branch information
Guillaume Tucker authored and Shuah Khan committed Aug 15, 2022
1 parent 568035b commit f1227dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/testing/selftests/landlock/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit f1227dc

Please sign in to comment.