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=-6.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 32F7FC4741F for ; Tue, 29 Sep 2020 16:35:13 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4FF942076D for ; Tue, 29 Sep 2020 16:35:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="fR1L6woB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FF942076D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A294B6B005C; Tue, 29 Sep 2020 12:35:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9B3AE6B005D; Tue, 29 Sep 2020 12:35:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 879A56B0062; Tue, 29 Sep 2020 12:35:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0202.hostedemail.com [216.40.44.202]) by kanga.kvack.org (Postfix) with ESMTP id 6C9256B005C for ; Tue, 29 Sep 2020 12:35:11 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id ED4243630 for ; Tue, 29 Sep 2020 16:35:10 +0000 (UTC) X-FDA: 77316648780.07.worm87_580aab02718b Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id C2BDD180445F3 for ; Tue, 29 Sep 2020 16:35:10 +0000 (UTC) X-HE-Tag: worm87_580aab02718b X-Filterd-Recvd-Size: 5148 Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Tue, 29 Sep 2020 16:35:10 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id s131so4952358qke.0 for ; Tue, 29 Sep 2020 09:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AvWrqu4w8v60zfj2vEQkFZY/xpWiyVwwYui+w1mVyjU=; b=fR1L6woBIk8eiQBenugUHgU9eVdCRDD/5atyqGvpoCazfJHmOMjvTeBvJs2Xdjheej jiV6lTQvsxMeEonqGZc2tVOZpqUQspfncpoVfSKFCqpn66Pohu9bIoAjIGrD6UGjMXrL stvCCTBoORB27HXTQOyygRY7pqwDWjZAtQ1unwlRab6EPjDztL+9F9XlqDB86NXlOWAy 6LhARGXTHsRe0GBK4OAHZU9uZtcX+WqZ8c3q+cwp0000xZRGkSsdZnIg1RruYiey178l TB34YjYUQaFhc8I7AYm2DnNVKv6vWocOkXlOgdqYUhrn9fSTSXeQcek2kBFyAUa+XXQI aHEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=AvWrqu4w8v60zfj2vEQkFZY/xpWiyVwwYui+w1mVyjU=; b=mQCrh1krjqR41+TzQFcAmtvXNoR9fBi3dEKr2oN//iN3fxnYpsItYcl9zpARuj2O2Z WJcZMvY3U8G84qhJQX/KenH8UHMTqmGco9jzJAw9BXikyuOjgsedXyt7usKgvGDUjAls i6hmbL4y9VarQLOZO2JatGUkbo9hpnIgtlC0ze1By0LipT6+RDHTx3cxwTdMDLwKL+VW zfyMmV4HWnldv4eBGTu59m55yAxVnxReI5EaiWfvKh0LBB7WpJL4z2XhrxhWAyqPoheM HDrTq81Vj1yPe3N85iPxsWNouRLhzUzv/tYBR3Laz4YasqCa5bRuYXmjqsEd8fSYp/qI 30qQ== X-Gm-Message-State: AOAM531Ds5XmcMBLHuTk9bY3K5FA7j6iBURXSKo7ztPVlPVBo2n+6452 K3kulW5/it7ikp5m/QrSrB5htA== X-Google-Smtp-Source: ABdhPJyewvSBGSVMwAlEAvWjCrriQubfC+7x0uBqT5YF2razgiDMHSz5KydCKgV0wLG7QOaWdDR93g== X-Received: by 2002:a37:a04e:: with SMTP id j75mr5059496qke.400.1601397309354; Tue, 29 Sep 2020 09:35:09 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id z26sm4994871qkj.107.2020.09.29.09.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 09:35:08 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kNIap-003Aax-P1; Tue, 29 Sep 2020 13:35:07 -0300 Date: Tue, 29 Sep 2020 13:35:07 -0300 From: Jason Gunthorpe To: John Hubbard Cc: Andrew Morton , Jonathan Corbet , =?utf-8?B?SsOpcsO0bWU=?= Glisse , Ralph Campbell , Shuah Khan , LKML , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-s390@vger.kernel.org Subject: Re: [PATCH 2/8] selftests/vm: use a common gup_test.h Message-ID: <20200929163507.GV9916@ziepe.ca> References: <20200928062159.923212-1-jhubbard@nvidia.com> <20200928062159.923212-3-jhubbard@nvidia.com> <20200928125739.GP9916@ziepe.ca> <6481e78f-c70d-133a-ff4a-325b5cd8fd5d@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6481e78f-c70d-133a-ff4a-325b5cd8fd5d@nvidia.com> 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 Mon, Sep 28, 2020 at 01:10:24PM -0700, John Hubbard wrote: > 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" > | ^~~~~~~~~~~~ You are supposed to use #include "../../../../mm/gup_test.h" I have no idea what weird behavior the makefile is triggering that the above include works Jason