Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3439772pxp; Tue, 8 Mar 2022 14:34:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJz55ijT+7ipxGovGUSUDRQxSgFX5Q0P12DRrrIv5abQQRj7gbybLX+wPdOiQOuVPLRqrTOM X-Received: by 2002:a17:907:1c8c:b0:6d8:795b:b458 with SMTP id nb12-20020a1709071c8c00b006d8795bb458mr14672958ejc.706.1646778849777; Tue, 08 Mar 2022 14:34:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646778849; cv=none; d=google.com; s=arc-20160816; b=sXaMPBD/9fZXH22Yy3VXA5tERCALUEwJE5tar5GpFuro9TzNj+9iswWdhkHXmk4A97 t9HbWFwtHhzF82XHO7fYLFKVqtKPQuvAHbmCjP7x+ykXkWVMrr88ohFXbDRsWuO739Uq kTDeFj79Bm6aNARUKoAx77Jqvt4wssXXYaNZiKjs4QnMzzfEiCtTwrIE7rc1eVt5bTeT UfcWFy7jx0Ro9UWiJd+gG+GOrQlEeyaSvUA6JUUh6Rmv6QAV9nzLQwU34l91svJyIvcN xlxCDh1PVxHMDV/vEf1H/5sYzNjnmtNMZHqUPbqavq8btv+szRzlylpxzm/xW4SI1/s0 N59Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=QtLIzAuYd0E2WwLbsxYT/1FwmiWK6zsoWHJK8O8wNNc=; b=mIiK8KHZ+3yqR07z/v+uo7lqytr/g8nNXVkf3uFjIuEgRPsgn58mM8yF5XtInpz3rp FS5wn4CG0TNL9AH5LszR9nfeKRZfkv5ahg1w+bywFCSU51lom4kdMh6GeKY3S8CAOCY/ 2vy0sbmtWcZbB82vv51TYhU+prkingE+/vBLdjsg4nu5owNyFA08tep+EXznejBgTJhj Zyg2jE1CtbcyI7jIfjPdz5wy8jOEyvVJHP+pJ61S79LiLBQbnud9ECCp1ef7rI8VPf17 OfaWZClFI5YnTeKbcAnOKG9IDuQY9hgTmbQMfzfeOlDptUZk4vdJdBChDAkLssxa7wRx 6YFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NGsQx+S9; 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 h15-20020a056402094f00b003fa15a996e5si85886edz.400.2022.03.08.14.33.46; Tue, 08 Mar 2022 14:34:09 -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=NGsQx+S9; 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 S239338AbiCHIMO (ORCPT + 99 others); Tue, 8 Mar 2022 03:12:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344699AbiCHIMM (ORCPT ); Tue, 8 Mar 2022 03:12:12 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 081C73ED01; Tue, 8 Mar 2022 00:11:15 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id E32481F4337F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1646727074; bh=b5ERzQo2oqbkiehexNuKVS3aYF5UF95XAAUjgJ4Isy0=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=NGsQx+S96GhtSrWrly1BUol0VPltHVwr0//zQEkMfokKpHLDe0NDEVuXXQLrqIKrh EqsMtWGORp7qJi5rGVkLb0cosMO+d12JpKwQuRLQHRnepvX1TNnp4UOgb9FxEr3908 lDu2Xbi0cLyYxDjpKoP9bgIxq2JkIslc/g1jbDeugxJOUkS7qapfly+on8h3dd6EsY RMAopm3R8gTF3IYmygPBJVzOA/hRVfI/1akYBBxvZh95L9hypO5S25xBtc/0lqhzk1 Nl474wfP74vxU2jIUl4LKmfn+1rEwO+OL3EGV4JRluF1bLtKoL9vbbb46ymr3UEe7s KGfKzOplHlTRw== Message-ID: <2ac8cecb-5e14-a8b2-7629-a9ab9d474585@collabora.com> Date: Tue, 8 Mar 2022 13:11:07 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Cc: usama.anjum@collabora.com, 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 Subject: Re: [PATCH] Makefile: Fix separate output directory build of kselftests Content-Language: en-US To: Shuah Khan , Masahiro Yamada , Michal Marek , Nick Desaulniers References: <20220223191016.1658728-1-usama.anjum@collabora.com> <6e954470-f593-e27a-d15c-ecd5c28f4dca@linuxfoundation.org> From: Muhammad Usama Anjum In-Reply-To: <6e954470-f593-e27a-d15c-ecd5c28f4dca@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 On 3/4/22 2:32 AM, Shuah Khan wrote: > 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? > Yeah, I've tried to test all the ways. Here are the different ways I've used to test it: 1) Same directory build of kselftest (this is already working) make kselftest make kselftest-all make kselftest-install make kselftest-clean make kselftest-gen_tar 2) These were failing when separate output directory is specified either as relative or absolute path. After adding this patch, these are also working. kselfetst.rst mentions separate output directory build in this way. make kselftest O=build make kselftest-all O=build make kselftest-install O=build make kselftest-clean O=build make kselftest-gen_tar O=build make kselftest O=/build make kselftest-all O=/build make kselftest-install O=/build make kselftest-clean O=/build make kselftest-gen_tar O=/build Tested on top of next-20220307 after applying this patch.