From patchwork Tue Jan 18 11:28:59 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: 12716226 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 5C6D7C433EF for ; Tue, 18 Jan 2022 11:30:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E47F66B0072; Tue, 18 Jan 2022 06:30:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DF72A6B0073; Tue, 18 Jan 2022 06:30:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE6536B0074; Tue, 18 Jan 2022 06:30:39 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0029.hostedemail.com [216.40.44.29]) by kanga.kvack.org (Postfix) with ESMTP id BFB176B0072 for ; Tue, 18 Jan 2022 06:30:39 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 74767824C420 for ; Tue, 18 Jan 2022 11:30:39 +0000 (UTC) X-FDA: 79043190198.24.F55B86C Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf14.hostedemail.com (Postfix) with ESMTP id 9792810000A for ; Tue, 18 Jan 2022 11:30:38 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id AB34C1F43D80 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642505437; bh=kufMAm/Wj7x6dHVgPDUeMEIq4cSzNUAHqpKv5RBtfqA=; h=From:To:Cc:Subject:Date:From; b=C33nW21CxUr8A/lfefxHALgekm+lwm2zEx8Ka923Q5wBad9MKwb1Pt/OJnFd2+OuB q+yY/27655wkmswBdVwEfZmhxhlUHW5rxIeIg/RrPGhNG8cBRVLzCxLDAXIY9X1+nb S/v5i9xsCw+FWX909Qxv9be0n0/AcvdIAgf1COCymXW5VqMp5vDVcIs1GqPtwZG8HK I3EL70KqLGNkhwGDpzGN5kOcT77gDWobyEAr4DtaN/NE5G4+4rAIAWDr0gcACuryfE iZEzQjIPcd/ro4WInQOt+Vvm5aW6QtlLOd5NveR6EvNMvqAIfZfodbM7R4QxNnUVHt 6mUTXEk1gKFIg== 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 00/10] selftests: Fix separate output directory builds Date: Tue, 18 Jan 2022 16:28:59 +0500 Message-Id: <20220118112909.1885705-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Rspamd-Queue-Id: 9792810000A X-Stat-Signature: ji69jkkibpr1c75hsur1dboecoc7mrgb Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=C33nW21C; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf14.hostedemail.com: domain of usama.anjum@collabora.com designates 46.235.227.227 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com X-Rspamd-Server: rspam02 X-HE-Tag: 1642505438-914875 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000020, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Build of several selftests fail if separate output directory is specified by the following methods: 1) make -C tools/testing/selftests O= 2) export KBUILD_OUTPUT="build_dir"; make -C tools/testing/selftests Build fails because of several reasons: 1) The kernel headers aren't found. 2) The path of output objects is wrong and hence unaccessible. These problems can be solved by: 1) Including the correct path of uapi header files 2) By setting the BUILD variable correctly inside Makefile Following different build scnerios have been tested after making these changes: make -C tools/testing/selftests make -C tools/testing/selftests O=build make -C tools/testing/selftests o=/opt/build export KBUILD_OUTPUT="/opt/build"; make -C tools/testing/selftests export KBUILD_OUTPUT="build"; make -C tools/testing/selftests cd ; make -C /tools/testing/selftests cd ; make -C /tools/testing/selftests O=build Muhammad Usama Anjum (10): selftests: set the BUILD variable to absolute path selftests: Add and export a kernel uapi headers path selftests: Correct the headers install path selftests: futex: Add the uapi headers include variable selftests: kvm: Add the uapi headers include variable selftests: landlock: Add the uapi headers include variable selftests: net: Add the uapi headers include variable selftests: mptcp: Add the uapi headers include variable selftests: vm: Add the uapi headers include variable selftests: vm: remove dependecy from internal kernel macros tools/testing/selftests/Makefile | 32 +++++++++++++------ .../selftests/futex/functional/Makefile | 5 ++- tools/testing/selftests/kvm/Makefile | 6 ++-- tools/testing/selftests/landlock/Makefile | 11 ++----- tools/testing/selftests/net/Makefile | 2 +- tools/testing/selftests/net/mptcp/Makefile | 3 +- tools/testing/selftests/vm/Makefile | 2 +- tools/testing/selftests/vm/userfaultfd.c | 3 ++ 8 files changed, 35 insertions(+), 29 deletions(-)