Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA7E4C433EF for ; Wed, 4 May 2022 09:02:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236921AbiEDJFv (ORCPT ); Wed, 4 May 2022 05:05:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232414AbiEDJFt (ORCPT ); Wed, 4 May 2022 05:05:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B7921705B for ; Wed, 4 May 2022 02:02:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 269A86192E for ; Wed, 4 May 2022 09:02:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89F9EC385A4; Wed, 4 May 2022 09:02:11 +0000 (UTC) Date: Wed, 4 May 2022 10:02:07 +0100 From: Catalin Marinas To: Mark Brown Cc: Will Deacon , Shuah Khan , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] kselftest/arm64: Fix ABI header directory location Message-ID: References: <20220503231655.211346-1-broonie@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220503231655.211346-1-broonie@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Wed, May 04, 2022 at 12:16:55AM +0100, Mark Brown wrote: > Currently the arm64 kselftests attempt to locate the ABI headers using > custom logic which doesn't work correctly in the case of out of tree builds > if KBUILD_OUTPUT is not specified. Since lib.mk defines KHDR_INCLUDES with > the appropriate flags we can simply remove the custom logic and use that > instead. > > Signed-off-by: Mark Brown > --- > > This fix is required to get us able to run the arm64 kselftests > in KernelCI, it does out of tree kselftest builds triggering the > issue especially in conjunction with the addition of the new > definitions for SME. > > tools/testing/selftests/arm64/Makefile | 11 +---------- > 1 file changed, 1 insertion(+), 10 deletions(-) > > diff --git a/tools/testing/selftests/arm64/Makefile b/tools/testing/selftests/arm64/Makefile > index 1e8d9a8f59df..9460cbe81bcc 100644 > --- a/tools/testing/selftests/arm64/Makefile > +++ b/tools/testing/selftests/arm64/Makefile > @@ -17,16 +17,7 @@ top_srcdir = $(realpath ../../../../) > # Additional include paths needed by kselftest.h and local headers > CFLAGS += -I$(top_srcdir)/tools/testing/selftests/ > > -# Guessing where the Kernel headers could have been installed > -# depending on ENV config > -ifeq ($(KBUILD_OUTPUT),) > -khdr_dir = $(top_srcdir)/usr/include > -else > -# the KSFT preferred location when KBUILD_OUTPUT is set > -khdr_dir = $(KBUILD_OUTPUT)/kselftest/usr/include > -endif > - > -CFLAGS += -I$(khdr_dir) > +CFLAGS += $(KHDR_INCLUDES) Great, thanks. I had exactly the same diff stashed last week when testing the kselftest branch, just forgot about posting it. I'll apply yours. -- Catalin