From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 564F0C433F5 for ; Tue, 18 Jan 2022 13:19:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 787976B0072; Tue, 18 Jan 2022 08:19:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 737F16B0073; Tue, 18 Jan 2022 08:19:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D8A26B0074; Tue, 18 Jan 2022 08:19:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id 4BBA46B0072 for ; Tue, 18 Jan 2022 08:19:18 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id ECA78181DA56B for ; Tue, 18 Jan 2022 13:19:17 +0000 (UTC) X-FDA: 79043463954.25.C3F5091 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf13.hostedemail.com (Postfix) with ESMTP id 8D8CE2002A for ; Tue, 18 Jan 2022 13:19:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 283A01F43568 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642511949; bh=NnA8DF5nv67Abok07B1FDD4ZaMq6Cy3stGYg/JYq7G0=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=gOOtBoB+LqcCGqcgcyaKvqu7qG58u5YJiGrs4xSCpwjbLSoAmu8d+ghKU2xzdrjGL csHm1zQ4M9Wc1QqBiTxySkXIRBRsukryioI8Rf7kmqWuBU5sPYRtaI078IAg6rECbj D0gSKpSnJE+wtTS6FKb9dGrhhjeSNSmKcI4rnGjdh56Eh3xAe8AOwK0B6pbhDNtkfH 4eUo0EBztcjo8Q7PvxJkf+3GUsCh7aiMJ49lTs1VYa3O+u/EVWLjGpvw4FLpQb3/8S pg1o3CQba6wq9aviWjsg+dSN1rYUlNPGRE0vNwYjm+9EauBsD47BsSEwipQfRVWuh7 YyZXm6BLQxY/g== Message-ID: Date: Tue, 18 Jan 2022 18:18:59 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Cc: usama.anjum@collabora.com, kernel@collabora.com Subject: Re: [PATCH 06/10] selftests: landlock: Add the uapi headers include variable Content-Language: en-US To: =?UTF-8?Q?Micka=c3=abl_Sala=c3=bcn?= , Shuah Khan , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?UTF-8?Q?Andr=c3=a9_Almeida?= , Paolo Bonzini , "David S. Miller" , Jakub Kicinski , Mat Martineau , Matthieu Baerts , Andrew Morton , chiminghao , "open list:KERNEL SELFTEST FRAMEWORK" , open list , "open list:KERNEL VIRTUAL MACHINE (KVM)" , "open list:LANDLOCK SECURITY MODULE" , "open list:NETWORKING [GENERAL]" , "open list:NETWORKING [MPTCP]" , "open list:MEMORY MANAGEMENT" References: <20220118112909.1885705-1-usama.anjum@collabora.com> <20220118112909.1885705-7-usama.anjum@collabora.com> <8ea3bd61-8251-a5b6-c0b4-6d15bac4d2c5@digikod.net> From: Muhammad Usama Anjum In-Reply-To: <8ea3bd61-8251-a5b6-c0b4-6d15bac4d2c5@digikod.net> Content-Type: text/plain; charset=UTF-8 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 8D8CE2002A X-Stat-Signature: 7j77j5wrrkryoq9o63shhzem5nd6nxny Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=gOOtBoB+; spf=pass (imf13.hostedemail.com: domain of usama.anjum@collabora.com designates 46.235.227.227 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com; dmarc=pass (policy=none) header.from=collabora.com X-HE-Tag: 1642511951-156967 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 1/18/22 5:35 PM, Micka=C3=ABl Sala=C3=BCn wrote: >=20 > On 18/01/2022 12:29, Muhammad Usama Anjum wrote: >> Out of tree build of this test fails if relative path of the output >> directory is specified. Remove the un-needed include paths and use >> KHDR_INCLUDES to correctly reach the headers. >> >> Signed-off-by: Muhammad Usama Anjum >> --- >> =C2=A0 tools/testing/selftests/landlock/Makefile | 11 +++-------- >> =C2=A0 1 file changed, 3 insertions(+), 8 deletions(-) >> >> diff --git a/tools/testing/selftests/landlock/Makefile >> b/tools/testing/selftests/landlock/Makefile >> index a99596ca9882..44c724b38a37 100644 >> --- a/tools/testing/selftests/landlock/Makefile >> +++ b/tools/testing/selftests/landlock/Makefile >> @@ -1,6 +1,6 @@ >> =C2=A0 # SPDX-License-Identifier: GPL-2.0 >> =C2=A0 -CFLAGS +=3D -Wall -O2 >> +CFLAGS +=3D -Wall -O2 $(KHDR_INCLUDES) >> =C2=A0 =C2=A0 src_test :=3D $(wildcard *_test.c) >> =C2=A0 @@ -12,13 +12,8 @@ KSFT_KHDR_INSTALL :=3D 1 >> =C2=A0 OVERRIDE_TARGETS :=3D 1 >> =C2=A0 include ../lib.mk >> =C2=A0 -khdr_dir =3D $(top_srcdir)/usr/include >=20 > This should be updated to: > khdr_dir =3D ${abs_srctree}/usr/include >=20 > Using a global KHDR_DIR instead of khdr_dir could be useful for others = too. >=20 >> - >> -$(khdr_dir)/linux/landlock.h: khdr >> -=C2=A0=C2=A0=C2=A0 @: >=20 > This should be kept as is, otherwise we loose this check to rebuild the > headers if linux/landlock.h is updated, which is handy for development. > KVM lost a similar behavior with this patch series. >=20 >> - >> =C2=A0 $(OUTPUT)/true: true.c >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 $(LINK.c) $< $(LDLIBS) -o $@ -static >> =C2=A0 -$(OUTPUT)/%_test: %_test.c $(khdr_dir)/linux/landlock.h >> ../kselftest_harness.h common.h >=20 > This should not be changed. >=20 >> -=C2=A0=C2=A0=C2=A0 $(LINK.c) $< $(LDLIBS) -o $@ -lcap -I$(khdr_dir) >> +$(OUTPUT)/%_test: %_test.c ../kselftest_harness.h common.h >> +=C2=A0=C2=A0=C2=A0 $(LINK.c) $< $(LDLIBS) -o $@ -lcap >=20 > This doesn't work when building in the local directory because > $abs_srctree and $KHDR_INCLUDES are empty: > cd tools/testing/selftests/landlock && make Hi, Thank you. I'll update this path and the kvm one. I'll send a V2. Thanks, Usama