Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1702045pxb; Wed, 9 Feb 2022 02:36:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnMekQJHUCcWSrTjjZ8B135hX1pBTX08meuUoh2+7a+8rrSCZBYJ1Lj4dAApYWi7U76CtH X-Received: by 2002:a17:902:f544:: with SMTP id h4mr1466033plf.158.1644402979131; Wed, 09 Feb 2022 02:36:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644402979; cv=none; d=google.com; s=arc-20160816; b=iZ4iZd9sDJM4elURcmgRKd71JtBFOUs7IB5tK+ijWlprYM8d+BgyCFf6EZamX5eJq9 8YVC18zhojHEPx9pVRrGSmWGjvEGFXR+RvCyahG5rbdnkV58OAUrYIlvBdzwifut5VIK hoMT7M2JszglQp+UGt/fYfOKLRPLFWY02mDvssLYISl0ucGvyxqfQw1bVpImK2+QR70D 37pTIur8pgLpi+36yr6QeRzAkGLyJU7BFxBMJ8htGjc1xK1cfXd8IMSCT4O9w65NPDrL 6qhCgkLTvI63x3NphBAfyAE9xUdlqiNsNqi5oC8HHhoR8cjv6jXJCPDg87jMEf57viMc WJlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6NM7Ake9kho34MN1EmrmT8NV0K8P6BDSXILnmG4EDnQ=; b=H3o/DlcnQEDU5mfPsYIcfeyur139p6s/kynt4x1z+9CJupkjqerN70cOK4T1+IvMD7 96HSYzy8gB7ouaFpfpZ2VeowKiwbSLbopmz4kyHNCW9WwLiNC9BgikWchldNtiWeyWdS CbDuTVolf5gElERLOlZacrO1eSntY0TFBweCNGhboTkDtk4JtLsshUoRNXs2JumuhKUB +qAzGkPoUfwP34aMI+/EcUJoIRTPcJeTb1XZ+Gi4EW4GUlBUBX0d+Am351ZFITBikh3V ODGpSPZ17WBgBfirwqRn7RKkT3j5VtJCnhw62+ADE+uIKgbIQxG/FE7HfczDIYzbBVk5 36rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="GYijXH/r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h14si17443503pfh.343.2022.02.09.02.36.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 02:36:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="GYijXH/r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3C19BE03A55F; Wed, 9 Feb 2022 01:23:21 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237292AbiBGT0T (ORCPT + 99 others); Mon, 7 Feb 2022 14:26:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237153AbiBGTXK (ORCPT ); Mon, 7 Feb 2022 14:23:10 -0500 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 081C3C0401DA; Mon, 7 Feb 2022 11:23:10 -0800 (PST) Received: by mail-io1-xd2f.google.com with SMTP id c188so18197652iof.6; Mon, 07 Feb 2022 11:23:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6NM7Ake9kho34MN1EmrmT8NV0K8P6BDSXILnmG4EDnQ=; b=GYijXH/rJC/AMLJ2OxzqYk27/RyiwNDq7vFloLi30hoIdxnu5QM4P8/5mXFinUuUsT Vdt/Tyu/YZMW6fkkgZ+iTVLjUnQt0ciXRuauMCez2/Qr+1/yZzv1Zr7A3L/t3JBov4og fs9lzwAp4fzqacsYNCwUMOV18fQ1UWb2Mu2RwnIk+Fga31BKNOA3t8o4wRA8FEvBnZ3U F9PBcZmKqZNPjwa+j2ilMbjBN4zLqRlUfMDors0RvfVECB97zzcGLo99oSOXq8SVjYco REcR0MLUN6zxP7ju/F3F0RFRHZdkIfgy6CkdPO1FAUOEiZ+YSOCrWgbhIaqGdAgJgj+e LoUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6NM7Ake9kho34MN1EmrmT8NV0K8P6BDSXILnmG4EDnQ=; b=gq9aLgG+UkBwjRJhzcD6Q+q49rQFpy12Lm7I40dcR68O7UJZ55iHcDpvb0/Ztqunfd ocuuZVag6otODa0fBPNB1qBRdFqf29U+9BvtKhzEkqNnJtoLP4IRd5glt/fHDcyCfFr0 JDyvZ0NDoz/VG6WtzxIUc7si78EAT+ZZumdmsCLFfryZZQuIsJ1zeAocpmyIU69qocAY 60NARNETg0xm17aaqv394GiT/lqLr7paN92+eyEZFg0FKK2OJK705cShx+fLjRe8FnMC qbmo1/Cv/A8Osxjn/aJ5c7rA7FHKwVxcowzfwwnBIDbD5Ecod6ra+5P8UmVpkt2GboQD 2ZeQ== X-Gm-Message-State: AOAM533A4RTupN5WutKgx53BcMQd4flApdnVmDlmZaga7s7KyuBSkQWp M3isn2p7XqPCGdM41PN+uBH7NLv/T0K7Bko9rnE= X-Received: by 2002:a05:6638:304d:: with SMTP id u13mr571045jak.103.1644261789459; Mon, 07 Feb 2022 11:23:09 -0800 (PST) MIME-Version: 1.0 References: <20220204225817.3918648-1-usama.anjum@collabora.com> In-Reply-To: <20220204225817.3918648-1-usama.anjum@collabora.com> From: Andrii Nakryiko Date: Mon, 7 Feb 2022 11:22:58 -0800 Message-ID: Subject: Re: [PATCH] selftests: Fix build when $(O) points to a relative path To: Muhammad Usama Anjum Cc: 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 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 patch applied, all the feature detection doesn't work, and I get reallocarray redefinition failure when bpftool is being built as part of selftest. > 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 >