Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1458158pxm; Thu, 3 Mar 2022 18:48:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEHj2RHpIwXrNDVeMVeoyv8uSA7fUZJEPtiJEMvUrCgjwMm74ruWd8DIp85hI4gnaGkymO X-Received: by 2002:a17:906:be1:b0:6ce:c3c8:b4b6 with SMTP id z1-20020a1709060be100b006cec3c8b4b6mr29026010ejg.617.1646362128902; Thu, 03 Mar 2022 18:48:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646362128; cv=none; d=google.com; s=arc-20160816; b=bbH5EBxc8B3plxY84fxJ6YfEVwxjEOomhEi/kTBqJ5g6lWUy20WO8G3f7xR2LCk0Lz gPH66TNNVym5uqQjyBQ7jEk60zIEcp4MbJcR3q2l1hm6RjrjIWE6ryxTIyXATnmv3FEH TXV6+aXV9XLCG7LsK3dGncIBltk+Z/7wqPFiNvWlT/PL79z75xSR2TrjPYkl2NM/zcVL xMW/rLkLocaiBE+dRIL5zVCO831bCU/9bieIvN33oIoLFWdw1gCAwQDXQc++0wHkwFo5 D4PQ04E8sUm7d5vMbAg8iSAN3F/MsKLA3BDbjpD+Z4s8sPRrfyVQVBWw77nmEmua70Jh KUxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ILx4YO/frrI2uIij8BdjsXHotHKo38TxZnY1ZItc5EQ=; b=AIk9GfiHFjbVPsaGE0prrXkdEnsdcCNPUnmSJY65101WqasXpsiHN+8eBp3pqwsfc9 uViJLppn/89GbBq+63W9VjGU4QO4NL001XKV5CbL7VZ2DaW/CcsiHz4pTvwz+L+K3HZr pD7DiTHhknYMDPn0ZGupWF8VAWD9tMLpNf+NGWnxna8BhQqylwVv6P9r86I6YIL3+YgC kn02gZToENruFxnF1+OA6fvTA/ya18tlc35yxx87eBggl10BhrR4SvG4T6uPDHVBaTvR xiRKTyhtvju0hOLQvzr7Ueno1pPRXmZq2+55zppy+/J4j/a4m97QX9VNlkGTz/hgaM6G 37OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=RatmbFzu; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ej2-20020a056402368200b00415f050d06esi1163589edb.585.2022.03.03.18.48.26; Thu, 03 Mar 2022 18:48:48 -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=@linuxfoundation.org header.s=google header.b=RatmbFzu; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236550AbiCCVdP (ORCPT + 99 others); Thu, 3 Mar 2022 16:33:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236549AbiCCVdN (ORCPT ); Thu, 3 Mar 2022 16:33:13 -0500 Received: from mail-il1-x12b.google.com (mail-il1-x12b.google.com [IPv6:2607:f8b0:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AB2719C23 for ; Thu, 3 Mar 2022 13:32:27 -0800 (PST) Received: by mail-il1-x12b.google.com with SMTP id b5so2420723ilj.9 for ; Thu, 03 Mar 2022 13:32:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ILx4YO/frrI2uIij8BdjsXHotHKo38TxZnY1ZItc5EQ=; b=RatmbFzuCk+bnfO4YLFG4Z2fsuqcBuH0OeG7CFdqEVgG92Xu3lvMQgL1MQ5XBKpnil knMjUPG5kybn5/4iWsdGiMlDN6qTErgcuXEu5Bf9o5iEY98jv5UZGo16Eg9u8bZL3BaF oyRZ1b84a+rLTTdUw6HDiDTZ85mqFT1RCAPwo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ILx4YO/frrI2uIij8BdjsXHotHKo38TxZnY1ZItc5EQ=; b=mfKIs9es1QtKXsAvdXJavmF3bidiI9DU8WI90FM83myuQDIfXUDuQpkA+B+mapW/zl f8zNiX3vVL413wipo6bp1HKYXgVgwHr8k24ilqy0kBs57D6AEQR+EGnzmNGBr5JFKeSf Rg9Azk1EM41SOhGPANCySp+p1d26PkfNuWkaMAa1EjshZQHZOsundp7sc/KJcEDrj4Bj /A1OfyHxIB1y5Rf/yIqLBK9cjuByW+n+DDjMGamG9cQJ2IEL9ePmVEtcZctwJlf68OcV ETR70nz3X490jk21LYsBgMFsRXhG1zwtC3ac4r0k34kXTqXJHjyIg5eq5fMmUPG/hGMG qsCQ== X-Gm-Message-State: AOAM531nhUG8wJNyEgswKchVtGvyUGdEkaXhHKOfTJwtrRK26f6xcvcA mygf+BCjvw8kdEj95mrJq/ZrmQ== X-Received: by 2002:a05:6e02:1805:b0:2c2:b8e2:4bd5 with SMTP id a5-20020a056e02180500b002c2b8e24bd5mr27458757ilv.23.1646343146476; Thu, 03 Mar 2022 13:32:26 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id a13-20020a056e02180d00b002c25b51d5ecsm3555430ilv.55.2022.03.03.13.32.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Mar 2022 13:32:25 -0800 (PST) Subject: Re: [PATCH] Makefile: Fix separate output directory build of kselftests To: Muhammad Usama Anjum , Masahiro Yamada , Michal Marek , Nick Desaulniers Cc: kernel@collabora.com, kernelci@groups.io, shuah@kernel.org, linux-kselftest@vger.kernel.org, keescook@chromium.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20220223191016.1658728-1-usama.anjum@collabora.com> From: Shuah Khan Message-ID: <6e954470-f593-e27a-d15c-ecd5c28f4dca@linuxfoundation.org> Date: Thu, 3 Mar 2022 14:32:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20220223191016.1658728-1-usama.anjum@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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/23/22 12:10 PM, 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. Can you give more details on the use-cases you tested? Did you test all the ways kselftest are built? > --- > 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: > Change looks good to me as long as all the supported use-cases work correctly. Reviewed-by: Shuah Khan thanks, -- Shuah