Re: [PATCH kvm-unit-tests 1/2] arch-run: Allow $QEMU to include parameters

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

 



On Fri, Feb 14, 2020 at 11:31:04AM +0100, Paolo Bonzini wrote:
> On 13/02/20 15:32, Andrew Jones wrote:
> > +	if [ -n "$QEMU" ]; then
> > +		set -- $QEMU
> > +		if ! "$1" --help 2>/dev/null | grep -q 'QEMU'; then
> > +			echo "\$QEMU environment variable not set to a QEMU binary." >&2
> > +			return 2
> > +		fi
> > +		qemu=$(command -v "$1")
> > +		shift
> > +		echo "$qemu $@"
> 
> I think $* is more appropriate here.  Something like "foo $@ bar" has a
> weird effect:

Will fix for v2.

> 
> 	$ set -x
> 	$ set a b c
> 
> 	$ echo "foo $@ bar"
> 	+ echo 'foo a' b 'c bar'
> 	foo a b c bar
> 
> 	$ echo "foo $* bar"
> 	+ echo 'foo a b c bar'
> 	foo a b c bar
> 
> Otherwise, this is a good idea.

Thanks,
drew

> 
> Thanks,
> 
> Paolo
> 
> > +		return
> > +	fi
> > +
> 




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux