From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S31xt-00066W-OS for qemu-devel@nongnu.org; Thu, 01 Mar 2012 04:06:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S31xm-0007td-EV for qemu-devel@nongnu.org; Thu, 01 Mar 2012 04:06:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:2028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S31xm-0007sd-5c for qemu-devel@nongnu.org; Thu, 01 Mar 2012 04:06:14 -0500 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2196CFM007843 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 1 Mar 2012 04:06:12 -0500 Message-ID: <4F4F3CD7.4080205@redhat.com> Date: Thu, 01 Mar 2012 10:09:43 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1330523973-14648-1-git-send-email-kwolf@redhat.com> <4F4E6111.3060901@redhat.com> In-Reply-To: <4F4E6111.3060901@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-iotests: Filter out DOS line endings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org Am 29.02.2012 18:32, schrieb Eric Blake: > On 02/29/2012 06:59 AM, Kevin Wolf wrote: >> This one makes it possible to run qemu-iotests on a Windows build using Wine >> and get somewhat meaningful results. >> >> Signed-off-by: Kevin Wolf >> --- >> tests/qemu-iotests/common.filter | 8 +++++++- >> 1 files changed, 7 insertions(+), 1 deletions(-) >> >> diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter >> index da77ede..fa26b62 100644 >> --- a/tests/qemu-iotests/common.filter >> +++ b/tests/qemu-iotests/common.filter >> @@ -140,10 +140,16 @@ _filter_imgfmt() >> sed -e "s#$IMGFMT#IMGFMT#g" >> } >> >> +# Removes \r from messages >> +_filter_win32() >> +{ >> + sed -e 's/\r//g' > > POSIX does not require sed to recognize \r as a synonym for carriage > return. You are better off using tr(1) (tr -d '\r') if all you want to > do is strip carriage returns in a POSIX-compliant manner. Also be aware > that on Solaris, you have to make sure you are using a PATH that first > finds a POSIX-compliant tr. But who will run qemu-iotests on Wine on Solaris? Running it on Wine on Linux is already crazy enough. IIUC the sed call won't break anything, it may just not work and won't strip out the carriage returns. Well, bad luck, try a sane setup instead. (I would see it different if this was ./configure, but it is a test case output filter) Kevin