qemu-iotests: Save some sed processes
PATCH 1/1 qemu-iotests: Save some sed processes
Instead of building a huge pipeline, just pass all expressions to a single sed process.
Suggested-by Eric Blake <[email protected]>
Signed-off-by Kevin Wolf <[email protected]>
--- tests/qemu-iotests/common.rc | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
tests/qemu-iotests/common.rc +10 -10
@@ -105,16 +105,16 @@ _make_test_img() # XXX(hch): have global image options? $QEMU_IMG create -f $IMGFMT $extra_img_options $TEST_IMG $image_size | \ - sed -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" | \ - sed -e "s#$TEST_DIR#TEST_DIR#g" | \ - sed -e "s#$IMGFMT#IMGFMT#g" | \ - sed -e "s# encryption=off##g" | \ - sed -e "s# cluster_size=[0-9]\\+##g" | \ - sed -e "s# table_size=[0-9]\\+##g" | \ - sed -e "s# compat='[^']*'##g" | \ - sed -e "s# compat6=\\(on\\|off\\)##g" | \ - sed -e "s# static=\\(on\\|off\\)##g" | \ - sed -e "s# lazy_refcounts=\\(on\\|off\\)##g" + sed -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" \ + -e "s#$TEST_DIR#TEST_DIR#g" \ + -e "s#$IMGFMT#IMGFMT#g" \ + -e "s# encryption=off##g" \ + -e "s# cluster_size=[0-9]\\+##g" \ + -e "s# table_size=[0-9]\\+##g" \ + -e "s# compat='[^']*'##g" \ + -e "s# compat6=\\(on\\|off\\)##g" \ + -e "s# static=\\(on\\|off\\)##g" \ + -e "s# lazy_refcounts=\\(on\\|off\\)##g" } _cleanup_test_img()
Signature · 1 line
1.7.6.5
Quoted 8 lines · Kevin Wolf
Instead of building a huge pipeline, just pass all expressions to a single sed process.
Suggested-by Eric Blake <[email protected]>Signed-off-by Kevin Wolf <[email protected]>--- tests/qemu-iotests/common.rc | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
Reviewed-by Eric Blake <[email protected]>
tests/qemu-iotests/common.rc _make_test_img() · line 109
Quoted 12 lines
tests/qemu-iotests/common.rc +1
-1@@ -105,16 +105,16 @@ _make_test_img() # XXX(hch): have global image options? $QEMU_IMG create -f $IMGFMT $extra_img_options $TEST_IMG $image_size | \ - sed -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" | \ + sed -e "s#$IMGPROTO:$TEST_DIR#TEST_DIR#g" \
and nice to get rid of that space-followed-by-TAB indent.
Signature · 2 lines
Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org