From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6ccg-00080Y-JQ for qemu-devel@nongnu.org; Tue, 06 Aug 2013 04:28:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6ccX-0003dc-VP for qemu-devel@nongnu.org; Tue, 06 Aug 2013 04:28:06 -0400 Received: from mail-wi0-x22b.google.com ([2a00:1450:400c:c05::22b]:46404) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6ccX-0003dU-Lq for qemu-devel@nongnu.org; Tue, 06 Aug 2013 04:27:57 -0400 Received: by mail-wi0-f171.google.com with SMTP id hr7so2373131wib.4 for ; Tue, 06 Aug 2013 01:27:57 -0700 (PDT) Date: Tue, 6 Aug 2013 10:27:53 +0200 From: Stefan Hajnoczi Message-ID: <20130806082753.GB32024@stefanha-thinkpad.redhat.com> References: <1375707618-916-1-git-send-email-stefanha@redhat.com> <51FFC930.8010306@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51FFC930.8010306@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-1.6] qemu-iotests: filter QEMU version in monitor banner List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi 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 > > --- > > > +++ 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