Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3289972iog; Mon, 27 Jun 2022 12:58:36 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ubpx3no2QrIXTFwiT/DcXIfHmnns8xOiM5Zq09tncYewMzaQQqzEvdBm67hRCb3qKXng7c X-Received: by 2002:a05:6402:2682:b0:437:657f:216f with SMTP id w2-20020a056402268200b00437657f216fmr19063288edd.92.1656359916357; Mon, 27 Jun 2022 12:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656359916; cv=none; d=google.com; s=arc-20160816; b=whTqOAMo12fy8Zz+a00IBYeOqbFkLwXV29oUGza6qJBO0yfZE5ZgDJ14InBFxeeX5t N1BLQJl+PiO1+8N8v76hMmE/QA6whV5eNwY9E2AVLNjNlvp29m+NFlxWDvhTzp6Hedgw 05z+b166BZPKn/TU7m6Q5PZgYGyWU2sc1FMc0a7/Vw8GHrD1v8XznLYHqyw+1OyZ+LXX bwP4gdhWahqhIXJnajRkzg3Hn2Br7+JIseN6f1X0FS6KYpE/iMVSkJVHEEqzOkoAidE3 Tt0XZPc8/A4d1yPG8SJDtQ/ST7xyB/ttY2/sNUkfEaeE4hkfBpBJuMzMW6wyJWQrHoVH ciRw== 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=lax6tduoacbWOt589nrsDLYbyissFSu1a+cUknCvds8=; b=HoqkmOtiZq+bd1LwXv/0Rre8SKSqEqCKNZD31/P0C+Z1zv0awbQ21pPLxUdgFMdPUg JsLleNFAJwm4anVxiJ6BB1++WAuFniq2ky4XeeAwXXkQpEVWuGzdFMsbIhGoO3xwJlG7 wop9gEkRzsIbgpX06a4ZHg1Knx2j3rDjAPWjDIdkA/itpDrogO7YVsTexSyKbwOYw27R gIPeHnxCUrXsuoT0Kwzqw5c8euFZFbJP3jx0J4Yg6GjxSsWs+JveoNwWfKyjtkGr6p/t tGAfhmGK5p9WaOhCLosfMZrHSLbJUcMFKkCnWShTjokD/MLzTTyjXszN3Ca0lMYlcCcY WGig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=ax0cpW+Z; 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 y19-20020a056402359300b00435ba45ad70si15899214edc.14.2022.06.27.12.58.09; Mon, 27 Jun 2022 12:58:36 -0700 (PDT) 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=ax0cpW+Z; 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 S240331AbiF0TvK (ORCPT + 99 others); Mon, 27 Jun 2022 15:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237064AbiF0TvJ (ORCPT ); Mon, 27 Jun 2022 15:51:09 -0400 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C0DD1BE8F for ; Mon, 27 Jun 2022 12:51:08 -0700 (PDT) Received: by mail-oi1-x236.google.com with SMTP id r82so5580786oig.2 for ; Mon, 27 Jun 2022 12:51:08 -0700 (PDT) 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=lax6tduoacbWOt589nrsDLYbyissFSu1a+cUknCvds8=; b=ax0cpW+ZOtWvLU6t2mEu2n0HrO9xigxaL2BEHTp85A0NcXGE8geCFKaZ7h+T/RaFd9 zu6aOBF9iBKJLwAVY0rUSuVshbvR1ncqQUHevEzI6bMhmISB46cA3nPusoeNZYRtsTcg x9tyO/xtFP8zNC7BUrNo41zKHpks/k1kpFKhk= 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=lax6tduoacbWOt589nrsDLYbyissFSu1a+cUknCvds8=; b=KwI3Pq0Xa5cZXg6QWHBTu/IV/Zex07LZT3b1pshy7Dzi2IlnPqdFspm7srkz7rGb74 GWlKNCgqE1VDdUsE3CT6Ve6V6H9Ivptn10rSDk2oVso2p17j9zo5Kks7vjFMra7+e1RZ 0LXWZwIZw2M80vi+WJp/VdBqEv9IAyEI3QElDOcpHQxdyJGSd785p2ltyW/FBT3jXmpM 33sVpL9eDE814bn8EWZl3Uj5D7XJ9fB/fAA3kiIa5GGNmWXve4/tTfZC1HiFHgY7vmiI 4TJSHnj5lQnYAt5oWcIVNwraECGHLUtZ8Rzn0HIUh7Y2flhNWlYXRUdNdXIYFleEpZj8 BH8Q== X-Gm-Message-State: AJIora8cZLrlA+xeifdjvezXGvD96AEq69+X7CySd40terjW7za+II26 OVDXO2ytIK0TijMzkqf48Di+a5xXH4Yc9g== X-Received: by 2002:a05:6808:2113:b0:335:5252:ddf3 with SMTP id r19-20020a056808211300b003355252ddf3mr8707869oiw.94.1656359467466; Mon, 27 Jun 2022 12:51:07 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id s7-20020a056870630700b0010830c24aaasm7579135oao.56.2022.06.27.12.51.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jun 2022 12:51:07 -0700 (PDT) Subject: Re: [PATCH v1] kbuild: fix sub directory output build of kselftests To: Masahiro Yamada Cc: Muhammad Usama Anjum , Michal Marek , Nick Desaulniers , Kieran Bingham , kernel@collabora.com, Linux Kbuild mailing list , Linux Kernel Mailing List , linux-kselftest@vger.kernel.org, Shuah Khan References: <20220627070214.432390-1-usama.anjum@collabora.com> <15532d64-6744-c8a5-184b-18358211d345@linuxfoundation.org> From: Shuah Khan Message-ID: <04f168f8-0369-f0f6-8eab-9d384aced2c8@linuxfoundation.org> Date: Mon, 27 Jun 2022 13:51:06 -0600 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: 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 6/27/22 11:45 AM, Masahiro Yamada wrote: > On Tue, Jun 28, 2022 at 1:54 AM Shuah Khan wrote: >> >> On 6/27/22 1:02 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 which is >>> sub-directory. srctree is set to .. erroneously. >>> >>> 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 >>> >>> Fix this by comparing abs_srctree with CURDIR instead of abs_objtree. >>> CURDIR changes based on from where the command has been run and it sets >>> the srctree correctly. >>> >>> Fixes: 25b146c5b8cee("kbuild: allow Kbuild to start from any directory") >>> Signed-off-by: Muhammad Usama Anjum >>> --- >>> Changes in V2: >>> - Correct the bugfix instead of workaround >>> >>> V1: https://lore.kernel.org/lkml/20220223191016.1658728-1-usama.anjum@collabora.com/ >>> --- >>> Makefile | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/Makefile b/Makefile >>> index e66358b64ede..4090d7afcda4 100644 >>> --- a/Makefile >>> +++ b/Makefile >>> @@ -238,12 +238,12 @@ ifeq ($(need-sub-make),) >>> # so that IDEs/editors are able to understand relative filenames. >>> MAKEFLAGS += --no-print-directory >>> >>> -ifeq ($(abs_srctree),$(abs_objtree)) >>> +ifeq ($(abs_srctree),$(CURDIR)) >>> # building in the source tree >>> srctree := . >>> building_out_of_srctree := >>> else >>> - ifeq ($(abs_srctree)/,$(dir $(abs_objtree))) >>> + ifeq ($(abs_srctree)/,$(dir $(CURDIR))) >>> # building in a subdirectory of the source tree >>> srctree := .. >>> else >>> >> >> Please resend cc'ing linux-kselftest >> >> thanks, >> -- Shuah > > > Please do not send this any more. > This part is good as is. > + linux-kselftest@vger.kernel.org The reason I suggested resending cc'ing linux-kselftest is because this fixes a kselftest problem. I am assuming this patch will go through kbuild Acked-by: Shuah Khan thanks, -- Shuah