qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH 04/10] qemu-iotests: cleanup and fi


From: Paolo Bonzini
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH 04/10] qemu-iotests: cleanup and fix search for programs
Date: Tue, 12 Sep 2017 17:26:56 -0400 (EDT)


> > +then
> > +    if [ -x "$build_iotests/qemu" ]; then
> > +        export QEMU_PROG="$build_iotests/qemu"
> > +    elif [ -x "$build_root/$arch-softmmu/qemu-system-$arch" ]; then
> > +        export QEMU_PROG="$build_root/$arch-softmmu/qemu-system-$arch"
> > +    else
> > +        pushd "$build_root" > /dev/null
> 
> Shouldn't you check for failure to change directories?
>  
> >  export PWD=`pwd`
> >  
> > @@ -30,28 +31,6 @@ export _QEMU_HANDLE=0
> >  # make sure we have a standard umask
> >  umask 022
> >  
> > -# $1 = prog to look for, $2* = default pathnames if not found in $PATH
> > -set_prog_path()
> > -{
> > -    p=`command -v $1 2> /dev/null`
> > -    if [ -n "$p" -a -x "$p" ]; then
> 
> Urrgh - your use of [ -a ] was pre-existing, and you just moved it.

And same for pushd...

Paolo



reply via email to

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