[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] qemu-iotests: Filter HMP readl
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] qemu-iotests: Filter HMP readline escape characters |
Date: |
Thu, 13 Apr 2017 12:44:33 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 04/13/2017 12:38 PM, Eric Blake wrote:
> On 04/13/2017 12:23 PM, Kevin Wolf wrote:
>> The only thing the escape characters achieve is making the reference
>> output unreadable and lines that are potentially so long that git
>> doesn't want to put them into an email any more. Let's filter them out.
>
> Hear! Hear!
>
>> +++ b/tests/qemu-iotests/common.filter
>> @@ -86,6 +86,13 @@ _filter_qmp()
>> -e ' QMP_VERSION'
>> }
>>
>> +# readline makes HMP command strings so long that git complains
>> +_filter_hmp()
>> +{
>> + sed -e 's/(qemu).*\o33\[D/(qemu) /g' \
>
> \oNN is a GNU sed-ism, as far as I can tell. Is it portable to our
> BSD/MacOS builds?
And if it's not, qemu-iotests are running under bash, so writing this as:
sed -e $'s/(qemu).*\e\\[D/(qemu) /g'
>
>> + -e 's/\o33\[K//g'
-e $'s/\e\\[K//g'
is a reliable alternative.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
[Qemu-block] [PATCH 2/3] qemu-iotests: Filter HMP readline escape characters, Kevin Wolf, 2017/04/13
[Qemu-block] [PATCH 3/3] qemu-iotests: Test postcopy migration, Kevin Wolf, 2017/04/13