[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function |
Date: |
Thu, 15 Jun 2017 17:38:11 +0100 |
Avoid duplicating the QEMU command-line.
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
tests/qemu-iotests/068 | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/tests/qemu-iotests/068 b/tests/qemu-iotests/068
index 9c1687d..653e23c 100755
--- a/tests/qemu-iotests/068
+++ b/tests/qemu-iotests/068
@@ -59,14 +59,17 @@ case "$QEMU_DEFAULT_MACHINE" in
;;
esac
-# Give qemu some time to boot before saving the VM state
-bash -c 'sleep 1; echo -e "savevm 0\nquit"' |\
+_qemu()
+{
$QEMU $platform_parm -nographic -monitor stdio -serial none -hda
"$TEST_IMG" |\
+ "$@" |\
_filter_qemu | _filter_hmp
+}
+
+# Give qemu some time to boot before saving the VM state
+bash -c 'sleep 1; echo -e "savevm 0\nquit"' | _qemu
# Now try to continue from that VM state (this should just work)
-echo quit |\
- $QEMU $platform_parm -nographic -monitor stdio -serial none -hda
"$TEST_IMG" -loadvm 0 |\
- _filter_qemu | _filter_hmp
+echo quit | _qemu -loadvm 0
# success, all done
echo "*** done"
--
2.9.4
- [Qemu-devel] [PATCH 0/5] qemu-iotests: test savevm/loadvm iothread (and make it work!), Stefan Hajnoczi, 2017/06/15
- [Qemu-devel] [PATCH 2/5] migration: hold AioContext lock for loadvm qemu_fclose(), Stefan Hajnoczi, 2017/06/15
- [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Kevin Wolf, 2017/06/19
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Eric Blake, 2017/06/27
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Kevin Wolf, 2017/06/28
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Eric Blake, 2017/06/28
- Re: [Qemu-devel] [PATCH 3/5] qemu-iotests: 068: extract _qemu() function, Kevin Wolf, 2017/06/28
[Qemu-devel] [PATCH 4/5] qemu-iotests: 068: use -drive/-device instead of -hda, Stefan Hajnoczi, 2017/06/15
[Qemu-devel] [PATCH 5/5] qemu-iotests: 068: test iothread mode, Stefan Hajnoczi, 2017/06/15