diff mbox

[0/2] qemu-iotests: Filter out "qemu-io> " in all tests

Message ID 528B60E4.7070301@redhat.com
State New
Headers show

Commit Message

Eric Blake Nov. 19, 2013, 1 p.m. UTC
On 11/18/2013 11:50 PM, Fam Zheng wrote:
> The second patch is too big in size (over 10M), and rejected by list
> moderator.
> 
> You can PULL from git branch:
> 
>     https://github.com/famz/qemu.git 035-filter-qemu-io

I'm guessing the second patch consists of a tiny amount of code to turn
on the filter, while the majority of the patch was automated.  It would
be helpful to amend your commit message to show how you automated the
conversion (was it something like
  find tests/qemu-iotests -name "*.out" | \
  xargs -L1 sed -i "s/qemu-io> //g" '
?)

Given such a formula in the commit message itself, it would be much
easier to review the patch - check that both the non-automatic small
modification and the conversion formula make sense, then repeat the
conversion formula locally and compare it to your git tree to see that
the two results match, and that the testsuite still passes.  [Or in
other words, I don't plan on reading 10M of mindlessly repetitive
changes :) ]

>>   tests/qemu-iotests/common.filter |     3 +-
>>   20 files changed, 75546 insertions(+), 75545 deletions(-)

Looks like that's the one file with the nontrivial change.


+        sed -e "s/qemu-io> //g"
 }

 # replace occurrences of QEMU_PROG with "qemu"


Question - why do you pipeline 'sed | sed'?  It should be sufficient to
just add the "s/qemu-io> //g" instruction into the existing sed
pipeline, for one fewer process per filter run.
diff mbox

Patch

diff --git a/tests/qemu-iotests/common.filter
b/tests/qemu-iotests/common.filter
index 8e7b1a4..0dd82e1 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@ -149,7 +149,8 @@  _filter_win32()
 # sanitize qemu-io output
 _filter_qemu_io()
 {
-    _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)/"
+    _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)/" |\