Commit Graph

63 Commits

Author SHA1 Message Date
Rob Bradford
22dd49d0b5 tests: Test virtio-fs with virtio-mmio
Now that virtio-mmio transport has support for SHM regions we should be
able to test virtio-fs against it.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-03-04 09:40:25 +01:00
Sebastien Boeuf
0223cf8c2b ci: Update ClearLinux image
A new ClearLinux image has been uploaded to the Azure storage account.
It is based off of the ClearLinux cloudguest image 31310 version, with
three extra bundles added to it.

First bundle is curl, which adds the curl binary to the image, second
bundle is iperf, adding the iperf binary to the image, and third bundle
is sysadmin-basic to include utility like netcat.

The image is 2G in size.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2020-03-04 07:31:15 +00:00
Rob Bradford
5ade9d4610 tests: Remove unnecessary sleeps and kill on clean shutdown tests
On tests that expect a clean shutdown there is no need to try and kill
the child after wait() has returned as the process has already exited.
Further there is no need to sleep before wait() as wait will block until
the VM and VMM shutdown is complete.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
c98949bdd3 tests: Wait for VMM to exit in test_serial_file/test_console_file
This should address any flakiness as the VMM process will have
completely terminated and all files closed.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
2f58fb8307 tests: Test rebooting works for block self spawn test
Being able to reboot the VM is an important aspect of the self spawning
behaviour.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
e817aa6824 tests: Improve VM shutdown behaviour
Many of the tests attempted to SSH into the VM and then run "shutdown"
but don't actually check that the VM has shutdown correctly and proceed
to kill the child process. Remove the associated SSH commands and sleeps
from those tests that are not explicitly checking the shutdown
behaviour.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
559b70cf0a tests: Make output capture optional
Only some tests require the output for the tests to be captured so
default to not capturing the output to a pipe and instead make it
controllable.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
dae7608b1e tests: Remove duplicated network configuration
Many of the tests use an identical network configuration. Add a
GuestCommand::default_net() to generate this configuration and use it
wherever possible.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
6466ad2112 tests: Remove duplicated disk configuration
Many of the tests use an identical disk configuration. Add a
GuestCommand::default_disks() to generate this configuration and use it
wherever possible.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
9f1ac24bed tests: Make the GuestCommand take a reference to the guest
This will be used fill out default parts of the guest command.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
49e70c6203 tests: Port integration tests over to GuestCommand
Rather than creating the command itself delegate to the GuestCommand.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
67a5882415 tests: Introduce new GuestCommand to handle launching the guest
This is a thin wrapper over std::process:Command which currently only
specifies the default binary but in future will handle more default
behaviour.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-27 17:08:49 +00:00
Rob Bradford
d7b0b9842d tests: Move integration tests to their own directory
Simplify main.rs by moving the integration tests to their own directory.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2020-02-25 10:42:54 +00:00