Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp684831pxb; Mon, 7 Feb 2022 23:21:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyHYQ0oWGyE4KbC+i4m6Fb9erteO25JovORaEAq/GfccNlkKws0fRtWbnTkti0kDc+VsZye X-Received: by 2002:aa7:91cc:: with SMTP id z12mr3105330pfa.37.1644304869269; Mon, 07 Feb 2022 23:21:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644304869; cv=none; d=google.com; s=arc-20160816; b=ODDS+zh4Yyx5ulG9kG7NEBuEp2JgpEnZagZh+cM7SwH7vE8KLsKD/T4NeJr7tiU0ir 2J53AdDQFQyWJw7sj8+CrWI/dg6y1M/1YiN6SdXGaghnzcB5yx0Cvamvsr8CgKetx6Z6 gGCZG71RNe2Dd8YWzg5Tw2q4ByZfekcq7PtKe1Xnj+fPGNQ5S8C9LVc4AEwTLarVkf80 zlEYdVDyN9DsPkYUIx1w0bo9LUgXXl0DpVkvd7N/xYzlBz4w9bKhOjA7lbiDLqwSqDEt F3/W8tGztKGUjMBEFNnmB2g3WT+sFcCezKhw32bHerrRwWDTLy6cI/cVmiIUZGDaJIyA n+Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=pYzBv/d6nShWrZ3zvpMOAieQpMVdVg09WLDc3FXwgeE=; b=rOZbBj0uYsk4B3tlbzgbFTYWnCyQFTEHjgD0M7HndHyKOa9aRb1y439G1q+1xzGZ+f kQTRo+td2VMkW4PGXLaw4NIRzvmZy7pmEDZkxCg+he7cni60YpGyVEDpaOV3JogtOPZQ TDctQDiGk6DtvYA0ItLvwnzuChIztXlM0qIMtzhVDRCyaXhbXem10RWtsuPEW+I5xOne r99oK6FO79xL0flQOyZAPCsfinpG+TwTeJ5n3gPllmVFDcl9FiSkoJSxBscItKlMzf2M KtQz3nXRz5IE99XwjRcWvpbS9gs19O8ZHT3PdQH28/e1nhxsoOViVRNNQupqnYzNz37S tDjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="i43/GqRM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d76si1473863pfd.11.2022.02.07.23.20.55; Mon, 07 Feb 2022 23:21:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="i43/GqRM"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231367AbiBGVAR (ORCPT + 99 others); Mon, 7 Feb 2022 16:00:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230243AbiBGVAQ (ORCPT ); Mon, 7 Feb 2022 16:00:16 -0500 X-Greylist: delayed 597 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 07 Feb 2022 13:00:15 PST Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A04B8C06173B; Mon, 7 Feb 2022 13:00:15 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id B2EE91F449C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644267606; bh=N5JqssyGW7G70mGE9QlOJwJiSFPcXLNfmk8H/V5Cg2k=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=i43/GqRMALGePiOvKLLiVm68rl7kuD1jPtECg5+AFtHcce0lAwh1/GGSmHJCn1jLm X6EL8T3rmdu1TBQ/ziIiAobHLYePbEtAuBsXOtvThf0rFuOu8ioogWyo6+p0fFYO0U ZLVr+k/X26iDjWvfPYqFgwc+hy1U+5WgvQ2zeSKTUHwbHkc7+MItKBgcSIpQIEsWKS 7W8bg5mwFpiErJuWGEN7K4AK8h2t5qcIQurHllkJpGqXRQfas9/efaLODRJ1EjX+n5 NBoTD33o5y28NxivwECmAHmWVYfQ12CbFe71ygKzJgFU11I4fj5npRIXDC8Gzhq2U4 zmjQwNtPnfCgA== Message-ID: <701fbfac-b548-1f05-7841-e233ef82be15@collabora.com> Date: Tue, 8 Feb 2022 01:59:58 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cc: usama.anjum@collabora.com, Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , kernel@collabora.com, "open list:KERNEL SELFTEST FRAMEWORK" , open list , Networking , bpf Subject: Re: [PATCH] selftests: Fix build when $(O) points to a relative path Content-Language: en-US To: Andrii Nakryiko References: <20220204225817.3918648-1-usama.anjum@collabora.com> From: Muhammad Usama Anjum In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/8/22 12:22 AM, Andrii Nakryiko wrote: > On Fri, Feb 4, 2022 at 2:59 PM Muhammad Usama Anjum > wrote: >> >> Build of bpf and tc-testing selftests fails when the relative path of >> the build directory is specified. >> >> make -C tools/testing/selftests O=build0 >> make[1]: Entering directory '/linux_mainline/tools/testing/selftests/bpf' >> ../../../scripts/Makefile.include:4: *** O=build0 does not exist. Stop. >> make[1]: Entering directory '/linux_mainline/tools/testing/selftests/tc-testing' >> ../../../scripts/Makefile.include:4: *** O=build0 does not exist. Stop. >> >> The fix is same as mentioned in commit 150a27328b68 ("bpf, preload: Fix >> build when $(O) points to a relative path"). >> > > I don't think it actually helps building BPF selftest. Even with this This patch is fixing one type of build error which occurs if output directory's path is relative. > patch applied, all the feature detection doesn't work, and I get > reallocarray redefinition failure when bpftool is being built as part > of selftest. There may be more problems in BPF tests. Those needs to be looked at separately. >> Signed-off-by: Muhammad Usama Anjum >> --- >> tools/testing/selftests/Makefile | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile >> index 4eda7c7c15694..aa0faf132c35a 100644 >> --- a/tools/testing/selftests/Makefile >> +++ b/tools/testing/selftests/Makefile >> @@ -178,6 +178,7 @@ all: khdr >> BUILD_TARGET=$$BUILD/$$TARGET; \ >> mkdir $$BUILD_TARGET -p; \ >> $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET \ >> + O=$(abs_objtree) \ >> $(if $(FORCE_TARGETS),|| exit); \ >> ret=$$((ret * $$?)); \ >> done; exit $$ret; >> @@ -185,7 +186,8 @@ all: khdr >> run_tests: all >> @for TARGET in $(TARGETS); do \ >> BUILD_TARGET=$$BUILD/$$TARGET; \ >> - $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests;\ >> + $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET run_tests \ >> + O=$(abs_objtree); \ >> done; >> >> hotplug: >> -- >> 2.30.2 >>