Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4201316imm; Mon, 6 Aug 2018 19:36:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc3B9mafkvlP33AljyJf2+AWMZFS0j01MR27KEiZZNFOnP8y4LvubZV8WIiRQyCPeu+gpBb X-Received: by 2002:a62:5290:: with SMTP id g138-v6mr19829122pfb.46.1533609363057; Mon, 06 Aug 2018 19:36:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533609363; cv=none; d=google.com; s=arc-20160816; b=kTWQgcRdzsXAdUd1iwJOhzdC21Iaekjvv4Q0eHR184Q0BKqkVl8NH/j9HyICcBpa+F uGWJuX4EbhE9bx7vjViknuB57PLoRNbhQAxY+XmQaQzJ22tTW7f1A9vaJYS8JsNuA5ic 4lVch55zjMbrlpuK5EgM8HF+VbyrUuR+j2RDhpnIR0hp6X4uQ65nwyqyUjuTxnOYRpXq UfKMPqQDjfOhj0dyuaatllnlBAWheILbDQ/9OJgCOSYa+B+VCrZbXW1XbLcGWNa0zgPS C0ho1Fd33gSpnN37WLYAoHRSxoCGqocKg9/V7BmQ+hytQes+w6ZUh9Iai1+9Mi/dmY86 1xVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=9uOxmyNr2bnD37+eNXGHepBEU8yf+fwzMZSlj7aiuL0=; b=XIE8kwDAt/AW/uFtNNeNESfGSvP8CWF7LxRzqGcb5hWAmU2s6EQEgTSVP7LhnsSxsG XHPyqvmY1nkQh3VfeIddY7yrWPV9tE2eYfDgV1GOGQw2UG0ivOZ0QdG/Odyl+U/+qcqI j9Ph7Tiqd/1nYR9yIigCNM6KTo2JWN/IdWmB09bZb1sZwvedAAxKb6Lbt24tmMdUoC49 q8RhS17SefScvx/HT+yPp1jV6+YFjXB19xBgCsvEg0j2wQvvxfB8QEEft92lyKygl+sE mn8y29ky9UMRBhbmBVm0EQbNuNBCKANdBNER5IjixV2fw4/lRo8A63Vk16QFjvIlYsR1 Q31A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=WlGnooNx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18-v6si151207pgg.152.2018.08.06.19.35.47; Mon, 06 Aug 2018 19:36:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=WlGnooNx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727548AbeHGEpW (ORCPT + 99 others); Tue, 7 Aug 2018 00:45:22 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:53340 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727289AbeHGEpW (ORCPT ); Tue, 7 Aug 2018 00:45:22 -0400 Received: from mail-ua0-f173.google.com (mail-ua0-f173.google.com [209.85.217.173]) (authenticated) by conssluserg-02.nifty.com with ESMTP id w772X71u015942; Tue, 7 Aug 2018 11:33:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com w772X71u015942 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1533609188; bh=9uOxmyNr2bnD37+eNXGHepBEU8yf+fwzMZSlj7aiuL0=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=WlGnooNxshlCkdtkSWQLeAft3g53TEhEHatByu4d/h6SzF504kT3YRwctHpIziaon 3xp5RxDKVUPJu5Z/hu1VO5XuA71Kld1dTLMRqu2cR/8Yhique8nIh2IjXptr3SQPM3 6e4q/zxCAV28g2gCqb75h2QzWMIIgiHCGwxNlo532zzIjekFYytDHIGIXeZTCTUTP5 kru2czE0oQ5ry/2+S+Fg0sjVC/cRXtIIhyeioXszlGnlnzgBEzAnabFqeq2XlyR9Yk egQQodrjJKke83zlNhZvozyXaiUhySWZWTnaMwMGDTO7b7Y26PxkNi7aDvbl97Vs2U aEItVJ+HjxLtA== X-Nifty-SrcIP: [209.85.217.173] Received: by mail-ua0-f173.google.com with SMTP id o11-v6so14483871uak.5; Mon, 06 Aug 2018 19:33:08 -0700 (PDT) X-Gm-Message-State: AOUpUlHW5L2/l49iUUEISmSk5rVHM4LEfZkfonzhJ4iaz+Ch8uLdzJgH eseKgc35ASgvdu9Q212jLtfvdYynuDnaK8anMTA= X-Received: by 2002:a1f:968f:: with SMTP id y137-v6mr10893838vkd.55.1533609187247; Mon, 06 Aug 2018 19:33:07 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:2642:0:0:0:0:0 with HTTP; Mon, 6 Aug 2018 19:32:26 -0700 (PDT) In-Reply-To: <3f332e65-0b33-9952-6aba-f9c8953a1f26@kernel.org> References: <20180413090351.25662-1-anders.roxell@linaro.org> <20180607110911.12252-1-anders.roxell@linaro.org> <3f332e65-0b33-9952-6aba-f9c8953a1f26@kernel.org> From: Masahiro Yamada Date: Tue, 7 Aug 2018 11:32:26 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4] selftests: add headers_install to lib.mk To: Shuah Khan Cc: Anders Roxell , Michal Marek , Bamvor Zhang , brgl@bgdev.pl, Paolo Bonzini , Andrew Morton , Mike Rapoport , Andrea Arcangeli , Linux Kbuild mailing list , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , Networking Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-08-07 2:03 GMT+09:00 Shuah Khan : > Hi Anders, > > On 07/25/2018 10:08 AM, Anders Roxell wrote: >> On Tue, 24 Jul 2018 at 19:11, Shuah Khan wrote: >>> >>> On 07/23/2018 02:49 PM, Anders Roxell wrote: >>>> On Thu, 7 Jun 2018 at 13:09, Anders Roxell wrote: >>>>> >>>>> If the kernel headers aren't installed we can't build all the tests. >>>>> Add a new make target rule 'khdr' in the file lib.mk to generate the >>>>> kernel headers and that gets include for every test-dir Makefile that >>>>> includes lib.mk If the testdir in turn have its own sub-dirs the >>>>> top_srcdir needs to be set to the linux-rootdir to be able to generate >>>>> the kernel headers. >>>>> >>>>> Signed-off-by: Anders Roxell >>>>> Reviewed-by: Fathi Boudra >>>>> --- >>>>> Makefile | 14 +------------- >>>>> scripts/subarch.include | 13 +++++++++++++ >>>>> tools/testing/selftests/android/Makefile | 2 +- >>>>> tools/testing/selftests/android/ion/Makefile | 2 ++ >>>>> tools/testing/selftests/futex/functional/Makefile | 1 + >>>>> tools/testing/selftests/gpio/Makefile | 7 ++----- >>>>> tools/testing/selftests/kvm/Makefile | 7 ++----- >>>>> tools/testing/selftests/lib.mk | 12 ++++++++++++ >>>>> tools/testing/selftests/net/Makefile | 1 + >>>>> .../selftests/networking/timestamping/Makefile | 1 + >>>>> tools/testing/selftests/vm/Makefile | 4 ---- >>>>> 11 files changed, 36 insertions(+), 28 deletions(-) >>>>> create mode 100644 scripts/subarch.include >>>>> >>>>> diff --git a/Makefile b/Makefile >>>>> index 6b9aea95ae3a..8050072300fa 100644 >>>>> --- a/Makefile >>>>> +++ b/Makefile >>>>> @@ -286,19 +286,7 @@ KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) >>>>> KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION) >>>>> export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION >>>>> >>>>> -# SUBARCH tells the usermode build what the underlying arch is. That is set >>>>> -# first, and if a usermode build is happening, the "ARCH=um" on the command >>>>> -# line overrides the setting of ARCH below. If a native build is happening, >>>>> -# then ARCH is assigned, getting whatever value it gets normally, and >>>>> -# SUBARCH is subsequently ignored. >>>>> - >>>>> -SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ >>>>> - -e s/sun4u/sparc64/ \ >>>>> - -e s/arm.*/arm/ -e s/sa110/arm/ \ >>>>> - -e s/s390x/s390/ -e s/parisc64/parisc/ \ >>>>> - -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ >>>>> - -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \ >>>>> - -e s/riscv.*/riscv/) >>>>> +include scripts/subarch.include >>> >>> What is the reason for this SUBARCH block move to to scripts/subarch.include? >>> Is this necessary for adding headers install dependency to lib.mk? >> >> This is needed to create headers for cross build. >> > > I am sorry for the delay on this patch. I am going to get this into 4.19. > If anybody has objections, please let me. > > Anders! Will be able to rebase the patch and send me the latest. I think > I have Acks from kvm, android, and vm so far. > I may be missing something about the tools/ directory, but why isn't it like this? kselftest: headers_install $(Q)$(MAKE) -C $(srctree)/tools/testing/selftests run_tests -- Best Regards Masahiro Yamada