On 07/10/2016 09:20 PM, Fam Zheng wrote:
> Signed-off-by: Fam Zheng <f...@redhat.com>
> ---
>  tests/docker/run | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/docker/run b/tests/docker/run
> index 575e732..38ce789 100755
> --- a/tests/docker/run
> +++ b/tests/docker/run
> @@ -11,6 +11,8 @@
>  # or (at your option) any later version. See the COPYING file in
>  # the top-level directory.
>  
> +set -e
> +

'set -e' is a crutch that often does not do what you naively expect. In
particular, it interacts very poorly with shell functions; if 'f' is a
shell function, running 'f' is different than running 'f || alternate',
in whether the body of 'f' will exit early.  I'd much rather script
without having to think about whether 'set -e' is doing the right thing,
because it usually isn't.

>  if test -n "$V"; then
>      set -x
>  fi
> @@ -61,4 +63,6 @@ elif test -n "$DEBUG"; then
>      echo
>      # Force error after shell exits
>      $SHELL && exit 1
> +else
> +    exit 1
>  fi
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to