* [Qemu-devel] [PATCH] qemu-iotests: Filter out DOS line endings
@ 2012-02-29 13:59 Kevin Wolf
2012-02-29 14:17 ` Stefan Hajnoczi
2012-02-29 17:32 ` Eric Blake
0 siblings, 2 replies; 5+ messages in thread
From: Kevin Wolf @ 2012-02-29 13:59 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf
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 <kwolf@redhat.com>
---
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'
+}
+
# sanitize qemu-io output
_filter_qemu_io()
{
- sed -e "s/[0-9]* ops\; [0-9/:. sec]* ([0-9/.inf]* [EPTGMKiBbytes]*\/sec and [0-9/.inf]* ops\/sec)/X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/"
+ _filter_win32 | sed -e "s/[0-9]* ops\; [0-9/:. sec]* ([0-9/.inf]* [EPTGMKiBbytes]*\/sec and [0-9/.inf]* ops\/sec)/X ops\; XX:XX:XX.X (XXX YYY\/sec and XXX ops\/sec)/"
}
# make sure this script returns success
--
1.7.6.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-iotests: Filter out DOS line endings
2012-02-29 13:59 [Qemu-devel] [PATCH] qemu-iotests: Filter out DOS line endings Kevin Wolf
@ 2012-02-29 14:17 ` Stefan Hajnoczi
2012-02-29 17:32 ` Eric Blake
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2012-02-29 14:17 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
On Wed, Feb 29, 2012 at 1:59 PM, Kevin Wolf <kwolf@redhat.com> 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 <kwolf@redhat.com>
> ---
> tests/qemu-iotests/common.filter | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
This and the other two qemu-iotests patches you posted along with it:
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-iotests: Filter out DOS line endings
2012-02-29 13:59 [Qemu-devel] [PATCH] qemu-iotests: Filter out DOS line endings Kevin Wolf
2012-02-29 14:17 ` Stefan Hajnoczi
@ 2012-02-29 17:32 ` Eric Blake
2012-03-01 9:09 ` Kevin Wolf
1 sibling, 1 reply; 5+ messages in thread
From: Eric Blake @ 2012-02-29 17:32 UTC (permalink / raw)
To: Kevin Wolf; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]
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 <kwolf@redhat.com>
> ---
> 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.
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-iotests: Filter out DOS line endings
2012-02-29 17:32 ` Eric Blake
@ 2012-03-01 9:09 ` Kevin Wolf
2012-03-02 6:55 ` Paolo Bonzini
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Wolf @ 2012-03-01 9:09 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-devel
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 <kwolf@redhat.com>
>> ---
>> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-iotests: Filter out DOS line endings
2012-03-01 9:09 ` Kevin Wolf
@ 2012-03-02 6:55 ` Paolo Bonzini
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2012-03-02 6:55 UTC (permalink / raw)
To: qemu-devel
Il 01/03/2012 10:09, Kevin Wolf ha scritto:
> 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.
It would strip "r"s. I also suggest using tr.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-02 6:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-29 13:59 [Qemu-devel] [PATCH] qemu-iotests: Filter out DOS line endings Kevin Wolf
2012-02-29 14:17 ` Stefan Hajnoczi
2012-02-29 17:32 ` Eric Blake
2012-03-01 9:09 ` Kevin Wolf
2012-03-02 6:55 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).