I wrote: > So, apparently, the tracing output of the 'local is_tracing=...' line is > causing the trouble. > > This patch fixes it.
This patch did not fix it. "make check" from grep's top-level directory still fails. Only "make -f Makefile check" succeeds. > This causes a test failure of the test-dfa-invalid-merge.sh test, both in the > GNU grep package and in the GNU sed package. (The same test works in a > gnulib testdir. I have no idea why??) The reason is that these packages contain an 'export VERBOSE = yes' in cfg.mk, which is included by GNUmakefile. To reproduce the failure more easily: $ VERBOSE=yes make check TESTS=test-dfa-invalid-merge.sh This fix finally works: 2024-06-20 Bruno Haible <br...@clisp.org> test-framework-sh: Fix side effect on dfa tests (regression 2024-06-11). * tests/init.sh (returns_): Silence the 'local is_tracing' assignment for real. diff --git a/tests/init.sh b/tests/init.sh index 87e6557649..c374e5f014 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -598,7 +598,7 @@ fi # returns_ 1 command ... || fail returns_ () { # Disable tracing so it doesn't interfere with stderr of the wrapped command - local is_tracing=`{ :; } 2>&1` 2>/dev/null + { local is_tracing=`{ :; } 2>&1`; } 2>/dev/null { set +x; } 2>/dev/null local exp_exit="$1"