The shutdown test logs into a VM and sends a shutdown command.
It serves two purposes:
- Test KVM's ability to shut down.
- Clean up after the other tests:
Currently VMs of the last test remain alive when Autotest finishes running.
When one guest finishes testing and another begins, the VM is automatically
shut down by the preprocessor because the QEMU command required for the next
guest differs from that of the guest that just finished.  In the case of the
final guest this doesn't happen because no guest follows it, so the preprocessor
must be explicitly instructed to kill the VM.
However, we have no easy way of knowing which test runs last because the user
usually selects a subset of the tests/guests.
The addition of a shutdown test can be a decent solution to this small problem:
by convention the shutdown test will always be the last to run, and if users
wish to clean up after the tests, they must select the shutdown test.

Note: it is beneficial to allow users to leave the VMs of the last test running
because it saves time when developing and testing tests. A test writer can run
the test once on a VM, and when the test exits, make some modifications to its
code and re-run it on the same living VM, and repeat this procedure without
having to shutdown/boot the VM every time.

Signed-off-by: Michael Goldish <mgoldish@redhat.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3295 592f7852-d20e-0410-864c-8624ca9c26a4
2 files changed