Re: tests: temporary files may be left behind

2009-11-16 Thread Jim Meyering
Bruno Haible wrote: >> I noticed that when the test-c-stack2.sh test is skipped, >> it leaves behind its temporary file. >> >> I propose to fix it by adding a trap ... 0. > > I would prefer the attached patch, because it's simpler (straightforward) > and avoids the 'trap ... 0' command which > 1.

Re: tests: temporary files may be left behind

2009-11-14 Thread Bruno Haible
Hi Jim, > I noticed that when the test-c-stack2.sh test is skipped, > it leaves behind its temporary file. > > I propose to fix it by adding a trap ... 0. I would prefer the attached patch, because it's simpler (straightforward) and avoids the 'trap ... 0' command which 1. has portability prob

Re: tests: temporary files may be left behind

2009-11-14 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 11/14/2009 8:37 AM: > Who would object to my making every test script source a file > that contains this function definition: Making every gnulib unit test shell script source a common file seems reasonable to me. - -- Do

Re: tests: temporary files may be left behind

2009-11-14 Thread Jim Meyering
Ralf Wildenhues wrote: > * Jim Meyering wrote on Sat, Nov 14, 2009 at 02:51:34PM CET: >> Ralf Wildenhues wrote: >> > But that separate patch would belong before your proposed one, as the >> > zero trap exposes this issue more. >> >> If someone actually objects, I'll change each exit N to "(exit N);

Re: tests: temporary files may be left behind

2009-11-14 Thread Ralf Wildenhues
* Jim Meyering wrote on Sat, Nov 14, 2009 at 02:51:34PM CET: > Ralf Wildenhues wrote: > > But that separate patch would belong before your proposed one, as the > > zero trap exposes this issue more. > > If someone actually objects, I'll change each exit N to "(exit N); exit N" > in the affected fi

Re: tests: temporary files may be left behind

2009-11-14 Thread Jim Meyering
Ralf Wildenhues wrote: > * Jim Meyering wrote on Sat, Nov 14, 2009 at 01:33:14PM CET: >> Ralf Wildenhues wrote: >> > Not only that, you also have to ensure to get the right exit status into >> > the zero trap, by using something like >> > (exit $N); exit $N >> > >> > throughout, see '(autoconf.in

Re: tests: temporary files may be left behind

2009-11-14 Thread Ralf Wildenhues
* Jim Meyering wrote on Sat, Nov 14, 2009 at 01:33:14PM CET: > Ralf Wildenhues wrote: > > Not only that, you also have to ensure to get the right exit status into > > the zero trap, by using something like > > (exit $N); exit $N > > > > throughout, see '(autoconf.info)Limitations of Builtins'. >

Re: tests: temporary files may be left behind

2009-11-14 Thread Jim Meyering
Ralf Wildenhues wrote: > * Jim Meyering wrote on Sat, Nov 14, 2009 at 01:11:38PM CET: >> I propose to fix it by adding a trap ... 0. >> A welcome side-effect is that with this change, you remove >> temporary files from only one place: the trap, rather >> than just prior to every other exit point. >

Re: tests: temporary files may be left behind

2009-11-14 Thread Ralf Wildenhues
Hi Jim, * Jim Meyering wrote on Sat, Nov 14, 2009 at 01:11:38PM CET: > I propose to fix it by adding a trap ... 0. > A welcome side-effect is that with this change, you remove > temporary files from only one place: the trap, rather > than just prior to every other exit point. > > The only tricky

tests: temporary files may be left behind

2009-11-14 Thread Jim Meyering
I noticed that when the test-c-stack2.sh test is skipped, it leaves behind its temporary file. I propose to fix it by adding a trap ... 0. A welcome side-effect is that with this change, you remove temporary files from only one place: the trap, rather than just prior to every other exit point. Th