From patchwork Tue Jan 18 11:29:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 12716228 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 081BCC433F5 for ; Tue, 18 Jan 2022 11:30:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 855496B0074; Tue, 18 Jan 2022 06:30:59 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 803946B0075; Tue, 18 Jan 2022 06:30:59 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6F2C66B0078; Tue, 18 Jan 2022 06:30:59 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0059.hostedemail.com [216.40.44.59]) by kanga.kvack.org (Postfix) with ESMTP id 61F2E6B0074 for ; Tue, 18 Jan 2022 06:30:59 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2184C181CA350 for ; Tue, 18 Jan 2022 11:30:59 +0000 (UTC) X-FDA: 79043191038.16.DC6E0CA Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf08.hostedemail.com (Postfix) with ESMTP id A1183160002 for ; Tue, 18 Jan 2022 11:30:58 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id D840D1F43E9D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642505457; bh=dpLad+4CdJOaMlTWmTiAawK1sEdubzbwv8rkOkH0hpM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EWk48EtaaPvtMZ6NV+gyXS9Eo6lBlAQ2vge/1BuKuobi8Pp1fJxCHAWAWcakXF6U/ 5fjTQd3jAAwsXK51uiAPDKasPaNsqbuE1zsmlkNHW55Dq1A+7FTDZZudZUlt3JLL9x Z2CFjQXSnfcpM51B7QrKwS/OQWzDBHZZW7jo243Cz1gXCoKwR2Ov11/izrwuYfUMf2 V94JNSMORMu7lwZe+bdZHz4p/cWoNbzhZgosq6SGA0JJmQ4myZ8sIPVyMZHe8yKOBJ 9j85yAnraTQ0GR7ZOTae5N1NEkBSA+VKK+gvvzi8zILKYRhg/yDSABZmXoixlYetES fP0UdH6ebqsrQ== From: Muhammad Usama Anjum To: Shuah Khan , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart , Davidlohr Bueso , =?utf-8?q?Andr=C3=A9_Almeida?= , Paolo Bonzini , =?utf-8?q?Micka=C3=ABl_Sala=C3=BCn?= , "David S. Miller" , Jakub Kicinski , Mat Martineau , Matthieu Baerts , Andrew Morton , chiminghao , linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK), linux-kernel@vger.kernel.org (open list), kvm@vger.kernel.org (open list:KERNEL VIRTUAL MACHINE (KVM)), linux-security-module@vger.kernel.org (open list:LANDLOCK SECURITY MODULE), netdev@vger.kernel.org (open list:NETWORKING [GENERAL]), mptcp@lists.linux.dev (open list:NETWORKING [MPTCP]), linux-mm@kvack.org (open list:MEMORY MANAGEMENT) Cc: Muhammad Usama Anjum , kernel@collabora.com Subject: [PATCH 02/10] selftests: Add and export a kernel uapi headers path Date: Tue, 18 Jan 2022 16:29:01 +0500 Message-Id: <20220118112909.1885705-3-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220118112909.1885705-1-usama.anjum@collabora.com> References: <20220118112909.1885705-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: A1183160002 X-Stat-Signature: 3ieuk5xik4ffa6jbh5ty754n4kznyzng Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=EWk48Eta; spf=pass (imf08.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-Rspamd-Server: rspam07 X-HE-Tag: 1642505458-505593 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: Kernel uapi headers can be present at different paths depending upon how the build was invoked. It becomes impossible for the tests to include the correct headers directory. Set and export KHDR_INCLUDES variable to make it possible for sub make files to include the header files. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index a7b63860b7bc..21f983dfd047 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -129,8 +129,11 @@ ifneq ($(KBUILD_OUTPUT),) # $(realpath ...) resolves symlinks abs_objtree := $(realpath $(abs_objtree)) BUILD := $(abs_objtree)/kselftest + KHDR_INCLUDES := -I${abs_objtree}/usr/include else BUILD := $(CURDIR) + abs_srctree := $(shell cd $(top_srcdir) && pwd) + KHDR_INCLUDES := -I${abs_srctree}/usr/include DEFAULT_INSTALL_HDR_PATH := 1 endif @@ -139,6 +142,7 @@ include $(top_srcdir)/scripts/subarch.include ARCH ?= $(SUBARCH) export KSFT_KHDR_INSTALL_DONE := 1 export BUILD +export KHDR_INCLUDES # set default goal to all, so make without a target runs all, even when # all isn't the first target in the file.