All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Bandan Das <bsd@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH RESEND kvm-unit-tests] x86/run: Rearrange the valid binary and testdev support checks
Date: Thu, 07 May 2015 11:00:29 +0200	[thread overview]
Message-ID: <554B29AD.5020605@redhat.com> (raw)
In-Reply-To: <jpg383krpli.fsf@redhat.com>



On 28/04/2015 21:59, Bandan Das wrote:
> 
> This extends the sanity checks done on known common Qemu binary
> paths when the user supplies a QEMU= on the command line
> 
> Fixes: b895b967db94937d5b593c51b95eb32d2889a764
> 
> Signed-off-by: Bandan Das <bsd@redhat.com>
> ---
>  x86/run | 43 +++++++++++++++++++------------------------
>  1 file changed, 19 insertions(+), 24 deletions(-)
> 
> diff --git a/x86/run b/x86/run
> index 219a93b..5281fca 100755
> --- a/x86/run
> +++ b/x86/run
> @@ -2,33 +2,28 @@
>  NOTFOUND=1
>  TESTDEVNOTSUPP=2
>  
> -qemukvm="${QEMU:-qemu-kvm}"
> -qemusystem="${QEMU:-qemu-system-x86_64}"
> +qemubinarysearch="${QEMU:-qemu-kvm qemu-system-x86_64}"
>  
> -if      ! [ -z "${QEMU}" ]
> -then
> -	qemu="${QEMU}"
> -else
> -	for qemucmds in ${qemukvm} ${qemusystem}
> -	do
> -		unset QEMUFOUND
> -		unset qemu
> -		if ! [ -z "${QEMUFOUND=$(${qemucmds} --help 2>/dev/null | grep "QEMU")}" ] &&
> -		       ${qemucmds} -device '?' 2>&1 | grep -F -e \"testdev\" -e \"pc-testdev\" > /dev/null;
> -		then
> -		    qemu="${qemucmds}"
> -		    break
> -		fi
> -	done
> -	if      [ -z "${QEMUFOUND}" ]
> -	then
> -		echo "A QEMU binary was not found, You can set a custom location by using the QEMU=<path> environment variable "
> -		exit ${NOTFOUND}
> -	elif    [ -z "${qemu}" ]
> +for qemucmd in ${qemubinarysearch}
> +do
> +	unset QEMUFOUND
> +	unset qemu
> +	if ! [ -z "${QEMUFOUND=$(${qemucmd} --help 2>/dev/null | grep "QEMU")}" ] &&
> +			${qemucmd} -device '?' 2>&1 | grep -F -e \"testdev\" -e \"pc-testdev\" > /dev/null;
>  	then
> -		echo "No Qemu test device support found"
> -		exit ${TESTDEVNOTSUPP}
> +		qemu="${qemucmd}"
> +		break
>  	fi
> +done
> +
> +if      [ -z "${QEMUFOUND}" ]
> +then
> +	echo "A QEMU binary was not found, You can set a custom location by using the QEMU=<path> environment variable "
> +	exit ${NOTFOUND}
> +elif    [ -z "${qemu}" ]
> +then
> +	echo "No Qemu test device support found"
> +	exit ${TESTDEVNOTSUPP}
>  fi
>  
>  if
> 

Applied now, thanks!

Paolo

      reply	other threads:[~2015-05-07  9:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-28 19:59 [PATCH RESEND kvm-unit-tests] x86/run: Rearrange the valid binary and testdev support checks Bandan Das
2015-05-07  9:00 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554B29AD.5020605@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bsd@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.