Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1076072pxm; Wed, 23 Feb 2022 17:29:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo8EgsigAu6CLipH8pEnfaQ7+e4brxUmtCp0Ej7N3O50Ps2+zDs2RrhqohrX3X0VcuEV8d X-Received: by 2002:a63:d45:0:b0:372:ead2:e05 with SMTP id 5-20020a630d45000000b00372ead20e05mr421876pgn.477.1645666192121; Wed, 23 Feb 2022 17:29:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645666192; cv=none; d=google.com; s=arc-20160816; b=HBjhGo/YCT9DgNrkE6alhAAFs540lnBeAB/GVJ/9YpRe8gObULp7KZTcNUrk2gkV+f GMQwpRIBx7lXZFMwPjw76ExQsKUheKWOW2ExxMHN5o9HgwOGOK8rBzPtY1RtQB0Llh8R iXsqSW2znYAnc+9xYNWQPViUKY1hfTeMEqigO/A4fZtueNb1JyMoukMUtLenV84f1RIN yVaoW/HBY9mm6Itjj1LBCLiMXZcdIQRFPmddLy1W2EwCl9J9yhO7rd5Os4JZFg8acSUm hqK7kf4as9eu3HbQ7+m2mNA7/x0RL8ckrNVeNii57ekyF+Uf/s9zxK0K/eItZQUkpd+6 X82A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=gSkSmy/HG2bnLZiaJLxCPYwkr/TgEYLNC+426lMUIOc=; b=UyU0MQ5y/+5jg2wwDXnt/dzsgWuSLZGDJyZI5R5ZHjxSA4qdGHh9Xxvy+IsKNwy9EB OOsHzN6kTj3m5sf4OBldlX27IFKC9mCeFesfCgujeg4maLXFirsrNJ2n22GbET6wGS5c A+DUfel/4cJhJkvLrf649oRltEtl7SKbpH4JpBOAz2SfrofR94vInzy6Y0XtDiO1I6Nz Oyw6S32wjUVS2HD1pH0JasDlb4ZGNGj6jTh+yUyF/L9F5AOjd32EQ3Aq3VgiNhD13UDQ ZSMDRFo1swqcSHJ8I0a4MTyB+6REK/okvUFA7f8hMos6116zEJGcBgTbUyEaaw2J6Cpg EabQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=CWCww7Kq; 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=collabora.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q77si1117886pfc.250.2022.02.23.17.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:29:52 -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=@collabora.com header.s=mail header.b=CWCww7Kq; 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=collabora.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B848925A94A; Wed, 23 Feb 2022 17:10:35 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244324AbiBWTQe (ORCPT + 99 others); Wed, 23 Feb 2022 14:16:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244305AbiBWTQ0 (ORCPT ); Wed, 23 Feb 2022 14:16:26 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E12DB4198F; Wed, 23 Feb 2022 11:15:57 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id B9D781F44BA3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1645643756; bh=x4JSiCOPtHsEXvsPXBpm2AoOrkiPe4lh9yMOQ/SteAw=; h=From:To:Cc:Subject:Date:From; b=CWCww7KqR8hxR5Wnu42ftHnZyk8bwfNctTtGtF+/5zFtTCQqgYP54C/4vYbayXpSl AjQsJ2OieDO1SXF/fsIgBnOaufeKla0AsZeh9WCbLD5pmxTnthifosiqev843rTsWU KOHA/7qXo/OLo/k3631gwv+jZ7gBVABv/QXg+OibsrBt46Ah3aBOPv9FRj1T4LkwDM /Gti9b2RmEWomGRkvsRsZoe+dm5zqPENEaiHSmIRDg+9pL0eAkxRuCuich/WUUohsB JJc+AKYX+FWPezodQUGiQFIo3/TWgE3RH1zlfflPlo44oJTq3Nt9WNbVyTkY0YmJMe s+PI+w5xp++lA== From: Muhammad Usama Anjum To: Masahiro Yamada , Michal Marek , Nick Desaulniers Cc: Muhammad Usama Anjum , 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: [PATCH] Makefile: Fix separate output directory build of kselftests Date: Thu, 24 Feb 2022 00:10:15 +0500 Message-Id: <20220223191016.1658728-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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 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: -- 2.30.2