[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 41/48] qemu-iotests: refine common.config
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 41/48] qemu-iotests: refine common.config |
Date: |
Fri, 18 Dec 2015 16:07:47 +0100 |
From: Bo Tu <address@hidden>
Replacing awk with sed, then it's easier to read.
Replacing "[ ! -z "$default_alias_machine" ]" with
"[[ $default_alias_machine ]]", then it's slightly shorter.
Reviewed-by: Max Reitz <address@hidden>
Suggested-By: Sascha Silbe <address@hidden>
Reviewed-by: Sascha Silbe <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Bo Tu <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/common.config | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index 3ed51b8..60bfabf 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -154,11 +154,10 @@ export QEMU_IMG=_qemu_img_wrapper
export QEMU_IO=_qemu_io_wrapper
export QEMU_NBD=_qemu_nbd_wrapper
-default_machine=$($QEMU -machine \? | awk '/(default)/{print $1}')
-default_alias_machine=$($QEMU -machine \? |\
- awk -v var_default_machine="$default_machine"\)\
- '{if ($(NF-2)=="(alias"&&$(NF-1)=="of"&&$(NF)==var_default_machine){print
$1}}')
-if [ ! -z "$default_alias_machine" ]; then
+default_machine=$($QEMU -machine help | sed -n '/(default)/ s/ .*//p')
+default_alias_machine=$($QEMU -machine help | \
+ sed -n "/(alias of $default_machine)/ { s/ .*//p; q; }")
+if [[ "$default_alias_machine" ]]; then
default_machine="$default_alias_machine"
fi
--
1.8.3.1
- [Qemu-devel] [PULL 46/48] block/qapi: explicitly warn if !has_full_backing_filename, (continued)
- [Qemu-devel] [PULL 46/48] block/qapi: explicitly warn if !has_full_backing_filename, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 37/48] block: Remove prototype of bdrv_swap from header, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 09/48] block: Exclude nested options only for children in append_open_options(), Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 24/48] qemu-iotests: Test reopen with node-name/driver options, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 39/48] block: use drained section around bdrv_snapshot_delete, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 38/48] iotests: Update comments for bdrv_swap() in 094, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 40/48] block: fix bdrv_ioctl called from coroutine, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 31/48] qcow2: Add function for refcount order amendment, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 29/48] qcow2: Split upgrade/downgrade paths for amend, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 30/48] qcow2: Use intermediate helper CB for amend, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 41/48] qemu-iotests: refine common.config,
Kevin Wolf <=
- [Qemu-devel] [PULL 23/48] qemu-iotests: Test cache mode option inheritance, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 32/48] qcow2: Invoke refcount order amendment function, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 42/48] qemu-iotests: s390x: fix test 051, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 02/48] iotests: 124: move incremental failure test, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 01/48] iotests: 124: Split into two test classes, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 47/48] qemu-img: abort when full_backing_filename not present, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 28/48] qcow2: Use abort() instead of assert(false), Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 21/48] blkdebug: Enable reopen, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 05/48] block: Fix reopen with semantically overlapping options, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 43/48] qemu-iotests: s390x: fix test 068, Kevin Wolf, 2015/12/18