Re: preparing for a new release

Jim Meyering <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <CA+8g5KH=ipEAedC3_iOixg_bgnHicAa5Xa_MPGg50Nrtw5OUgQ@mail.gmail.com>
On Sun, Nov 15, 2020 at 6:52 PM Karl Berry <[email protected]> wrote:
>
> Hi Jim - (and thanks for the test runs and logs, Gavin)
>
>       make -k check TESTS='t/txinfo-no-clutter' \
>                     AM_TESTSUITE_MAKE="make -j$(( 2*$(nproc) + 1 ))"
>
> I know little about programming for parallel (auto)make, but I'm
> guessing that with the above invocation, the make commands inside the
> test are also being run in parallel?
>
> As far as I can see, this test is simply not set up to support that. It
> essentially runs, for every format being built by texi2dvi:
>   make FMT && make clean
>
> Thus it seems to me that one make clean could be cleaning the .dvi while
> the next make ps is trying to use it.
>
> And/or, maybe dependencies are missing. all-local is depending on
> "ps pdf dvi html", so I suppose they'll get spawned in parallel.  And the
> only dependency I'm seeing is the suffix rule, .dvi.ps, so maybe the
> purportedly intermediate .dvi is getting removed by one of the parallel
> makes?  So I tried adding
>
> .PRECIOUS: %.dvi
>
> to both Makefile.am's, and the fancy make command above then succeeded.
> Does that get around the problem for you?  Doesn't exactly seem like the
> best fix, though, since ordinarily one would want the intermediate file
> to be deleted. Maybe it would be cleaner to just force serialization of
> the makes inside this test? Is that possible?
>
> Further:
>
> 1) I am not smart enough to tell what's actually happening from the log
> since there's no indication of which make is doing what (and I can't
> even imagine how that could be indicated). How does one ever debug these
> things for sure?
>
> 2) I had not seen AM_TESTSUITE_MAKE before. I was running tests simply
> with make -j12 TARGET, and there the test does not fail -- not
> surprisingly, I guess, since then (I think) the makes inside the test
> are not being run in parallel.
>
> 3) I can't see why this is anything new. That test has not changed since
> 2012. The mentioned bug
> (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=11146) describes the
> commit at that time as improving the test wrt parallelism.  Thus I
> surmise no one has ever tried with a parallel AM_TESTSUITE_MAKE before now.
>
> 4) I feel surprised that this parallelism does not cause trouble with
> other tests that involve suffix rules, like yacc or lex. I don't see
> .PRECIOUS being used in any other test, aside from precious.sh. But
> maybe no other test is doing quite what txinfo-no-clutter is.

Thanks for investigating. I've just fixed that with the attached (add
.NOTPARALLEL):
0001-tests-avoid-missing-.dvi-failure-with-parallel-tests.patch (application/octet-stream, 1 KB)
From 17e6f26a581b94254206a1ce6e3de10e5fed0dc8 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Sun, 15 Nov 2020 21:14:24 -0800
Subject: [PATCH] tests: avoid missing .dvi failure with parallel tests

* t/txinfo-no-clutter.sh: Tests of texinfo-related rules
had overlap that made them fail often when some rules were
run in parallel, so inhibit parallelism in that one directory.
See discussion starting at
https://lists.gnu.org/r/automake-patches/2020-11/msg00011.html
---
 t/txinfo-no-clutter.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/t/txinfo-no-clutter.sh b/t/txinfo-no-clutter.sh
index b311f0348..6940aa945 100644
--- a/t/txinfo-no-clutter.sh
+++ b/t/txinfo-no-clutter.sh
@@ -29,6 +29,10 @@ cat > Makefile.am << 'END'
 all-local: ps pdf dvi html # For "make distcheck".
 info_TEXINFOS = foo.texi doc/bar.texi baz.texi
 SUBDIRS = sub
+
+# Tell GNU make not to parallelize these, because they
+# have overlap between explicit and intermediate .dvi files.
+.NOTPARALLEL:
 END

 mkdir sub doc
-- 
2.29.2.154.g7f7ebe054a
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.