From: Bandan Das Subject: Re: [PATCH] x86-run: Print a meaningful message if the qemu binary isn't found Date: Thu, 09 Apr 2015 13:14:04 -0400 Message-ID: References: <551D3A47.1030404@redhat.com> <5526AC5E.7050803@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Cc: kvm@vger.kernel.org, Marcelo Tosatti To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39035 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754016AbbDIROI (ORCPT ); Thu, 9 Apr 2015 13:14:08 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 774078E667 for ; Thu, 9 Apr 2015 17:14:06 +0000 (UTC) In-Reply-To: <5526AC5E.7050803@redhat.com> (Paolo Bonzini's message of "Thu, 09 Apr 2015 18:44:14 +0200") Sender: kvm-owner@vger.kernel.org List-ID: Paolo Bonzini writes: ... > This breaks "QEMU=... ./x86-run ./x86/msr.flat" > > Fixed as follows: > > diff --git a/x86/run b/x86/run > index d5adf8d..219a93b 100755 > --- a/x86/run > +++ b/x86/run > @@ -20,16 +20,15 @@ else > break > fi > done > -fi > - > -if [ -z "${QEMUFOUND}" ] > -then > - echo "A QEMU binary was not found, You can set a custom location by using the QEMU= environment variable " > - exit ${NOTFOUND} > -elif [ -z "${qemu}" ] > -then > - echo "No Qemu test device support found" > - exit ${TESTDEVNOTSUPP} > + if [ -z "${QEMUFOUND}" ] > + then > + echo "A QEMU binary was not found, You can set a custom location by using the QEMU= environment variable " > + exit ${NOTFOUND} > + elif [ -z "${qemu}" ] > + then > + echo "No Qemu test device support found" I think we still want to print this if the user supplied qemu has no test device support. I think this is better - --- a/x86/run +++ b/x86/run @@ -8,6 +8,7 @@ qemusystem="${QEMU:-qemu-system-x86_64}" if ! [ -z "${QEMU}" ] then qemu="${QEMU}" + QEMUFOUND=1 else for qemucmds in ${qemukvm} ${qemusystem} do > + exit ${TESTDEVNOTSUPP} > + fi > fi > > if > > which apart from reindentation is just moving a "fi" down. > Paolo