qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v1 1/4] qemu-iotests: refine common.config
@ 2015-10-30  7:13 Bo Tu
  2015-10-30  7:13 ` [Qemu-devel] [PATCH v1 2/4] qemu-iotests: s390x: fix test 051 Bo Tu
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Bo Tu @ 2015-10-30  7:13 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, silbe, mreitz, armbru, mimu

Be easier to read, and be slightly shorter.

Suggested-By: Sascha Silbe <silbe@linux.vnet.ibm.com>
Reviewed-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Signed-off-by: Bo Tu <tubo@linux.vnet.ibm.com>
---
 tests/qemu-iotests/common.config | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/qemu-iotests/common.config b/tests/qemu-iotests/common.config
index 596bb2b..0a165e8 100644
--- a/tests/qemu-iotests/common.config
+++ b/tests/qemu-iotests/common.config
@@ -129,10 +129,9 @@ 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_alias_machine=$($QEMU -machine \? \
+    | grep -F "(alias of ${default_machine})" |cut -d ' ' -f 1 |head -n 1)
+if [ -n "$default_alias_machine" ]; then
     default_machine="$default_alias_machine"
 fi
 
-- 
2.3.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-11-03 15:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-30  7:13 [Qemu-devel] [PATCH v1 1/4] qemu-iotests: refine common.config Bo Tu
2015-10-30  7:13 ` [Qemu-devel] [PATCH v1 2/4] qemu-iotests: s390x: fix test 051 Bo Tu
2015-10-30  7:13 ` [Qemu-devel] [PATCH v1 3/4] qemu-iotests: s390x: fix test 068 Bo Tu
2015-10-30  7:13 ` [Qemu-devel] [PATCH v1 4/4] qemu-iotests: disable VNC server for test 120 Bo Tu
2015-10-30 17:36 ` [Qemu-devel] [PATCH v1 1/4] qemu-iotests: refine common.config Eric Blake
2015-11-03  6:42   ` tu bo
2015-11-03 14:59     ` Eric Blake

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).