mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -35,6 +35,7 @@ kill-subprocess
|
||||
-sleep 1
|
||||
|
||||
# We should now be able to rerun the subprocess.
|
||||
add test1.img
|
||||
run
|
||||
ping-daemon
|
||||
EOF
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user