[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: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH for-1.6] qemu-iotests: filter QEMU version in monitor banner |
Date: |
Tue, 6 Aug 2013 10:27:53 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Aug 05, 2013 at 09:48:00AM -0600, Eric Blake wrote:
> 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#'
Kevin: Feel free to squash this change.
In practice the test cases use _supported_os Linux so it only runs on
Linux hosts at the moment. But using portable code will help if someone
wants to run this on another operating system.
Stefan