linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/landlock: fix broken include of linux/landlock.h
@ 2022-08-03 20:13 Guillaume Tucker
  2022-08-03 23:08 ` Shuah Khan
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Guillaume Tucker @ 2022-08-03 20:13 UTC (permalink / raw)
  To: Guillaume, Shuah Khan, Mickaël Salaün
  Cc: Anders Roxell, Tim.Bird, kernel, linux-kernel, linux-kselftest,
	linux-security-module

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: a917dd94b832 ("selftests/landlock: drop deprecated headers dependency")
Fixes: f2745dc0ba3d ("selftests: stop using KSFT_KHDR_INSTALL")
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
---
 tools/testing/selftests/landlock/Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/landlock/Makefile b/tools/testing/selftests/landlock/Makefile
index a6959df28eb0..02868ac3bc71 100644
--- a/tools/testing/selftests/landlock/Makefile
+++ b/tools/testing/selftests/landlock/Makefile
@@ -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)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-08-25  9:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 20:13 [PATCH] selftests/landlock: fix broken include of linux/landlock.h Guillaume Tucker
2022-08-03 23:08 ` Shuah Khan
2022-08-04 10:36 ` Mickaël Salaün
2022-08-04 19:38   ` Guillaume Tucker
2022-08-05 17:16     ` Mickaël Salaün
2022-08-12 15:29       ` Mickaël Salaün
2022-08-15 17:17         ` Shuah Khan
2022-08-16 16:57           ` Mickaël Salaün
2022-08-13 10:01 ` Anders Roxell
2022-08-13 12:31   ` Mickaël Salaün
2022-08-22 14:00     ` Anders Roxell
2022-08-25  9:31       ` Mickaël Salaün

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).