Re: [kvm-unit-tests PATCH 4/5] scripts/arch-run: fix qemu binary search failure path

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

 




On 28/06/2017 22:08, Radim Krčmář wrote:
> Doing exit from a subshell won't exit the main shell, so arch-run will
> try to continue without a working QEMU if search_qemu_binary() failed.

Should it be "exit $?"?

Apart from this looks good.  I can do the change.

Paolo

> Also fix error message from search_qemu_binary().
> 
> Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx>
> ---
> I was thinking about using `set -e` instead, so the "return 2" from
> search_qemu_binary() would stop the script without the explicit exit.
> It required just four changes to make the script work (resulting in
> better diffstat), but would likely complicate future development.
> 
> The second alternative would be to call just "search_qemu_binary" and
> set the qemu variable from it.  This would allow "exit 2" from
> search_qemu_binary() to also exit arch/run, but side-effects on
> variables seem worse than the first alternative ...
> ---



[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