Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp1332122pxb; Wed, 16 Feb 2022 17:02:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTM8XZ6ifWHel4nvGMyInO0yjy3qLQMYxRSSK1Ue/lZPs3HVliFv2MUGnhHMa/ESooxbXS X-Received: by 2002:a17:902:904a:b0:149:b6f1:3c8b with SMTP id w10-20020a170902904a00b00149b6f13c8bmr521396plz.83.1645059752905; Wed, 16 Feb 2022 17:02:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645059752; cv=none; d=google.com; s=arc-20160816; b=CbnpFcTz+u0Vj1OMVgZ0QmCTQ7PnC6dzGMRbxthbmPOHplYFXJ7H9K3sq0R2ysGbue 9vOlrTlF0KqCZShhc38o5oaQP1Dry6PCWxKb9P9N5YiaTKcmgDUkNwZViZ8CcJ/2+pdx jhIxHnqPIir0KGMT5w6lCLyYjI/O9n7UGSkBggtadcS8LAkr6RktQYTneFX3LHF2DKm5 mVFohEmgAkQ9CyaeeE+6uo2vvQmRuslrIjG48CSHStfi4teTucpzZtgzBleWVeKu3ndV IXaA7ijLDGqvfj16je+MVc8p4S1l8cOuQeFMIVUIPuR3h8BHBp0rNS6Iy/83kBT0lHNj U4LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=btYBVCbVJp5THWBOuL53Y9nQyU23IiZZ2XdcjokevxA=; b=gmWH/6ZRZ+opq2RBBM/gudOaHbZxdesTRXtqKuuZj3u7vuK6E5qwJS7WKRU8nPXl6X NUimzNTiOECgaiHQU9TrUf1RnFHZZuCaLrawdi/DddfMcMfoYzS2tCOfpzOIg9IggZle nByBiXmYKyrJoEbYFaNsYOsewW4JPBEHht310CKsZ44EShc7tWGlCPIP/wS2yY49+k1H OyyMMws64J7UTGRJiuYICCuJR23nCP7N/En3euXWNz3vGw/5Jk0cgyi07ySDtqvYV5i1 c/jV32OkTyoFQrEZE5jp7VdR4utEFznkkLTgSRz+Tvt8SzPxYQqTotnedNPYDnO9/6HM qr8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ckvLK6sQ; 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 i14si16728145plg.606.2022.02.16.17.02.02; Wed, 16 Feb 2022 17:02:32 -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=ckvLK6sQ; 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 S237155AbiBPWjH (ORCPT + 99 others); Wed, 16 Feb 2022 17:39:07 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234060AbiBPWjF (ORCPT ); Wed, 16 Feb 2022 17:39:05 -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 43DAA2727A5; Wed, 16 Feb 2022 14:38:52 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id E90CA1F454C3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1645051130; bh=JujOLCBXFwYy6Z0/MeUsA4c2OP7r607nAXXWYIS6xM8=; h=From:To:Cc:Subject:Date:From; b=ckvLK6sQGVqorvgizmHJbpQqBTarzzsUvrZ4dCHUMPNon0isDpxZ/EE5N+uJER/oz WIrb7TKDhZqEVnfdVBoWTfTnu22qBojDUkE1+d6RIB8IipjMXNEam2PTf+Gw+/85IR otlj51/1TJROr0mijhI506ntcWVN/e8FHD5CVyGYE5w9CumxdlP0T9aKEvEcBuJsfV i5ocqetg2wO3ojsUjC/EVWB/URp3FuSy/P83/LdlmVUjrlz9tabxGjp3/3S782+u5l UmBvyLp3YqwF4hLnsIGG4BrTriVsu/GPFPY7ytwdDJbBfRjdu/S8WJ5WTHHElNHjMX o5g9yEvjhIzdQ== From: Muhammad Usama Anjum To: Shuah Khan , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh Cc: Muhammad Usama Anjum , 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: [PATCH V2] selftests: Fix build when $(O) points to a relative path Date: Thu, 17 Feb 2022 03:38:17 +0500 Message-Id: <20220216223817.1386745-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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; -- 2.30.2