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 X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6968DC4727F for ; Mon, 28 Sep 2020 20:10:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AA9CE20773 for ; Mon, 28 Sep 2020 20:10:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=nvidia.com header.i=@nvidia.com header.b="Slv3IPRU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA9CE20773 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nvidia.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B93336B005D; Mon, 28 Sep 2020 16:10:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B43856B006E; Mon, 28 Sep 2020 16:10:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A5A6F6B0070; Mon, 28 Sep 2020 16:10:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0096.hostedemail.com [216.40.44.96]) by kanga.kvack.org (Postfix) with ESMTP id 8FC726B005D for ; Mon, 28 Sep 2020 16:10:29 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 522A08249980 for ; Mon, 28 Sep 2020 20:10:29 +0000 (UTC) X-FDA: 77313562578.13.frame12_2a0b40327184 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin13.hostedemail.com (Postfix) with ESMTP id 2CA8018140B67 for ; Mon, 28 Sep 2020 20:10:29 +0000 (UTC) X-HE-Tag: frame12_2a0b40327184 X-Filterd-Recvd-Size: 3862 Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Mon, 28 Sep 2020 20:10:26 +0000 (UTC) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Mon, 28 Sep 2020 13:08:45 -0700 Received: from [10.2.53.30] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 28 Sep 2020 20:10:25 +0000 Subject: Re: [PATCH 2/8] selftests/vm: use a common gup_test.h To: Jason Gunthorpe CC: Andrew Morton , Jonathan Corbet , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Ralph Campbell , Shuah Khan , LKML , , , , References: <20200928062159.923212-1-jhubbard@nvidia.com> <20200928062159.923212-3-jhubbard@nvidia.com> <20200928125739.GP9916@ziepe.ca> From: John Hubbard Message-ID: <6481e78f-c70d-133a-ff4a-325b5cd8fd5d@nvidia.com> Date: Mon, 28 Sep 2020 13:10:24 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200928125739.GP9916@ziepe.ca> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1601323725; bh=IAnhMRFhLfn/o6VnG/j9EvoCmqTmaObpHGzh20VLI9s=; h=Subject:To:CC:References:From:Message-ID:Date:User-Agent: MIME-Version:In-Reply-To:Content-Type:Content-Language: Content-Transfer-Encoding:X-Originating-IP:X-ClientProxiedBy; b=Slv3IPRUCeDcWuWxM01TTCUoBJWicUemyGsxm/6RNDdcGQpHWQLGXDmIOGle6OOzh Z13TcLVKa9oyblsqo/g5IF/kN/sYc6kmWKe7ToJhj4aSX55bNSXnJAB9jmdf0RyPr5 5xX62Yli3Gq/8uK34J0zfHHo9SfVNnknqzANpt3D1d7I11DTt0r7eJdimwfz4sKFci K+OJvAfBY4Him88DqKw3E1qgSea6y3oJ6KDyZtsKESoB4z7qAgbG2Xyrq55AJsp393 QcOX6hxekpQouSt3/HCpYTYEdRbcU6DqhNUhQwALEnKykLFoG0r2GY7JAQUKfyzALi /UCG9d8kRPtFQ== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 9/28/20 5:57 AM, Jason Gunthorpe wrote: > On Sun, Sep 27, 2020 at 11:21:53PM -0700, John Hubbard wrote: >> diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile >> index d1ae706d9927..9cc6bc087461 100644 >> +++ b/tools/testing/selftests/vm/Makefile >> @@ -130,3 +130,5 @@ endif >> $(OUTPUT)/userfaultfd: LDLIBS += -lpthread >> >> $(OUTPUT)/mlock-random-test: LDLIBS += -lcap >> + >> +$(OUTPUT)/gup_test: ../../../../mm/gup_test.h > > There is no reason to do this, the auto depends will pick up header > files, and gup_test.h isn't a generated file > It is less capable than you might think. Without the admittedly ugly technique above, it fails to build, and as you can see, the include paths that are fed to gcc are just a single one: usr/include: $ make make --no-builtin-rules ARCH=x86 -C ../../../.. headers_install gcc -Wall -I ../../../../usr/include gup_test.c /kernel_work/linux-next-github/tools/testing/selftests/kselftest_harness.h /kernel_work/linux-next-github/tools/testing/selftests/kselftest.h ../../../../mm/gup_test.h -lrt -o /kernel_work/linux-next-github/tools/testing/selftests/vm/gup_test make[1]: Entering directory '/kernel_work/linux-next-github' gup_test.c:10:10: fatal error: gup_test.h: No such file or directory 10 | #include "gup_test.h" | ^~~~~~~~~~~~ thanks, -- John Hubbard NVIDIA