From patchwork Wed Jan 19 10:15:22 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: 12717396 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 26CDEC433EF for ; Wed, 19 Jan 2022 10:15:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6E7E06B0073; Wed, 19 Jan 2022 05:15:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 670C36B0074; Wed, 19 Jan 2022 05:15:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4EAEB6B0075; Wed, 19 Jan 2022 05:15:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id 417D56B0073 for ; Wed, 19 Jan 2022 05:15:58 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 02C1B18195418 for ; Wed, 19 Jan 2022 10:15:58 +0000 (UTC) X-FDA: 79046630796.12.3B5DF5D Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf31.hostedemail.com (Postfix) with ESMTP id 8E48520054 for ; Wed, 19 Jan 2022 10:15:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 4AD4A1F4442B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587356; bh=gjVHu+jWyShCzwYH7u0I9MtX/la4ZTeWCA5VgFyOCk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WmPQKScNKXIubsHhUPQ0UWTMbZea42T4UR9/BPGN2ahBB8XcJiVrhQIYF6BZ5hlX0 q8gp7LUxCSQFElIffyo0lDWVGD/zC2KBugbqEh1TcLrlatMGeZfU8rimVe4dL/fbcX 6s9z2ZfRvciZcnZtAIaztjLlNW7+HElw+ZF++XYNpZYCnprNkUvvOJXvFUMri1oVTL c60tiiXFIJwZbREPLPZA6Wqzrnm+ezgrofEvBRqJOEVHxoMBzoDDzHdIvnljxq7UW1 YscwBUloUa1M8a5eTGAa8VhR0L/h5p9Vazp/3TXlZknKFvePVk6yZDZl7g0bc1CdND Xb+nwl8+gV8YA== 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 V2 01/10] selftests: set the BUILD variable to absolute path Date: Wed, 19 Jan 2022 15:15:22 +0500 Message-Id: <20220119101531.2850400-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 8E48520054 X-Stat-Signature: 6jcz954rughkgnqynzbo51rpqqg5z3gy Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=WmPQKScN; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf31.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: rspam06 X-HE-Tag: 1642587357-141576 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000009, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The build of kselftests fails if relative path is specified through KBUILD_OUTPUT or O= method. BUILD variable is used to determine the path of the output objects. When make is run from other directories with relative paths, the exact path of the build objects is ambiguous and build fails. make[1]: Entering directory '/home/usama/repos/kernel/linux_mainline2/tools/testing/selftests/alsa' gcc mixer-test.c -L/usr/lib/x86_64-linux-gnu -lasound -o build/kselftest/alsa/mixer-test /usr/bin/ld: cannot open output file build/kselftest/alsa/mixer-test Set the BUILD variable to the absolute path of the output directory. Make the logic readable and easy to follow. Use spaces instead of tabs for indentation as if with tab indentation is considered recipe in make. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/Makefile | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index d08fe4cfe811..a7b63860b7bc 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -114,19 +114,27 @@ ifdef building_out_of_srctree override LDFLAGS = endif -ifneq ($(O),) - BUILD := $(O)/kselftest +top_srcdir ?= ../../.. + +ifeq ("$(origin O)", "command line") + KBUILD_OUTPUT := $(O) +endif + +ifneq ($(KBUILD_OUTPUT),) + # Make's built-in functions such as $(abspath ...), $(realpath ...) cannot + # expand a shell special character '~'. We use a somewhat tedious way here. + abs_objtree := $(shell cd $(top_srcdir) && mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) && pwd) + $(if $(abs_objtree),, \ + $(error failed to create output directory "$(KBUILD_OUTPUT)")) + # $(realpath ...) resolves symlinks + abs_objtree := $(realpath $(abs_objtree)) + BUILD := $(abs_objtree)/kselftest else - ifneq ($(KBUILD_OUTPUT),) - BUILD := $(KBUILD_OUTPUT)/kselftest - else - BUILD := $(shell pwd) - DEFAULT_INSTALL_HDR_PATH := 1 - endif + BUILD := $(CURDIR) + DEFAULT_INSTALL_HDR_PATH := 1 endif # Prepare for headers install -top_srcdir ?= ../../.. include $(top_srcdir)/scripts/subarch.include ARCH ?= $(SUBARCH) export KSFT_KHDR_INSTALL_DONE := 1 From patchwork Wed Jan 19 10:15:23 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: 12717397 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 7D1ADC43219 for ; Wed, 19 Jan 2022 10:16:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0A48A6B0074; Wed, 19 Jan 2022 05:16:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 054FB6B0075; Wed, 19 Jan 2022 05:16:06 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EAD9A6B0078; Wed, 19 Jan 2022 05:16:06 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0137.hostedemail.com [216.40.44.137]) by kanga.kvack.org (Postfix) with ESMTP id DCA146B0074 for ; Wed, 19 Jan 2022 05:16:06 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 9A3F793D97 for ; Wed, 19 Jan 2022 10:16:06 +0000 (UTC) X-FDA: 79046631132.18.A6DF54A Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf01.hostedemail.com (Postfix) with ESMTP id A14DA40008 for ; Wed, 19 Jan 2022 10:16:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 2D8DE1F4442D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587364; bh=dpLad+4CdJOaMlTWmTiAawK1sEdubzbwv8rkOkH0hpM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X94KRF9XESjNH/MFzgeFityMIjUQybaERD8qsUFghk8zoDhqkES3+vIeeTefMBTlR wSPtHkYEQg6WOxXZCIux4337NUprYwMy2nj4sUfAExaH0OxLP/w+mXgYq12JLzlpQh TU/GM0DHMnSz+pgkV41s59PcN74BrMCdighGngQrGotdJgpfq25+X3F8zQJ3LH6mj5 lBvfCYNhVpJmpc4yqz/w7xfd5sMdbwqZnbz5Tff9Jc8tTIIpHSE5xblpi/M08aGPpS nFELH7jgSeMGywoqv7n2Qp+eLH1vtTZpw9JCEMyBzMjq/Udx7ZlRgRI3j3x1MlXZ5O 1zZvb7mg3Y2Ww== 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 V2 02/10] selftests: Add and export a kernel uapi headers path Date: Wed, 19 Jan 2022 15:15:23 +0500 Message-Id: <20220119101531.2850400-3-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: A14DA40008 X-Stat-Signature: b59gch8s3tq7jtohiwjjf19c6q3z5i7p Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=X94KRF9X; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf01.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: rspam03 X-HE-Tag: 1642587365-781394 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. From patchwork Wed Jan 19 10:15:24 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: 12717398 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 2210AC433F5 for ; Wed, 19 Jan 2022 10:16:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B53A26B0075; Wed, 19 Jan 2022 05:16:12 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B02CD6B0078; Wed, 19 Jan 2022 05:16:12 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9F2876B007B; Wed, 19 Jan 2022 05:16:12 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0067.hostedemail.com [216.40.44.67]) by kanga.kvack.org (Postfix) with ESMTP id 91A936B0075 for ; Wed, 19 Jan 2022 05:16:12 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4EE94818FC0C for ; Wed, 19 Jan 2022 10:16:12 +0000 (UTC) X-FDA: 79046631384.30.70620DF Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf07.hostedemail.com (Postfix) with ESMTP id E4EFF40048 for ; Wed, 19 Jan 2022 10:16:11 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 402341F44433 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587370; bh=FL5woJicBxOM7EavfZYCVa1miYOdVihihV/Qs6cofek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CdcJQjDu26wN05TdI8aYqDCOAiBNtH5/rqq3AvUDfM/L3bx1ENivnFE7r3oAcKiCf HumKgq3sxh7XKgFh6WdF1mxSUEBO9JZW89fe692/LL/+zQNEEUUv4qGLMdAvXiMJag 8oXHnozTxvO1TqGyQIdX2pJpNZYcFUyhGGtUjw40OaGVzIRV7qAsZPpW6wrBp2we6+ c4u57vBgek39Os8388zV9iqvzCQYbMbVgWoU/0YfXFa0a/NT2zZAS+oKZst3Nf4cDw vmTWzVcbfXYs+BaOkcSGosPDK/sIqZrwnM+xpxSj7SKfRyJ5kkAfqGnNaDJhJ43C8R 7A95oiEELZzcw== 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 V2 03/10] selftests: Correct the headers install path Date: Wed, 19 Jan 2022 15:15:24 +0500 Message-Id: <20220119101531.2850400-4-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: E4EFF40048 X-Stat-Signature: n7oa8c1n4ub6cu39nsu9qhk98i87jpjr Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=CdcJQjDu; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf07.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: rspam06 X-HE-Tag: 1642587371-89225 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: uapi headers should be installed at the top of the object tree, "/usr/include". There is no need for kernel headers to be present at kselftest build directory, "/kselftest/usr/ include" as well. This duplication can be avoided by correctly specifying the INSTALL_HDR_PATH. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile index 21f983dfd047..80e5498eab92 100644 --- a/tools/testing/selftests/Makefile +++ b/tools/testing/selftests/Makefile @@ -167,7 +167,7 @@ khdr: ifeq (1,$(DEFAULT_INSTALL_HDR_PATH)) $(MAKE) --no-builtin-rules ARCH=$(ARCH) -C $(top_srcdir) headers_install else - $(MAKE) --no-builtin-rules INSTALL_HDR_PATH=$$BUILD/usr \ + $(MAKE) --no-builtin-rules INSTALL_HDR_PATH=$(abs_objtree)/usr \ ARCH=$(ARCH) -C $(top_srcdir) headers_install endif From patchwork Wed Jan 19 10:15:25 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: 12717399 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 6F56FC433EF for ; Wed, 19 Jan 2022 10:16:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0F24C6B0078; Wed, 19 Jan 2022 05:16:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0A3356B007B; Wed, 19 Jan 2022 05:16:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ED4406B007D; Wed, 19 Jan 2022 05:16:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay033.a.hostedemail.com [64.99.140.33]) by kanga.kvack.org (Postfix) with ESMTP id DF91A6B0078 for ; Wed, 19 Jan 2022 05:16:24 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A2727208E2 for ; Wed, 19 Jan 2022 10:16:24 +0000 (UTC) X-FDA: 79046631888.02.E44243E Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf19.hostedemail.com (Postfix) with ESMTP id 3600C1A000B for ; Wed, 19 Jan 2022 10:16:24 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 45F681F44431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587383; bh=znkuJknUIKmC97C/L7k2VJMosG9Fleiln09UWKBevLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HMr42Mf9v5dvg91/N7pjzAnb6ewlPB9KDLkPKPYBUmFbZl+LRNbnmjJlGZ8AAJPkO WM506udaVHrthnl4lTYOzwmwE3bE4ToKmfEVrs1Deq+tZLXEwMPlnTNK1T3pnA5yda MQKzyMjTXvSHIZAgIsQrryVdCJ9lq7prKESE87sIccPpcSAT2X/N/7q0EGXLIJam6P PKn85SKWidNGsco7EuHkVxfnVlErNr4ijmXQXH3C8XJSVW/iF75jpYYJxCYnB60Yqd 9zQiA0pBJMuzmizt4sy+Qs6qTXRWlrnOCTMOn9aeNZaVd//GSJNdqceqdBfAyZNov8 0/IBmllmo4l9Q== 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 V2 04/10] selftests: futex: Add the uapi headers include variable Date: Wed, 19 Jan 2022 15:15:25 +0500 Message-Id: <20220119101531.2850400-5-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Stat-Signature: n67smszyx5w4ofywkgp381d9ksf3rosh Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=HMr42Mf9; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf19.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: rspam09 X-Rspamd-Queue-Id: 3600C1A000B X-HE-Tag: 1642587384-350702 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: Out of tree build of this test fails if relative path of the output directory is specified. KBUILD_OUTPUT also doesn't point to the correct directory when relative path is used. Thus out of tree builds fail. Remove the un-needed include paths and use KHDR_INCLUDES to correctly reach the headers. Signed-off-by: Muhammad Usama Anjum --- Changes in V2: Revert the excessive cleanup which was breaking the individual test build. --- tools/testing/selftests/futex/functional/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile index 5cc38de9d8ea..2a12b174cb04 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile @@ -1,7 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -INCLUDES := -I../include -I../../ -I../../../../../usr/include/ \ - -I$(KBUILD_OUTPUT)/kselftest/usr/include -CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) +INCLUDES := -I../include -I../../ -I../../../../../usr/include/ +CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) $(KHDR_INCLUDES) LDLIBS := -lpthread -lrt HEADERS := \ From patchwork Wed Jan 19 10:15:26 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: 12717400 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 52676C433EF for ; Wed, 19 Jan 2022 10:16:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E12226B007D; Wed, 19 Jan 2022 05:16:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DE8906B007E; Wed, 19 Jan 2022 05:16:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CFED66B0080; Wed, 19 Jan 2022 05:16:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0154.hostedemail.com [216.40.44.154]) by kanga.kvack.org (Postfix) with ESMTP id C10D56B007D for ; Wed, 19 Jan 2022 05:16:35 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7F06B94FCF for ; Wed, 19 Jan 2022 10:16:35 +0000 (UTC) X-FDA: 79046632350.05.3FAD5E6 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf01.hostedemail.com (Postfix) with ESMTP id F00A94004C for ; Wed, 19 Jan 2022 10:16:34 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id A74AC1F44433 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587394; bh=40pexAd9n6QADSbCewDcIDxdNyRUb0Tnkv7FTmB0CRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qh78COkz4OlXMGOyhhQ192YaEP96UEV/HiraTS48N1XxFRdO+zZhlPgp82holCnSu Hugg3D2kRTbxQfPc6m8gnIQZmjW4AjkLa2Z+eTdjyPI8fHPIoHXahFdbDjT0X9fGgv TdZx2Dg86vShSzootd9zJ46E/xKyo6BaN6cnM7wOrHpRAFoElLAz6XbnMi/pJPEkfC h8V6AU0vC60gqzhLtlK81GwwvXMoobuR/aftMdD8skXLzq4w1ALQp2eEZD/BtqoT0B 8tfz0nmAJIdxEcoEYgSYmCWKlLM2lEluurZJrjOVYrgbfpm11VRUznGc2JBieMMS6e tDHbtfcGokysg== 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 V2 05/10] selftests: kvm: Add the uapi headers include variable Date: Wed, 19 Jan 2022 15:15:26 +0500 Message-Id: <20220119101531.2850400-6-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: F00A94004C X-Stat-Signature: rmggo1zgkgyimiyq9eegs37js8w56qm6 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=Qh78COkz; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf01.hostedemail.com: domain of usama.anjum@collabora.com designates 46.235.227.227 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com X-HE-Tag: 1642587394-144675 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: Out of tree build of this test fails if relative path of the output directory is specified. Add KHDR_INCLUDES to correctly reach the headers. Signed-off-by: Muhammad Usama Anjum --- Changes in V2: Revert the excessive cleanup which was breaking the individual test build. --- tools/testing/selftests/kvm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index ee8cf2149824..556da71c33b8 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -147,7 +147,7 @@ endif CFLAGS += -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=gnu99 \ -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ - -I$( X-Patchwork-Id: 12717401 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 707E6C433EF for ; Wed, 19 Jan 2022 10:16:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 056A36B0080; Wed, 19 Jan 2022 05:16:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 011CB6B0081; Wed, 19 Jan 2022 05:16:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E375C6B0082; Wed, 19 Jan 2022 05:16:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0249.hostedemail.com [216.40.44.249]) by kanga.kvack.org (Postfix) with ESMTP id D089A6B0080 for ; Wed, 19 Jan 2022 05:16:43 -0500 (EST) Received: from smtpin12.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 8DCCE181CCAF4 for ; Wed, 19 Jan 2022 10:16:43 +0000 (UTC) X-FDA: 79046632686.12.88E94C9 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf01.hostedemail.com (Postfix) with ESMTP id EC4AF40045 for ; Wed, 19 Jan 2022 10:16:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 7E05B1F44434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587402; bh=Jw6rL5aZMlTMqMdSpKS4Pzt24AHAhEIkIB28v6p/uW8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kBLsXF7uQxa2rD+wV5gFAkHNJhD1fJrcvVyaQtb7G2hYa10KRdkgi4QHES8vrTjci pWbUuIaSnZoctbDiqa2GHKHnKgMMA3aVwhf33LMNA3Jcb/w5gE3LgWsvkAsnEAcvCH sKuX3McgvQKyHKn05QTAMxK+zdw0iI9pthwHjcRnGN8WwHmFcM0aadTqHN+xT5Fo+c h6dJ8QwR4k1D+Isrw4igcDZAB3lGWMlwfzyp8ac65UuKLbv2iG/LDfq7Go7OLYkYcZ +fKswngI9xoIWSX0MWreRyOAHjc+tSprnILvMQG+hRIaA5fmavwt4ywLHfVpRLW37N pWeDKIVnzBwXw== 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 V2 06/10] selftests: landlock: Add the uapi headers include variable Date: Wed, 19 Jan 2022 15:15:27 +0500 Message-Id: <20220119101531.2850400-7-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: EC4AF40045 X-Stat-Signature: jgktn4qeyrswcr6aien9oo3yp3sg9bya Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=kBLsXF7u; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf01.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: rspam08 X-HE-Tag: 1642587402-480639 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000005, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Out of tree build of this test fails if relative path of the output directory is specified. Add the KHDR_INCLUDES to correctly reach the headers. Signed-off-by: Muhammad Usama Anjum Reviewed-by: Mickaël Salaün --- Changes in V2: Revert the excessive cleanup which was breaking the individual test build. --- tools/testing/selftests/landlock/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/landlock/Makefile b/tools/testing/selftests/landlock/Makefile index a99596ca9882..0b0049e133bb 100644 --- a/tools/testing/selftests/landlock/Makefile +++ b/tools/testing/selftests/landlock/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 -CFLAGS += -Wall -O2 +CFLAGS += -Wall -O2 $(KHDR_INCLUDES) src_test := $(wildcard *_test.c) From patchwork Wed Jan 19 10:15:28 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: 12717402 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 71C12C433FE for ; Wed, 19 Jan 2022 10:16:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 119996B0082; Wed, 19 Jan 2022 05:16:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0C9CE6B0083; Wed, 19 Jan 2022 05:16:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F22126B0085; Wed, 19 Jan 2022 05:16:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0150.hostedemail.com [216.40.44.150]) by kanga.kvack.org (Postfix) with ESMTP id E198E6B0082 for ; Wed, 19 Jan 2022 05:16:49 -0500 (EST) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A257F7F507 for ; Wed, 19 Jan 2022 10:16:49 +0000 (UTC) X-FDA: 79046632938.24.152033D Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf16.hostedemail.com (Postfix) with ESMTP id 39717180016 for ; Wed, 19 Jan 2022 10:16:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 944F31F44438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587408; bh=x8a+/rhJUZAIKALDJjBBCDWlAg+uFUzuTVsPSCbnIHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AgNZ5WXHijtrat3Pgh3ZOaMi2tRnMkFgvN54h8z/dIuy6z3C94f9rIegI9PkZNLyW +39iLHTOpr1enYSwhxr0yf1JwbLKHvP0rNGnKEjnxPhfry5gtoiU8RMSOgMF8t1xLs iN26p9qCQLosHnwBjUWroyA1Zwi7tfVDotoRcc2C6nZ7Sm3OdJ5/QeGuoXNxtxiezA ChphF0Y7Epi/NXBgoQ2SqM1EsPP2f+1a2iGqprWsxy9SmoQjEAers9rddnzNstVs8J 1C5JmA9m58hnjzCgCDM+w/2GsSZ+4IVWfWA//obZJ+igoaGSyYwSm3K8uT79FhRtgS 68e8rQwRxRZ+w== 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 V2 07/10] selftests: net: Add the uapi headers include variable Date: Wed, 19 Jan 2022 15:15:28 +0500 Message-Id: <20220119101531.2850400-8-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 39717180016 X-Stat-Signature: 8bibpapagpu99sojqcdam9gn81shqtx7 Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=AgNZ5WXH; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf16.hostedemail.com: domain of usama.anjum@collabora.com designates 46.235.227.227 as permitted sender) smtp.mailfrom=usama.anjum@collabora.com X-HE-Tag: 1642587408-876971 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Out of tree build of this test fails if relative path of the output directory is specified. Add the KHDR_INCLUDES to correctly reach the headers. Signed-off-by: Muhammad Usama Anjum --- Changes in V2: Revert the excessive cleanup which was breaking the individual test build. --- tools/testing/selftests/net/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile index 9897fa9ab953..0b1488616c55 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile @@ -2,7 +2,7 @@ # Makefile for net selftests CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -CFLAGS += -I../../../../usr/include/ +CFLAGS += -I../../../../usr/include/ $(KHDR_INCLUDES) TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh \ rtnetlink.sh xfrm_policy.sh test_blackhole_dev.sh From patchwork Wed Jan 19 10:15:29 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: 12717403 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 82157C43217 for ; Wed, 19 Jan 2022 10:16:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 29F7D6B0085; Wed, 19 Jan 2022 05:16:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 24F946B0087; Wed, 19 Jan 2022 05:16:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13F3C6B0088; Wed, 19 Jan 2022 05:16:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0159.hostedemail.com [216.40.44.159]) by kanga.kvack.org (Postfix) with ESMTP id 022A16B0085 for ; Wed, 19 Jan 2022 05:16:58 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id B9DEE93691 for ; Wed, 19 Jan 2022 10:16:57 +0000 (UTC) X-FDA: 79046633274.07.E4F636E Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf30.hostedemail.com (Postfix) with ESMTP id 4613B8000E for ; Wed, 19 Jan 2022 10:16:57 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 8B3A31F4443C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587416; bh=b8IHaSyqZAkol0UTz6LpkkJkD6GfsdgRKfD7L0QLD4Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ct1ewDX16Y2/hsiVGPj7C6m6S17bUJz/BVwMtVBM9kuO5SjF+oQwy5xdo+J3hOovC nv5+7F8MCCg+jqebTmv3FvRT+pf5xo2Sj3xvqbQuYt2HGxRYi4z0vwh6lSzjtGJAQI n8boO5YtHOIyxS3ICyW6YkMbt5W1INqtw3i74UEnshWvBOOjOKF2siZ3CvxBPBXlpY bfEOl7xQuFeedK37LsAeyTPaFB6JQBNj4FVSIeBfhi4aRiY88asnf4Y9NT4N2aVzHP 3O2kcvX0clF2FZ7TtdoUztz9uZ8Omh4JlWe7jGip2cQdhmqugmuDsFLqzM7e0ZEcJ6 SAgDk0MDw8yHg== 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 V2 08/10] selftests: mptcp: Add the uapi headers include variable Date: Wed, 19 Jan 2022 15:15:29 +0500 Message-Id: <20220119101531.2850400-9-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4613B8000E X-Stat-Signature: pdwjmu6dnzx8ersxxqtp69pe3mzashq3 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=Ct1ewDX1; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf30.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: rspam03 X-HE-Tag: 1642587417-712095 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000007, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Out of tree build of this test fails if relative path of the output directory is specified. Add the KHDR_INCLUDES to correctly reach the headers. Signed-off-by: Muhammad Usama Anjum Reviewed-by: Matthieu Baerts --- Changes in V2: Revert the excessive cleanup which was breaking the individual test build. --- tools/testing/selftests/net/mptcp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/mptcp/Makefile b/tools/testing/selftests/net/mptcp/Makefile index 0356c4501c99..f905d5358e68 100644 --- a/tools/testing/selftests/net/mptcp/Makefile +++ b/tools/testing/selftests/net/mptcp/Makefile @@ -3,7 +3,7 @@ top_srcdir = ../../../../.. KSFT_KHDR_INSTALL := 1 -CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include +CFLAGS = -Wall -Wl,--no-as-needed -O2 -g -I$(top_srcdir)/usr/include $(KHDR_INCLUDES) TEST_PROGS := mptcp_connect.sh pm_netlink.sh mptcp_join.sh diag.sh \ simult_flows.sh mptcp_sockopt.sh From patchwork Wed Jan 19 10:15:30 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: 12717404 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 5FF54C433F5 for ; Wed, 19 Jan 2022 10:17:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EFBCF6B0071; Wed, 19 Jan 2022 05:17:03 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EABF46B0073; Wed, 19 Jan 2022 05:17:03 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D74106B0087; Wed, 19 Jan 2022 05:17:03 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0158.hostedemail.com [216.40.44.158]) by kanga.kvack.org (Postfix) with ESMTP id C8A126B0071 for ; Wed, 19 Jan 2022 05:17:03 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 92F75181CCAF4 for ; Wed, 19 Jan 2022 10:17:03 +0000 (UTC) X-FDA: 79046633526.13.FADA6AA Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf04.hostedemail.com (Postfix) with ESMTP id 2C8D740055 for ; Wed, 19 Jan 2022 10:17:02 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id A6FD51F4443D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587422; bh=lQnYdF/4vaiSEAa1PT+XPuhoOtYBkfQMHnuIQgCAk70=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fwMmbICz7ibyvyWZ/Rl6zwFG2xnDZ3fj/fg8b9EmRLuMdL6HOKuhlXoLM3VRCSxbE Qi8i+rIK87Oq3Rp5Ro3G5vpK5r7qP3jN2HwTHzTDTkHqhTqQylcMNSKPO2m0efB/Qa x3SuPKLxeAPzNU3YY7k9LeinJ2afrRpPiln2mbXFltraSBm2/y7nHGnQvIqSRvy3fU 4FkXsBYeJ5xMZvF63ZSe4s83TDFQLEdPiOngbsajXBCm0vimi9woeNqECRYEKzZ635 6XmyzhDQDIAupjA7df+Lr54JnK3qOGkhin6sTVUVWVjAuUnDBri3iqutPlinIl3DSg sfzo3loHomnHg== 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 V2 09/10] selftests: vm: Add the uapi headers include variable Date: Wed, 19 Jan 2022 15:15:30 +0500 Message-Id: <20220119101531.2850400-10-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Stat-Signature: 8cgq6nit1bog4sr1txdg4nzqhsrsz4iq Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=fwMmbICz; dmarc=pass (policy=none) header.from=collabora.com; spf=pass (imf04.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: rspam09 X-Rspamd-Queue-Id: 2C8D740055 X-HE-Tag: 1642587422-423605 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: Out of tree build of this test fails if relative path of the output directory is specified. Add the KHDR_INCLUDES to correctly reach the headers. Acked-by: Paolo Bonzini Signed-off-by: Muhammad Usama Anjum Tested-by: Alistair Popple --- Changes in V2: Revert the excessive cleanup which was breaking the individual test build. --- tools/testing/selftests/vm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile index 7d100a7dc462..96714d2d49dc 100644 --- a/tools/testing/selftests/vm/Makefile +++ b/tools/testing/selftests/vm/Makefile @@ -23,7 +23,7 @@ MACHINE ?= $(shell echo $(uname_M) | sed -e 's/aarch64.*/arm64/' -e 's/ppc64.*/p # LDLIBS. MAKEFLAGS += --no-builtin-rules -CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) +CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) $(KHDR_INCLUDES) LDLIBS = -lrt -lpthread TEST_GEN_FILES = compaction_test TEST_GEN_FILES += gup_test From patchwork Wed Jan 19 10:15:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Muhammad Usama Anjum X-Patchwork-Id: 12717405 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 A8AD5C433EF for ; Wed, 19 Jan 2022 10:17:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 44D426B0073; Wed, 19 Jan 2022 05:17:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3FD7A6B0074; Wed, 19 Jan 2022 05:17:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2ED646B0087; Wed, 19 Jan 2022 05:17:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id 2204C6B0073 for ; Wed, 19 Jan 2022 05:17:10 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id D5DBD7F507 for ; Wed, 19 Jan 2022 10:17:09 +0000 (UTC) X-FDA: 79046633778.15.C6BA339 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by imf14.hostedemail.com (Postfix) with ESMTP id 768E810004D for ; Wed, 19 Jan 2022 10:17:09 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id AC62B1F44443 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1642587428; bh=ZgAzpMGfSGdCPLE/fHhKIS82NhtSqBUPZr7WBPwkwXI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C0mGMmA7q7UPYsiXK18YhhsNEQ//QfrpSJuvfRmQUme1U5Fg4vobtB0Ao0YZiGUUk L3hEF7/vTCey+drcto8FB1II8khu5KrNSHj6tZDVDCrTS/eyExq2QqwYILoP2Qy10F 8Lmdf9wO/NjKg5Xp17P9zVfjJyRzSjdWaMGg9JMiYgITkIDPxQCI6DPGYbmCiq48wl KdwbBRzvSFh0zarKFe2Y/qPcaWxXsJAdqBodS6834V2pv09q05jLvBfhen5Zoq/3Ih uJqUJrZT+o/JZh8YBKDePxlOaWJ6AvYf+Pwr482gk45PmGVBeQDczi22XKAu6KIjXv v5snzb//VssZA== 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 V2 10/10] selftests: vm: remove dependecy from internal kernel macros Date: Wed, 19 Jan 2022 15:15:31 +0500 Message-Id: <20220119101531.2850400-11-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220119101531.2850400-1-usama.anjum@collabora.com> References: <20220119101531.2850400-1-usama.anjum@collabora.com> MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 768E810004D X-Stat-Signature: 9ghaqiorig3doq4usksyyikaop7gtd7j Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=collabora.com header.s=mail header.b=C0mGMmA7; 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; dmarc=pass (policy=none) header.from=collabora.com X-HE-Tag: 1642587429-296633 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: The defination of swap() is used from kernel's internal header when this test is built in source tree. The build fails when this test is built out of source tree as defination of swap() isn't found. Selftests shouldn't depend on kernel's internal header files. They can only depend on uapi header files. Add the defination of swap() to fix the build error: gcc -Wall -I/linux_mainline2/build/usr/include -no-pie userfaultfd.c -lrt -lpthread -o /linux_mainline2/build/kselftest/vm/userfaultfd userfaultfd.c: In function ‘userfaultfd_stress’: userfaultfd.c:1530:3: warning: implicit declaration of function ‘swap’; did you mean ‘swab’? [-Wimplicit-function-declaration] 1530 | swap(area_src, area_dst); | ^~~~ | swab /usr/bin/ld: /tmp/cclUUH7V.o: in function `userfaultfd_stress': userfaultfd.c:(.text+0x4d64): undefined reference to `swap' /usr/bin/ld: userfaultfd.c:(.text+0x4d82): undefined reference to `swap' collect2: error: ld returned 1 exit status Fixes: 2c769ed7137a ("tools/testing/selftests/vm/userfaultfd.c: use swap() to make code cleaner") Signed-off-by: Muhammad Usama Anjum Reviewed-by: Alistair Popple --- tools/testing/selftests/vm/userfaultfd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c index d3fd24f9fae8..d2480ab93037 100644 --- a/tools/testing/selftests/vm/userfaultfd.c +++ b/tools/testing/selftests/vm/userfaultfd.c @@ -119,6 +119,9 @@ struct uffd_stats { ~(unsigned long)(sizeof(unsigned long long) \ - 1))) +#define swap(a, b) \ + do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0) + const char *examples = "# Run anonymous memory test on 100MiB region with 99999 bounces:\n" "./userfaultfd anon 100 99999\n\n"