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

Commit ed7fda161e 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.
This commit is contained in:
Richard W.M. Jones
2012-10-10 16:38:53 +00:00
parent a03f536f0d
commit 33f49d85c2
3 changed files with 3 additions and 0 deletions

View File

@@ -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 File

@@ -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 File

@@ -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