qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-1.6] qemu-iotests: filter QEMU version in mo


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-1.6] qemu-iotests: filter QEMU version in monitor banner
Date: Mon, 05 Aug 2013 09:48:00 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

On 08/05/2013 07:00 AM, Stefan Hajnoczi wrote:
> Filter out the QEMU monitor version banner so that tests do not break
> when the QEMU version number is changed.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---

> +++ b/tests/qemu-iotests/common.filter
> @@ -155,7 +155,8 @@ _filter_qemu_io()
>  # replace occurrences of QEMU_PROG with "qemu"
>  _filter_qemu()
>  {
> -    sed -e "s#\\(^\\|(qemu) \\)$(basename $QEMU_PROG):#\1QEMU_PROG:#"
> +    sed -e "s#\\(^\\|(qemu) \\)$(basename $QEMU_PROG):#\1QEMU_PROG:#" \
> +        -e 's#^QEMU [0-9]\+\.[0-9]\+\.[0-9]\+ monitor#QEMU X.Y.Z monitor#'

The concept is right, but \+ is a GNU sed-ism, which is not portable to
all versions of sed.  Better would be:

-e 's#^QEMU [0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]* mon#QEMU X.Y.Z mon#'

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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