]> Git Repo - qemu.git/blobdiff - tests/qemu-iotests/068
iotests: Backup with different source/target size
[qemu.git] / tests / qemu-iotests / 068
index 3801b65b9d02590edabd1365651b655c407d41a0..ccd1a9f1db79980b8987eacd250ae210873c465c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 #
 # Test case for loading a saved VM state from a qcow2 image
 #
 seq="$(basename $0)"
 echo "QA output created by $seq"
 
-here="$PWD"
 status=1       # failure is the default!
 
 _cleanup()
@@ -37,12 +36,13 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
-# This tests qocw2-specific low-level functionality
+# This tests qcow2-specific low-level functionality
 _supported_fmt qcow2
 _supported_proto generic
-_supported_os Linux
+# Internal snapshots are (currently) impossible with refcount_bits=1,
+# and generally impossible with external data files
+_unsupported_imgopts 'compat=0.10' 'refcount_bits=1[^0-9]' data_file
 
-IMGOPTS="compat=1.1"
 IMG_SIZE=128K
 
 case "$QEMU_DEFAULT_MACHINE" in
@@ -76,9 +76,9 @@ for extra_args in \
     _make_test_img $IMG_SIZE
 
     # Give qemu some time to boot before saving the VM state
-    bash -c 'sleep 1; echo -e "savevm 0\nquit"' | _qemu $extra_args
+    { sleep 1; printf "savevm 0\nquit\n"; } | _qemu $extra_args
     # Now try to continue from that VM state (this should just work)
-    echo quit | _qemu $extra_args -loadvm 0
+    { sleep 1; printf "loadvm 0\nloadvm 0\nquit\n"; } | _qemu $extra_args -S
 done
 
 # success, all done
This page took 0.026108 seconds and 4 git commands to generate.