Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp733699pxm; Fri, 25 Feb 2022 18:40:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUo3YajAROJ15l9Ugutajp1Mdnpr9mhePNo+b7YnIU7YXNCU/w/h1uQ9gh74P8f/EIM1oI X-Received: by 2002:a05:6a00:1787:b0:4e0:6135:d5e8 with SMTP id s7-20020a056a00178700b004e06135d5e8mr10761851pfg.55.1645843206711; Fri, 25 Feb 2022 18:40:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645843206; cv=none; d=google.com; s=arc-20160816; b=tCJnkCS1Oms96KkLLv8AxYM8kTbDcedXeV0CQ7oqidfw63+leaKO5Vh2DWCp1KgqgJ H6NXc35xsgP94i0XqE0TD6zfGE/9KStBWH7f+KLcMOVKbGB8yxjdN9xoTdSHYPWseO94 vNVqAJTdw4P7db4HIrSBs1twp7VGbawKpv4YMatbEc9YPNxtja6CaXTPiTdrljc94zL6 BDojAkBesrN/1+fTpGdWzmdAZd4gnvuRhy7XpHwi65Uro2wJardIAj+BwAnGF2RHbLMH UDl8UkhDBdpWxMRNrtddtILddp0L95e1qlBsurrdKSmOGjChTDg33Syi3SyAFfVzPLzn 41oQ== 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=x5W8GlNa/PKGmzlVC9qraqS9i9KhasHP0CWyPD4EGa0=; b=qk7z9nMOILY7B40Qa7X7Tyj4HQzQtQ6iTUSmmb3cjG+UjtFoQFCL9IiBDUClyGCJ2E eb8bGYfIoMZSkH/Z5oTsCAd3nsiUIH3nHcu3XISi8kig3H7WX1qBWO4FuLFFx6CAJOMc EZZn0aInumKq2dwdUKUm/9ZXUTD8K2ZGnC0uzJHf843T4WEbMlG3N8SmVoBTw6ymOUKP ZHh2QrBEopRZR5fx5DZhX7pmhCLI+bgaJa/03kGAtslj9TjX//Jjr6W7+pm3C3Kwpz2I qYzOXPqyhiywIXYqcOcwHOs88GmjX8nEDhdTBGlOT9Mbyvd1UbyLCW9HA9pB59d2y7O4 iQTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Qx+Hc3b6; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id ng7-20020a17090b1a8700b001b9f9bb4b30si9843461pjb.130.2022.02.25.18.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 18:40:06 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Qx+Hc3b6; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0842F344FC; Fri, 25 Feb 2022 18:04:42 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240865AbiBYRXK (ORCPT + 99 others); Fri, 25 Feb 2022 12:23:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243616AbiBYRWt (ORCPT ); Fri, 25 Feb 2022 12:22:49 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B9A9223204; Fri, 25 Feb 2022 09:22:17 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id AF3891F464FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1645809736; bh=vRZrrE/MYE3yCl0TC9kgOrEfpCGgFVkg67K4UVbuhLM=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=Qx+Hc3b6kRJW0YO/JRuwx//SvYjkK8g9zQoi0prEf8lHFZasKm648AGmT72uT65ea R+6o7+DsrtqWQdQyb31s4NDbKXh53Di8Rp9HDd0aTHoiq1RaLtCa7s9htuE1oH9gql zvLLQe0lNqZCTAJTwlVe75GOrWCByCY7/2lnrR+VqTDIIesnDuDisg/CToVsZATPnc QXhRoP7TN7AmYqyvgbC7I7HWKbXSEwvpcsEHcPCGJbqwiMJvC8zf30FVUkTltqRoT4 AgjhaE+ww/OuCm2Kn4JnlzB4hqXGwLbuY7D2oqM+Z8+GbXr+wyd54dwDDEPMuQDdmg mun5B1+/yeulg== Message-ID: <46489cd9-fb7a-5a4b-7f36-1c9f6566bd93@collabora.com> Date: Fri, 25 Feb 2022 22:22:08 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Cc: usama.anjum@collabora.com, kernel@collabora.com, kernelci@groups.io, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH V2] selftests: Fix build when $(O) points to a relative path Content-Language: en-US To: Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh References: <20220216223817.1386745-1-usama.anjum@collabora.com> From: Muhammad Usama Anjum In-Reply-To: <20220216223817.1386745-1-usama.anjum@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no 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 Any thoughts about it? On 2/17/22 3:38 AM, 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. > > Makefiles of bpf and tc-testing include scripts/Makefile.include file. > This file has sanity checking inside it which checks the output path. > The output path is not relative to the bpf or tc-testing. The sanity > check fails. Expand the output path to get rid of this error. The fix is > the same as mentioned in commit 150a27328b68 ("bpf, preload: Fix build > when $(O) points to a relative path"). > > Signed-off-by: Muhammad Usama Anjum > --- > Changes in V2: > Add more explaination to the commit message. > Support make install as well. > --- > tools/testing/selftests/Makefile | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile > index 4eda7c7c15694..6a5c25fcc9cfc 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: > @@ -236,6 +238,7 @@ ifdef INSTALL_PATH > for TARGET in $(TARGETS); do \ > BUILD_TARGET=$$BUILD/$$TARGET; \ > $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET INSTALL_PATH=$(INSTALL_PATH)/$$TARGET install \ > + O=$(abs_objtree) \ > $(if $(FORCE_TARGETS),|| exit); \ > ret=$$((ret * $$?)); \ > done; exit $$ret;