Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3928639pxk; Tue, 29 Sep 2020 09:36:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH4odW15vDVD7tklxJZY+fgGePBtGv6yGBhx8nnhNXWKxVl/KM0qAQBKXhau2WZJ57OfI6 X-Received: by 2002:a05:6402:142c:: with SMTP id c12mr4389736edx.41.1601397393677; Tue, 29 Sep 2020 09:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601397393; cv=none; d=google.com; s=arc-20160816; b=AB2V5JZ/qafBVBCtzxNO3hgHQzH/UytVvbSMS3SQ3X8jF9xdLZ5EvtMdlg1jQbS3VC CHjgy+b4DNfowdS5AxMwOpne2gh3j5xl7qzL0T9IUqmxeiHtUXqZ9ghN1qEEcenFnMFt 7ox7iiFSSbV381uru1lkiYMP33kmsG/rE8vxgvx9AaSFNIB15GoSDSYvp1HBjhS8HOCe qobiZm1ia5pogxrqN0C/hQms8Ad6bfkxbO+5B4fES3hHNo84+/FHoIhXOl7TI0c1LapS oc09IcxIBPvN/04ZfUwLQ7j+e4oI3OSWtUvZElFikCaine6O+CczzjvZHdlRh7SPGxyR Kw+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=AvWrqu4w8v60zfj2vEQkFZY/xpWiyVwwYui+w1mVyjU=; b=LAj7odYrVJKB1cA7U6FScIoYKaKdcv8iGIzeMZzkDnht33zM0OW82YuwGonPxl9JTj P2sh5dOvuoOJ2yLeBvILDhu3nSGL5RN6bgVWu+vcBp6Y2Lol9WkfLVt/Qaa9VvjTRwaX 8EtJR3Zg1vqrYvW6zJY/TxEiF6suROd0Kya5Gpdc/5H9RyH8RFsntzIz+5vrD9A43BXp seDqR8+eSBh6nrjzHonM8CMBi0mheznG/yI74PCUk46nkofV0rfza4fZ7//3ZmbJNStM DkpRtUoFD4zCP2L17zGzwymoM/FVFLkF6+mbFK6OX/NHqomi/xWuVRVN4G2UDAden4/V K1XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=fR1L6woB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si3221868edv.511.2020.09.29.09.36.10; Tue, 29 Sep 2020 09:36:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=fR1L6woB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728462AbgI2QfM (ORCPT + 99 others); Tue, 29 Sep 2020 12:35:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728474AbgI2QfM (ORCPT ); Tue, 29 Sep 2020 12:35:12 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E777C0613D1 for ; Tue, 29 Sep 2020 09:35:10 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id w12so4928157qki.6 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=jVjqcvxjIDrIcJjwjgQHlZmC88zg3aWCxjHPYglNZZduBhxdeQivIgM+sGIO4UAL60 THgkV2cF0dWwn+8tsOX787fnYoEPcnse8EVS4YHw9cmquTchjLn64UURT/czl3aMOcTm F+hdDE9cBkrJqcP0fEtWDArBlNKlHrt4FrV8aKM+Y+fBq+oWQpf8qdOp1nvd1/W5a96i TPA2zTKLa5J/TRXCt6vsT1F6e1DcSL0SWbZG1EP13lKofuQoE5bNnokHrkXAKah0d70V 5OTTMe/pHVEXzT1xlcC2yVfHpbrkYYdT2runDoC2atyQuHscQU1SDNP6yKrnvIS0DYY1 HozQ== X-Gm-Message-State: AOAM530HlusQFn5PoNptXb9BWSGZoGMbRIAy/3w5v7IwB2ZmdfsBvNks SOJNrM0TRIS7yEE6gSVW6FuZ2A== 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> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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