Re: test-framework-sh: Fix 'returns_' to not turn off tracing permanently

2024-06-20 Thread Bruno Haible
On 2024-06-11, I did: > diff --git a/tests/init.sh b/tests/init.sh > index 4689b6b758..2724f5ab67 100644 > --- a/tests/init.sh > +++ b/tests/init.sh > @@ -594,6 +594,7 @@ fi > # returns_ 1 command ... || fail > returns_ () { ># Disable tracing so it doesn't interfere with stderr of the wrap

Re: test-framework-sh: Fix 'returns_' to not turn off tracing permanently

2024-06-20 Thread Bruno Haible
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 tes

Re: test-framework-sh: Fix 'returns_' to not turn off tracing permanently

2024-06-20 Thread Bruno Haible
Hi Eric, > But as long as we're relying on Bash semantics, why not use the simpler: > > local -; set -x > > which will auto-restore $- (and hence set +x if needed) when the > function exits, rather than having to futz around with $is_tracing? Because it's not portable. It does not work with -