bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tests: temporary files may be left behind


From: Jim Meyering
Subject: Re: tests: temporary files may be left behind
Date: Sat, 14 Nov 2009 16:37:50 +0100

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); exit N"
>> in the affected files, but I think it's not worthwhile, since few people
>> test on OSF1/Tru64, and even fewer use "ash" for /bin/sh.
>
> Doesn't this hit you with zsh and with Solaris /bin/sh, too?

Yes, you're right.  That constitutes too big a group, so...

Who would object to my making every test script source a file
that contains this function definition:

# We use a trap below for cleanup.  This requires us to go through
# hoops to get the right exit status transported through the signal.
# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
# sh inside this function.
Exit ()
{
  set +e
  (exit $1)
  exit $1
}

*Then* I'll make every test use Exit in place of most uses of "exit".




reply via email to

[Prev in Thread] Current Thread [Next in Thread]