From patchwork Mon Jul 16 19:52:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 10527661 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 352DD600D0 for ; Mon, 16 Jul 2018 19:52:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2144128D3E for ; Mon, 16 Jul 2018 19:52:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1484F28D4B; Mon, 16 Jul 2018 19:52:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 827FA28D3E for ; Mon, 16 Jul 2018 19:52:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 6581921BADAB9; Mon, 16 Jul 2018 12:52:53 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=willy@infradead.org; receiver=kbuild-all@01.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CFC182097F55E; Mon, 16 Jul 2018 12:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Vgru6mCXblOtVcGBcYglADQgqrK9xp8e8cVQc7K986Q=; b=eXQ4rBPAUBsHn2QUgW7KcYARb TRJd5jYAOfh4PH/hmoBf0WS/2VlMDxKOxQD9bDQW9i3WLTE2h96zLDgBerDrPUb1CMe0Brh9UHvm9 TDzxQ6I+iY4NY6gjzxMNSWleq/sZ0Z9srqUu6ZvRkleAf/RzZAe1nd4OvcS+kFR7+om9A9Q58hKmh o1e1OIfo/MdUqpxNrDLXZAzX/oL2U6AwYsLu14xTtsMWhRnho4y3AVIYifSAnKo4DhAyCEyh6g3pI T32O9k1WRKIKUuEiuBPJ6vRWBaJOOU+aps1kMbAopCnxvxs6yMK+UO0PDtxhlYX4/jPq6C8HPW7d5 ytT2J5pLg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1ff9Y9-0000EI-60; Mon, 16 Jul 2018 19:52:49 +0000 Date: Mon, 16 Jul 2018 12:52:49 -0700 From: Matthew Wilcox To: Ross Zwisler Subject: Re: [PATCH 1/5] radix tree test suite: fix mapshift build target Message-ID: <20180716195249.GA14380@bombadil.infradead.org> References: <20180503192430.7582-1-ross.zwisler@linux.intel.com> <20180503192430.7582-2-ross.zwisler@linux.intel.com> <20180715230052.GA6486@bombadil.infradead.org> <20180716160710.GA2287@linux.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180716160710.GA2287@linux.intel.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jan Kara , kbuild test robot , linux-nvdimm@lists.01.org, Dave Chinner , linux-kernel@vger.kernel.org, kbuild-all@01.org, Andrew Morton , Christoph Hellwig Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jul 16, 2018 at 10:07:10AM -0600, Ross Zwisler wrote: > On Sun, Jul 15, 2018 at 04:00:52PM -0700, Matthew Wilcox wrote: > > On Thu, May 03, 2018 at 01:24:26PM -0600, Ross Zwisler wrote: > > > Unfortunately, this phony target doesn't actually work as a dependency, so > > > you end up getting: > > > > > > $ make > > > make: *** No rule to make target 'generated/map-shift.h', needed by 'main.o'. Stop. > > > make: *** Waiting for unfinished jobs.... > > > > > > Fix this by making the file generated/map-shift.h our real makefile target, > > > and add this a dependency of the top level build target. > > > > This commit breaks typing 'make SHIFT=6'. It doesn't rebuild the > > test suite any more. If I revert this patch, it works. Also, I can't > > reproduce the problem you're reporting here. So ... how do I reproduce > > it? Otherwise, I'm just going to revert this patch since it regresses > > a feature I find useful. > > The test suite builds fine for me in v4.17. From a completely clean tree, in > tools/testing/radix-tree: > > $ make > sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < ../../../lib/radix-tree.c > radix-tree.c > sed -e 's/^static //' -e 's/__always_inline //' -e 's/inline //' < ../../../lib/idr.c > idr.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o main.o main.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o linux.o linux.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o test.o test.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o find_bit.o ../../lib/find_bit.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o regression1.o regression1.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o regression2.o regression2.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o regression3.o regression3.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o tag_check.o tag_check.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o multiorder.o multiorder.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o idr-test.o idr-test.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o iteration_check.o iteration_check.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o benchmark.o benchmark.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o idr.o idr.c > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o radix-tree.o radix-tree.c > cc -fsanitize=address multiorder.o radix-tree.o idr.o linux.o test.o find_bit.o -lpthread -lurcu -o multiorder > cc -fsanitize=address main.o radix-tree.o idr.o linux.o test.o find_bit.o regression1.o regression2.o regression3.o tag_check.o multiorder.o idr-test.o iteration_check.o benchmark.o -lpthread -lurcu -o main > cc -fsanitize=address idr-test.o radix-tree.o idr.o linux.o test.o find_bit.o -lpthread -lurcu -o idr-test > > and you can successfully run the radix tree test suite by running 'main'. > > With the above mentioned commit reverted, this build fails: > > $ make > make: *** No rule to make target 'generated/map-shift.h', needed by 'main.o'. Stop. > make: *** Waiting for unfinished jobs.... OK ... what version of make are you using? Because this works fine for me: $ git clone linux clean $ cd clean $ git checkout v4.17 $ cd tools/testing/radix-tree/ $ git revert 8d9fa88edd5e360b71765feeadb915d4066c9684 $ make $ make --version GNU Make 4.1 Built for x86_64-pc-linux-gnu It's Debian's Version: 4.1-9.1 > If you want generated/map-shift.h to be rebuilt each time you run 'make' so > that it can take a new SHIFT argument, that's fine, but let's not make users > run 'make mapshift' before an actual 'make' will work, which is where we're at > with v4.17 with my commit reverted. I don't want it to be rebuilt, I want it to be checked before each build, regenerated if SHIFT has changed, and everything to rebuild if it has changed. > Incidentally, in the current linux/master the radix tree test suite again > fails to build: > > cc -I. -I../../include -g -O2 -Wall -D_LGPL_SOURCE -fsanitize=address -c -o radix-tree.o radix-tree.c > idr.c:7:10: fatal error: linux/xarray.h: No such file or directory > #include > ^~~~~~~~~~~~~~~~ > compilation terminated. > make: *** [: idr.o] Error 1 > > Can you look into this? Ah ... Andrew broke it fixing something else ;-) The first commit in my xarray branch fixes it -- looks like I tested my own commits but not the commit I based on ;-) > 0-day folks, would it be possible for you to add a radix tree build & test > runs to your automated tests? We would really appreciate any help in reducing > this kind of breakage, which seems to happen pretty often. Yeah, that would be good. diff --git a/tools/testing/radix-tree/linux/xarray.h b/tools/testing/radix-tree/linux/xarray.h new file mode 100644 index 000000000000..df3812cda376 --- /dev/null +++ b/tools/testing/radix-tree/linux/xarray.h @@ -0,0 +1,2 @@ +#include "generated/map-shift.h" +#include "../../../../include/linux/xarray.h"