From patchwork Fri Jul 26 01:00:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 33802 Received: (qmail 67375 invoked by alias); 26 Jul 2019 01:00:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 67363 invoked by uid 89); 26 Jul 2019 01:00:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=automated, H*i:sk:4d4c8be X-HELO: mx1.redhat.com From: DJ Delorie To: "Carlos O'Donell" Cc: joseph@codesourcery.com, libc-alpha@sourceware.org Subject: Re: RFC: make fastcheck In-Reply-To: <4d4c8be7-d04d-8206-d484-6e4b16b36d5f@redhat.com> (carlos@redhat.com) Date: Thu, 25 Jul 2019 21:00:22 -0400 Message-ID: MIME-Version: 1.0 "Carlos O'Donell" writes: > I think that the support infrastructure could be told it's running > a threaded test, and then allow them to be parallelized up to a > point, perhaps a load factor, or something else. > > The first step would obviously be: > > * For all nptl tests support serializes them with a lock file. > * Remove .NOTPARALLEL. Given the huge number of tests in nptl, I'd try a makefile-based serialization first, since the list could be automated. I'm testing this (requires make 3.80) and it seems to work, but not perfectly (maybe it's just remnants of tests still running where ps can see them, but there are two real FAILs for some reason). Saves about 1.5 minutes (out of 15) off a "rm -rf nptl; make; make check" (and yes, I know, the tests are run in reverse order ;) diff --git a/nptl/Makefile b/nptl/Makefile index 0567e77a79..1eb7fd4286 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -666,7 +666,7 @@ $(objpfx)tst-cleanup0.out: /dev/null $(objpfx)tst-cleanup0 $(evaluate-test) $(objpfx)tst-cleanup0-cmp.out: tst-cleanup0.expect $(objpfx)tst-cleanup0.out - cmp $^ > $@; \ + cmp tst-cleanup0.expect $(objpfx)tst-cleanup0.out > $@; \ $(evaluate-test) $(objpfx)crti.o: $(objpfx)pt-crti.o @@ -723,7 +723,14 @@ tst-audit-threads-ENV = LD_AUDIT=$(objpfx)tst-audit-threads-mod1.so CFLAGS-tst-unwind-thread.c += -funwind-tables +ALLTESTS = $(tests:%=$(objpfx)%.out) $(tests-internal:%=$(objpfx)%.out) \ + $(tests-container:%=$(objpfx)%.out) \ + $(tests-special) $(tests-printers-out) \ + $(xtests:%=$(objpfx)%.out) $(xtests-special) + +ALLBUTFIRSTTEST = $(filter-out $(firstword $(ALLTESTS)), $(ALLTESTS)) +ALLBUTLASTTEST = $(filter-out $(lastword $(ALLTESTS)), $(ALLTESTS)) +TESTPAIRS = $(join $(ALLBUTLASTTEST),$(addprefix :|,$(ALLBUTFIRSTTEST))) + # The tests here better do not run in parallel -ifneq ($(filter %tests,$(MAKECMDGOALS)),) -.NOTPARALLEL: -endif +$(foreach pair,$(TESTPAIRS),$(eval $(pair)))