Skip to content
Browse files

tests: Fix test-qemudie-* so they re-adds the disk on second launch.

Commit ed7fda1 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.
  • Loading branch information...
1 parent a03f536 commit 33f49d85c2a82e66f33cedccb2dbd14faa6070dd @rwmjones rwmjones committed
View
1 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
View
1 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
View
1 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

0 comments on commit 33f49d8

Please sign in to comment.
Something went wrong with that request. Please try again.