From mboxrd@z Thu Jan 1 00:00:00 1970 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 B4FC9C433EF for ; Tue, 12 Jul 2022 14:59:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233802AbiGLO7K (ORCPT ); Tue, 12 Jul 2022 10:59:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230462AbiGLO6y (ORCPT ); Tue, 12 Jul 2022 10:58:54 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B88AEE0B7; Tue, 12 Jul 2022 07:58:50 -0700 (PDT) Received: from [192.168.42.12] (92.40.179.87.threembb.co.uk [92.40.179.87]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: gtucker) by madras.collabora.co.uk (Postfix) with ESMTPSA id E86546601A32; Tue, 12 Jul 2022 15:58:46 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657637929; bh=HBR+7cjhP4fVVEqyGTg8INVtO0X5hd7bY9eUZpzH2nM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Q7rZKrTNV+Bxgj3CTfgaTU+5x3dUl1sIVHGaLeRM0FJ23MoSv7LZI4RysqlU85Omi /AYgxbWhuVFZ/EHfnstKlP2dZPF8Cpl4GFrapkGJckAIBVLX7qhd5W1iGG+NH/+jzs 3ESowFMqxOhwglqVaSvjj/nojOdX4yoDnr2umIYoGSj9/pZnGclyf15YiLEi5lDXLY 63lXYjZYOhLLKVTmbs6AP/reucI43smThber+Dof80LW/780hL8YqcMNr/wi3F73yV LpIUM0soaHTjOZ8Pki5FPJ5lEknM75nJlQsBFyBvnYT//4bqD6eS0yV/ratirl4t93 1H4uaMKsNh+cg== Message-ID: <950e172d-b45b-af70-972b-146c10b69714@collabora.com> Date: Tue, 12 Jul 2022 15:57:56 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 3/4] selftests: drop KSFT_KHDR_INSTALL make target Content-Language: en-US To: Anders Roxell Cc: Masahiro Yamada , Michal Marek , Nick Desaulniers , Shuah Khan , Kees Cook , Tim.Bird@sony.com, kernel@collabora.com, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org References: <4a66bf3227825bbf9007ffc9c10e52fad9ae453f.1657614127.git.guillaume.tucker@collabora.com> From: Guillaume Tucker In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/07/2022 10:59, Anders Roxell wrote: > On Tue, 12 Jul 2022 at 10:29, Guillaume Tucker > wrote: >> >> Drop the KSFT_KHDR_INSTALL make target now that all use-cases have >> been removed from the other kselftest Makefiles. >> >> Signed-off-by: Guillaume Tucker >> --- >> tools/testing/selftests/Makefile | 1 - >> tools/testing/selftests/lib.mk | 38 -------------------------------- >> 2 files changed, 39 deletions(-) >> >> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile >> index 619451e82863..e060777239a4 100644 >> --- a/tools/testing/selftests/Makefile >> +++ b/tools/testing/selftests/Makefile >> @@ -143,7 +143,6 @@ endif >> # Prepare for headers install >> include $(top_srcdir)/scripts/subarch.include >> ARCH ?= $(SUBARCH) >> -export KSFT_KHDR_INSTALL_DONE := 1 >> export BUILD >> export KHDR_INCLUDES >> >> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk >> index 2a2d240cdc1b..df5f853951f2 100644 >> --- a/tools/testing/selftests/lib.mk >> +++ b/tools/testing/selftests/lib.mk >> @@ -30,45 +30,7 @@ TEST_GEN_PROGS := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS)) >> TEST_GEN_PROGS_EXTENDED := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_PROGS_EXTENDED)) >> TEST_GEN_FILES := $(patsubst %,$(OUTPUT)/%,$(TEST_GEN_FILES)) >> >> -ifdef KSFT_KHDR_INSTALL >> -top_srcdir ?= ../../../.. >> -include $(top_srcdir)/scripts/subarch.include >> -ARCH ?= $(SUBARCH) >> - >> -# set default goal to all, so make without a target runs all, even when >> -# all isn't the first target in the file. >> -.DEFAULT_GOAL := all >> - >> -# Invoke headers install with --no-builtin-rules to avoid circular >> -# dependency in "make kselftest" case. In this case, second level >> -# make inherits builtin-rules which will use the rule generate >> -# Makefile.o and runs into >> -# "Circular Makefile.o <- prepare dependency dropped." >> -# and headers_install fails and test compile fails. >> -# O= KBUILD_OUTPUT cases don't run into this error, since main Makefile >> -# invokes them as sub-makes and --no-builtin-rules is not necessary, >> -# but doesn't cause any failures. Keep it simple and use the same >> -# flags in both cases. >> -# Note that the support to install headers from lib.mk is necessary >> -# when test Makefile is run directly with "make -C". >> -# When local build is done, headers are installed in the default >> -# INSTALL_HDR_PATH usr/include. >> -.PHONY: khdr >> -.NOTPARALLEL: >> -khdr: >> -ifndef KSFT_KHDR_INSTALL_DONE >> -ifeq (1,$(DEFAULT_INSTALL_HDR_PATH)) >> - $(MAKE) --no-builtin-rules ARCH=$(ARCH) -C $(top_srcdir) headers_install >> -else >> - $(MAKE) --no-builtin-rules INSTALL_HDR_PATH=$$OUTPUT/usr \ >> - ARCH=$(ARCH) -C $(top_srcdir) headers_install >> -endif >> -endif >> - >> -all: khdr $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) >> -else >> all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) >> -endif >> >> define RUN_TESTS >> BASE_DIR="$(selfdir)"; \ > > Should this be removed as well, since 'khdr' gets droped from file the lib.mk ? > > diff --git a/tools/testing/selftests/landlock/Makefile > b/tools/testing/selftests/landlock/Makefile > index 1313e44e8fb9..99f88c52d61a 100644 > --- a/tools/testing/selftests/landlock/Makefile > +++ b/tools/testing/selftests/landlock/Makefile > @@ -13,9 +13,6 @@ include ../lib.mk > > khdr_dir = $(top_srcdir)/usr/include > > -$(khdr_dir)/linux/landlock.h: khdr > - @: > - > $(OUTPUT)/true: true.c > $(LINK.c) $< $(LDLIBS) -o $@ -static Good point, however I think I'll drop it in PATCH 1/4 "selftests: drop khdr make target" as it's already dropped there. Ideally, the khdr dependency mentioned in this PATCH 3/4 should probably also be removed in PATCH 1/4. I'll send a v3 with this. Thanks, Guillaume