summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-10-10 16:38:53 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-10-10 16:46:35 +0000
commit33f49d85c2a82e66f33cedccb2dbd14faa6070dd (patch)
treed84f22316f30f6be0a9858302d3e51e70f209192 /tests
parenta03f536f0dae3ca20e11b7c2ba41e4a7eb1f28c9 (diff)
downloadlibguestfs-33f49d85c2a82e66f33cedccb2dbd14faa6070dd.tar.gz
libguestfs-33f49d85c2a82e66f33cedccb2dbd14faa6070dd.tar.xz
libguestfs-33f49d85c2a82e66f33cedccb2dbd14faa6070dd.zip
tests: Fix test-qemudie-* so they re-adds the disk on second launch.
Commit ed7fda161e1f3d0beb02a368fcbcf5ed95dcdac1 changed the way that the drives are handled across appliance shutdowns. Previously during the following sequence of calls: create the handle add drive(s) launch kill subprocess launch the added drives are still in the handle at the second launch. After the above commit, the added drives are removed from the handle, which means the second launch happens with no drives (which could be an error). This was never actually defined either way, so in this case fix the test to re-add the drive before the second launch. Since hotplugging was added, it isn't really feasible to return to the original semantics, since users might remove drives, in which case we have lost information about those drives so we cannot restore them on the second launch. NOTE: PLEASE CALLERS DON'T DO THIS! Always use a new handle for each launch of the appliance.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/protocol/test-qemudie-killsub.sh1
-rwxr-xr-xtests/protocol/test-qemudie-midcommand.sh1
-rwxr-xr-xtests/protocol/test-qemudie-synch.sh1
3 files changed, 3 insertions, 0 deletions
diff --git a/tests/protocol/test-qemudie-killsub.sh b/tests/protocol/test-qemudie-killsub.sh
index 70be4e1d..c3387e26 100755
--- a/tests/protocol/test-qemudie-killsub.sh
+++ b/tests/protocol/test-qemudie-killsub.sh
@@ -35,6 +35,7 @@ kill-subprocess
-sleep 1
# We should now be able to rerun the subprocess.
+add test1.img
run
ping-daemon
EOF
diff --git a/tests/protocol/test-qemudie-midcommand.sh b/tests/protocol/test-qemudie-midcommand.sh
index 1e1fd99a..ce48896b 100755
--- a/tests/protocol/test-qemudie-midcommand.sh
+++ b/tests/protocol/test-qemudie-midcommand.sh
@@ -35,6 +35,7 @@ pid | cat > test.pid
-sleep 1000
# We should now be able to rerun the subprocess.
+add test1.img
run
ping-daemon
EOF
diff --git a/tests/protocol/test-qemudie-synch.sh b/tests/protocol/test-qemudie-synch.sh
index 398756e1..f69cdfa4 100755
--- a/tests/protocol/test-qemudie-synch.sh
+++ b/tests/protocol/test-qemudie-synch.sh
@@ -36,6 +36,7 @@ pid | cat > test.pid
-sleep 1
# We should now be able to rerun the subprocess.
+add test1.img
run
ping-daemon
EOF