[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] Tests defs: avoid some useless subshells.
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH 4/5] Tests defs: avoid some useless subshells. |
Date: |
Sat, 20 Nov 2010 14:14:57 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
On Saturday 20 November 2010, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Mon, Nov 15, 2010 at 06:26:05PM CET:
> > * tests/defs: In the loop on "$required" tools: avoid subshells
> > where not neded.
>
> OK except for the last hunk:
>
> > --- a/tests/defs
> > +++ b/tests/defs
>
> > @@ -297,12 +297,12 @@ do
>
> > *)
> > # Generic case: the tool must support --version.
> > echo "$me: running $tool --version"
> > - ( $tool --version ) || exit 77
> > + $tool --version || exit 77
>
> It is not likely but possible that $tool is a special builtin, in which
> case the shell is allowed to exit after an error. Please leave the
> subshell here.
>
Good catch; I'll add a comment to explain why the subshell is needed
in this case.
BTW, it's ok if I add also your name to the ChangeLog entry?
Regards,
Stefano
- [PATCH 0/5] More patches for the tests-init branch, Stefano Lattarini, 2010/11/15
- [PATCH 3/5] Tests defs: some cleanup and minor fixes., Stefano Lattarini, 2010/11/15
- [PATCH 2/5] Tests defs: new subroutine `skip' for test skipping., Stefano Lattarini, 2010/11/15
- [PATCH 1/5] Tests defs: don't let useless variables leak in test scripts., Stefano Lattarini, 2010/11/15
- Re: [PATCH 0/5] More patches for the tests-init branch, Ralf Wildenhues, 2010/11/20