From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762353AbdJQNsV (ORCPT ); Tue, 17 Oct 2017 09:48:21 -0400 Received: from mail.efficios.com ([167.114.142.141]:46440 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752540AbdJQNsU (ORCPT ); Tue, 17 Oct 2017 09:48:20 -0400 Date: Tue, 17 Oct 2017 13:50:16 +0000 (UTC) From: Mathieu Desnoyers To: Michael Ellerman Cc: "Paul E. McKenney" , Boqun Feng , Peter Zijlstra , Paul Turner , Andrew Hunter , Andy Lutomirski , Dave Watson , Josh Triplett , Will Deacon , linux-kernel , Russell King , Catalin Marinas , Thomas Gleixner , Andi Kleen , Chris Lameter , Ingo Molnar , "H. Peter Anvin" , Ben Maurer , rostedt , Linus Torvalds , Andrew Morton , shuah , linux-kselftest , linux-api Message-ID: <1618170495.42951.1508248216596.JavaMail.zimbra@efficios.com> In-Reply-To: <87d15mjc1g.fsf@concordia.ellerman.id.au> References: <20171012230326.19984-1-mathieu.desnoyers@efficios.com> <20171012230326.19984-15-mathieu.desnoyers@efficios.com> <871sm3n6sy.fsf@concordia.ellerman.id.au> <1998166049.42520.1508179805908.JavaMail.zimbra@efficios.com> <87d15mjc1g.fsf@concordia.ellerman.id.au> Subject: Re: [RFC PATCH for 4.15 14/14] Restartable sequences: Provide self-tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.141] X-Mailer: Zimbra 8.7.11_GA_1854 (ZimbraWebClient - FF52 (Linux)/8.7.11_GA_1854) Thread-Topic: Restartable sequences: Provide self-tests Thread-Index: 4FPvVfOikvmnKNSbYL8qXQkKF4Cvbg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- On Oct 17, 2017, at 6:36 AM, Michael Ellerman mpe@ellerman.id.au wrote: > Mathieu Desnoyers writes: > >> Hi Michael, >> >> With your changes integrated, both rseq and cpu-opv selftests fail to >> build if I pass e.g. -j32 to make. >> >> cd tools/testing/selftests/cpu-opv >> >> efficios@compudjdev:~/git/linux-percpu-dev/tools/testing/selftests/cpu-opv$ make >> clean; make >> rm -f -r >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test >> gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c >> cpu-op.c cpu-op.h -o basic_cpu_opv_test >> >> efficios@compudjdev:~/git/linux-percpu-dev/tools/testing/selftests/cpu-opv$ make >> clean; make -j32 >> rm -f -r >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test >> gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c >> cpu-op.c cpu-op.h -o basic_cpu_opv_test >> gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c -o >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test >> /tmp/ccDthnqM.o: In function `test_memcpy_op': >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test.c:364: >> undefined reference to `cpu_op_get_current_cpu' >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test.c:365: >> undefined reference to `cpu_opv' > ... >> make: *** >> [/home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test] >> Error 1 >> make: *** Waiting for unfinished jobs.... >> >> Any idea what is going on here ? > > Ugh sorry, yes. > > New patch below should fix it. Tested with -j: Perfect, folding it into my series. I see that the "all" target was redundant here. Thanks, Mathieu > > ~/linux/tools/testing/selftests$ make TARGETS="rseq cpu-opv" -j > make[1]: Entering directory '/home/michael/linux/tools/testing/selftests/rseq' > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ basic_test.c > rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/basic_test > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ > basic_percpu_ops_test.c rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c > ../cpu-opv/cpu-op.c ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/basic_percpu_ops_test > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ param_test.c > rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/param_test > make[1]: Leaving directory '/home/michael/linux/tools/testing/selftests/rseq' > make[1]: Entering directory > '/home/michael/linux/tools/testing/selftests/cpu-opv' > gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c > cpu-op.c cpu-op.h -o > /home/michael/linux/tools/testing/selftests/cpu-opv/basic_cpu_opv_test > make[1]: Leaving directory '/home/michael/linux/tools/testing/selftests/cpu-opv' > ~/linux/tools/testing/selftests$ make TARGETS="rseq cpu-opv" clean > make[1]: Entering directory '/home/michael/linux/tools/testing/selftests/rseq' > rm -f -r /home/michael/linux/tools/testing/selftests/rseq/basic_test > /home/michael/linux/tools/testing/selftests/rseq/basic_percpu_ops_test > /home/michael/linux/tools/testing/selftests/rseq/param_test > make[1]: Leaving directory '/home/michael/linux/tools/testing/selftests/rseq' > make[1]: Entering directory > '/home/michael/linux/tools/testing/selftests/cpu-opv' > rm -f -r /home/michael/linux/tools/testing/selftests/cpu-opv/basic_cpu_opv_test > make[1]: Leaving directory '/home/michael/linux/tools/testing/selftests/cpu-opv' > ~/linux/tools/testing/selftests$ cd cpu-opv/ > ~/linux/tools/testing/selftests/cpu-opv$ make -j > gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c > cpu-op.c cpu-op.h -o > /home/michael/linux/tools/testing/selftests/cpu-opv/basic_cpu_opv_test > ~/linux/tools/testing/selftests/cpu-opv$ make clean > rm -f -r /home/michael/linux/tools/testing/selftests/cpu-opv/basic_cpu_opv_test > ~/linux/tools/testing/selftests/cpu-opv$ cd ../rseq/ > ~/linux/tools/testing/selftests/rseq$ make -j > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ basic_test.c > rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/basic_test > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ > basic_percpu_ops_test.c rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c > ../cpu-opv/cpu-op.c ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/basic_percpu_ops_test > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ param_test.c > rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/param_test > ~/linux/tools/testing/selftests/rseq$ make clean > rm -f -r /home/michael/linux/tools/testing/selftests/rseq/basic_test > /home/michael/linux/tools/testing/selftests/rseq/basic_percpu_ops_test > /home/michael/linux/tools/testing/selftests/rseq/param_test > > > > cheers > > diff --git a/tools/testing/selftests/cpu-opv/Makefile > b/tools/testing/selftests/cpu-opv/Makefile > index 81d0596824ee..d27bd0f74deb 100644 > --- a/tools/testing/selftests/cpu-opv/Makefile > +++ b/tools/testing/selftests/cpu-opv/Makefile > @@ -1,13 +1,7 @@ > CFLAGS += -O2 -Wall -g -I./ -I../../../../usr/include/ > -LDFLAGS += -lpthread > > -TESTS = basic_cpu_opv_test > - > -all: $(TESTS) > -%: %.c cpu-op.c cpu-op.h > - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) > +TEST_GEN_PROGS = basic_cpu_opv_test > > include ../lib.mk > > -clean: > - $(RM) $(TESTS) > +$(TEST_GEN_PROGS): cpu-op.c cpu-op.h > diff --git a/tools/testing/selftests/rseq/Makefile > b/tools/testing/selftests/rseq/Makefile > index 7f0153556b80..7f625147b7fe 100644 > --- a/tools/testing/selftests/rseq/Makefile > +++ b/tools/testing/selftests/rseq/Makefile > @@ -1,13 +1,8 @@ > CFLAGS += -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ > -LDFLAGS += -lpthread > +LDLIBS += -lpthread > > -TESTS = basic_test basic_percpu_ops_test param_test > - > -all: $(TESTS) > -%: %.c rseq.h rseq-*.h rseq.c ../cpu-opv/cpu-op.c ../cpu-opv/cpu-op.h > - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) > +TEST_GEN_PROGS = basic_test basic_percpu_ops_test param_test > > include ../lib.mk > > -clean: > - $(RM) $(TESTS) > +$(TEST_GEN_PROGS): rseq.h rseq-*.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: Re: [RFC PATCH for 4.15 14/14] Restartable sequences: Provide self-tests Date: Tue, 17 Oct 2017 13:50:16 +0000 (UTC) Message-ID: <1618170495.42951.1508248216596.JavaMail.zimbra@efficios.com> References: <20171012230326.19984-1-mathieu.desnoyers@efficios.com> <20171012230326.19984-15-mathieu.desnoyers@efficios.com> <871sm3n6sy.fsf@concordia.ellerman.id.au> <1998166049.42520.1508179805908.JavaMail.zimbra@efficios.com> <87d15mjc1g.fsf@concordia.ellerman.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <87d15mjc1g.fsf-W0DJWXSxmBNbyGPkN3NxC2scP1bn1w/D@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Michael Ellerman Cc: "Paul E. McKenney" , Boqun Feng , Peter Zijlstra , Paul Turner , Andrew Hunter , Andy Lutomirski , Dave Watson , Josh Triplett , Will Deacon , linux-kernel , Russell King , Catalin Marinas , Thomas Gleixner , Andi Kleen , Chris Lameter , Ingo Molnar , "H. Peter Anvin" , Ben Maurer , rostedt , Linus Torvalds , Andrew Morton List-Id: linux-api@vger.kernel.org ----- On Oct 17, 2017, at 6:36 AM, Michael Ellerman mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org wrote: > Mathieu Desnoyers writes: > >> Hi Michael, >> >> With your changes integrated, both rseq and cpu-opv selftests fail to >> build if I pass e.g. -j32 to make. >> >> cd tools/testing/selftests/cpu-opv >> >> efficios@compudjdev:~/git/linux-percpu-dev/tools/testing/selftests/cpu-opv$ make >> clean; make >> rm -f -r >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test >> gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c >> cpu-op.c cpu-op.h -o basic_cpu_opv_test >> >> efficios@compudjdev:~/git/linux-percpu-dev/tools/testing/selftests/cpu-opv$ make >> clean; make -j32 >> rm -f -r >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test >> gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c >> cpu-op.c cpu-op.h -o basic_cpu_opv_test >> gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c -o >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test >> /tmp/ccDthnqM.o: In function `test_memcpy_op': >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test.c:364: >> undefined reference to `cpu_op_get_current_cpu' >> /home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test.c:365: >> undefined reference to `cpu_opv' > ... >> make: *** >> [/home/efficios/git/linux-percpu-dev/tools/testing/selftests/cpu-opv/basic_cpu_opv_test] >> Error 1 >> make: *** Waiting for unfinished jobs.... >> >> Any idea what is going on here ? > > Ugh sorry, yes. > > New patch below should fix it. Tested with -j: Perfect, folding it into my series. I see that the "all" target was redundant here. Thanks, Mathieu > > ~/linux/tools/testing/selftests$ make TARGETS="rseq cpu-opv" -j > make[1]: Entering directory '/home/michael/linux/tools/testing/selftests/rseq' > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ basic_test.c > rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/basic_test > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ > basic_percpu_ops_test.c rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c > ../cpu-opv/cpu-op.c ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/basic_percpu_ops_test > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ param_test.c > rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/param_test > make[1]: Leaving directory '/home/michael/linux/tools/testing/selftests/rseq' > make[1]: Entering directory > '/home/michael/linux/tools/testing/selftests/cpu-opv' > gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c > cpu-op.c cpu-op.h -o > /home/michael/linux/tools/testing/selftests/cpu-opv/basic_cpu_opv_test > make[1]: Leaving directory '/home/michael/linux/tools/testing/selftests/cpu-opv' > ~/linux/tools/testing/selftests$ make TARGETS="rseq cpu-opv" clean > make[1]: Entering directory '/home/michael/linux/tools/testing/selftests/rseq' > rm -f -r /home/michael/linux/tools/testing/selftests/rseq/basic_test > /home/michael/linux/tools/testing/selftests/rseq/basic_percpu_ops_test > /home/michael/linux/tools/testing/selftests/rseq/param_test > make[1]: Leaving directory '/home/michael/linux/tools/testing/selftests/rseq' > make[1]: Entering directory > '/home/michael/linux/tools/testing/selftests/cpu-opv' > rm -f -r /home/michael/linux/tools/testing/selftests/cpu-opv/basic_cpu_opv_test > make[1]: Leaving directory '/home/michael/linux/tools/testing/selftests/cpu-opv' > ~/linux/tools/testing/selftests$ cd cpu-opv/ > ~/linux/tools/testing/selftests/cpu-opv$ make -j > gcc -O2 -Wall -g -I./ -I../../../../usr/include/ basic_cpu_opv_test.c > cpu-op.c cpu-op.h -o > /home/michael/linux/tools/testing/selftests/cpu-opv/basic_cpu_opv_test > ~/linux/tools/testing/selftests/cpu-opv$ make clean > rm -f -r /home/michael/linux/tools/testing/selftests/cpu-opv/basic_cpu_opv_test > ~/linux/tools/testing/selftests/cpu-opv$ cd ../rseq/ > ~/linux/tools/testing/selftests/rseq$ make -j > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ basic_test.c > rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/basic_test > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ > basic_percpu_ops_test.c rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c > ../cpu-opv/cpu-op.c ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/basic_percpu_ops_test > gcc -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ param_test.c > rseq.h rseq-ppc.h rseq-x86.h rseq-arm.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -lpthread -o > /home/michael/linux/tools/testing/selftests/rseq/param_test > ~/linux/tools/testing/selftests/rseq$ make clean > rm -f -r /home/michael/linux/tools/testing/selftests/rseq/basic_test > /home/michael/linux/tools/testing/selftests/rseq/basic_percpu_ops_test > /home/michael/linux/tools/testing/selftests/rseq/param_test > > > > cheers > > diff --git a/tools/testing/selftests/cpu-opv/Makefile > b/tools/testing/selftests/cpu-opv/Makefile > index 81d0596824ee..d27bd0f74deb 100644 > --- a/tools/testing/selftests/cpu-opv/Makefile > +++ b/tools/testing/selftests/cpu-opv/Makefile > @@ -1,13 +1,7 @@ > CFLAGS += -O2 -Wall -g -I./ -I../../../../usr/include/ > -LDFLAGS += -lpthread > > -TESTS = basic_cpu_opv_test > - > -all: $(TESTS) > -%: %.c cpu-op.c cpu-op.h > - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) > +TEST_GEN_PROGS = basic_cpu_opv_test > > include ../lib.mk > > -clean: > - $(RM) $(TESTS) > +$(TEST_GEN_PROGS): cpu-op.c cpu-op.h > diff --git a/tools/testing/selftests/rseq/Makefile > b/tools/testing/selftests/rseq/Makefile > index 7f0153556b80..7f625147b7fe 100644 > --- a/tools/testing/selftests/rseq/Makefile > +++ b/tools/testing/selftests/rseq/Makefile > @@ -1,13 +1,8 @@ > CFLAGS += -O2 -Wall -g -I./ -I../cpu-opv/ -I../../../../usr/include/ > -LDFLAGS += -lpthread > +LDLIBS += -lpthread > > -TESTS = basic_test basic_percpu_ops_test param_test > - > -all: $(TESTS) > -%: %.c rseq.h rseq-*.h rseq.c ../cpu-opv/cpu-op.c ../cpu-opv/cpu-op.h > - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) > +TEST_GEN_PROGS = basic_test basic_percpu_ops_test param_test > > include ../lib.mk > > -clean: > - $(RM) $(TESTS) > +$(TEST_GEN_PROGS): rseq.h rseq-*.h rseq.c ../cpu-opv/cpu-op.c > ../cpu-opv/cpu-op.h -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com