Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1654377pxp; Thu, 17 Mar 2022 13:43:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRp+ZfoZH4coqZR6aRMihvXnf1LQz2HayArs1Q1eoDdKeUmzcwNdV1vqUMpOVnvvIvBggn X-Received: by 2002:a17:902:f682:b0:151:a262:ad4a with SMTP id l2-20020a170902f68200b00151a262ad4amr7311079plg.84.1647549782352; Thu, 17 Mar 2022 13:43:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647549782; cv=none; d=google.com; s=arc-20160816; b=t9kwpCyQI8Mi4UQxsq0t4CwdIiU1sReSPeghM68RUBmQ+KCS1VykzfwoOwZyCLpVxZ Paqvjr9RY3AOQBP8zBHUMNtMjIOSuQXPlXnv1gaOJApV7C94SrhQmSDQRdodFaX9NVA4 5CnOCZbKqN+1NtIEgDrJ7vdPEFswjfD7ijvBr2SO73URp+JH94XgH5ApeB5ZMkMt1s1P jQ4KDpOHEpMLdnTP5Gj6t9rRx0gfjQBQ5KcxygxBEElyYg22EQ2PByOzSqEMQPngigEU 1EasD60uI0pRh4SIWZ7Hyj3340PiPGrRbx6P+3UGjSbIPTGZphzkFur6MViq8DhLhY8/ M0jQ== 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:dkim-filter; bh=9fJ0T7LBj+VU4wzwseO6SCq15p5l4MT92+XwYbfyh7A=; b=jgP05+fHSfh5vqbUPJudXd3PGAj5JjHwgvqoM2JtV7/rWEko1k2RDvQJCr8BACDIod CmR+b5KO5fuf7KO5UYZfZUSTLWZEvyYhZpkJMr2fGuHOwnVw9KjRGvdTgqjI91ZucNZO J1/B0o1ALklCdun/q+nRR41v+qP9280JlBgsWNddWux+GqRB1SdKpu4tOk6hpAyOz0Ls kgERiahpZ42Ea86DW1JnZHY+RhEl7avRf8L7592ApXlIpYW72kbH5xiK9Xh3IlA4jaDw d1f2Xy/J4OG1n4PqGizH/6hnNbVfoM2WMroPb6U4n9R+KxaUUuW0i07fPFp18SJPomWs ohgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=g0O2QY2e; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id p4-20020a170902a40400b00153b2d16665si111886plq.621.2022.03.17.13.43.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:43:02 -0700 (PDT) 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=@nifty.com header.s=dec2015msa header.b=g0O2QY2e; 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=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D53CF171799; Thu, 17 Mar 2022 13:11:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237221AbiCQSLg (ORCPT + 99 others); Thu, 17 Mar 2022 14:11:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236915AbiCQSLb (ORCPT ); Thu, 17 Mar 2022 14:11:31 -0400 Received: from conssluserg-06.nifty.com (conssluserg-06.nifty.com [210.131.2.91]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 553C621A896; Thu, 17 Mar 2022 11:10:09 -0700 (PDT) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 22HI9ZKp008822; Fri, 18 Mar 2022 03:09:36 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 22HI9ZKp008822 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1647540576; bh=9fJ0T7LBj+VU4wzwseO6SCq15p5l4MT92+XwYbfyh7A=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=g0O2QY2eOMQdP4tqgFmRtI0ZzTg45v1vExNUAbTdEuFaTMU8WVxgdu/ng7CaUp70S GgoLF8ASuT4i5QseAAxWbZb+cSnrMR4b1mGVA55jgDgmQ1TSk9CqwkOZDMhLcN06Rh fREZ2aWEgBaJZC4AAoukLuHU8Iq2lNNB2GhPGqsXQJeRaWCvo+5H+uKlzRz2vahXEp sLQey0FjyP1u+3nmCBL9VHJ6Mwic8qK4C/43zBMYYNpKLAlbnorsnKmSxUhKkISIPF wUInAL/45+qKV9QiFdH3oWtWcAuS/8XGurRolJzmYBVDc5RNlqyBo1SBDxGQc6XpnT 1s8ZT8keKbXNQ== X-Nifty-SrcIP: [209.85.215.181] Received: by mail-pg1-f181.google.com with SMTP id e7so3248786pgf.7; Thu, 17 Mar 2022 11:09:36 -0700 (PDT) X-Gm-Message-State: AOAM5316/3Y9JE5EfQJkxFSnUTHsf8D1wTJPxXjaGbM4q4aY4s4Im7xr evmjaUF/78+pQ0eL6uIX7viS5xaVnSBxQ7DpCUE= X-Received: by 2002:a05:6a02:182:b0:374:5a57:cbf9 with SMTP id bj2-20020a056a02018200b003745a57cbf9mr4694200pgb.616.1647540575244; Thu, 17 Mar 2022 11:09:35 -0700 (PDT) MIME-Version: 1.0 References: <20220223191016.1658728-1-usama.anjum@collabora.com> <63c5d7ad-b0b2-9b37-16c3-354ac10858b6@collabora.com> In-Reply-To: <63c5d7ad-b0b2-9b37-16c3-354ac10858b6@collabora.com> From: Masahiro Yamada Date: Fri, 18 Mar 2022 03:08:50 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Makefile: Fix separate output directory build of kselftests To: Muhammad Usama Anjum Cc: Michal Marek , Nick Desaulniers , kernel@collabora.com, kernelci@groups.io, "Cc: Shuah Khan" , "open list:KERNEL SELFTEST FRAMEWORK" , Kees Cook , Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 Thu, Mar 17, 2022 at 7:49 PM Muhammad Usama Anjum wrote: > > Reminder. Shuah is okay with this patch. Any thoughts? I do not think this is the right fix, but something you just happen to find working. The Make is working in a wrong directory, that is why the relative path does not work (and you use the absolute path to work around it) > > On 2/24/22 12:10 AM, Muhammad Usama Anjum wrote: > > Build of kselftests fail if kernel's top most Makefile is used for > > running or building kselftests with separate output directory. The > > absolute path is needed to reference other files during this kind of > > build. Set KBUILD_ABS_SRCTREE to use absolute path during the build. It > > fixes the following different types of errors: > > > > make kselftest-all O=/linux_mainline/build > > Makefile:1080: ../scripts/Makefile.extrawarn: No such file or directory > > > > make kselftest-all O=build > > Makefile:1080: ../scripts/Makefile.extrawarn: No such file or directory > > > > Signed-off-by: Muhammad Usama Anjum > > --- > > I've tested this patch on top of next-20220217. The latest next-20220222 > > have missing patches. > > --- > > Makefile | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/Makefile b/Makefile > > index 86f633c2809ea..62b3eb8a102ab 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -1411,10 +1411,10 @@ tools/%: FORCE > > > > PHONY += kselftest > > kselftest: > > - $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests > > + $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests KBUILD_ABS_SRCTREE=1 run_tests > > > > kselftest-%: FORCE > > - $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests $* > > + $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests KBUILD_ABS_SRCTREE=1 $* > > > > PHONY += kselftest-merge > > kselftest-merge: > > -- > Muhammad Usama Anjum -- Best Regards Masahiro Yamada