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 <stefa...@redhat.com> > > --- > > > +++ 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