This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Sat, Sep 15, 2012 at 03:04:37PM -0700, Roland McGrath wrote: > > If script relies upon -e behavior, then 'set -e' is preferable. However, > > the current glibc practice is $(SHELL) -e: > > That doesn't make it a good idea. If these tests do not use 'set -e' explicitly and do not rely on this mode, it means these scripts are 'set -e'-agnostic, and this practice makes sense for them. I'm not quite happy to deviate from the current practice with my first commit. It would make a bad precedent. :) If there is a strong preference to use 'set -e' inside test scripts, lets update all these cases altogether. > > set -e makes the script exit with a non-zero status if something goes > > wrong. Not the program being tested but something else. I think > > it is a good default behavior for test scripts. > > I know what it does. I can't see how it would make any possible difference > in your script, which doesn't run anything other than the tested program. The script is quite simple now, but who knows whether it will always remain that simple. One may later add a test for rtld output, which would likely run an external executable like grep or cat. I prefer to be on the safe side and make it 'set -e'-agnostic from beginning. -- ldv
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |