Commit Graph

462 Commits

Author SHA1 Message Date
Sebastien Boeuf
c2450bd055 tests: Remove unnecessary filename
Since SGX testing doesn't rely on a custom guest image anymore, there's
no need to keep the custom filename around as it's already not in use.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2023-01-10 09:22:59 +00:00
Wei Liu
08e4d1f481 test_infra: make measure_virtio_net_throughput & co measure PPS too
While measuring UDP PPS, we saturate the link, so there are packets
lost. We only account for the packets that are not lost.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2023-01-06 11:03:08 +00:00
Rob Bradford
0036302fc9 tests: Remove support for Ubuntu Bionic
This OS is EOL this year and is well tested by the Rust Hypervisor
Firmware CI so there is no need to duplicate this effort.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-01-03 14:42:24 +01:00
Rob Bradford
5e52729453 misc: Automatically fix cargo clippy issues added in 1.65 (stable)
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-12-14 14:27:19 +00:00
Sebastien Boeuf
8ecce8876e tests: Disable live upgrade testing
Since the refactoring of the vm-migration crate broke the backward
compatibility, we must disable the live upgrade tests until next
release.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-12-09 10:26:06 +01:00
Michael Zhao
a8839c4a4e tests: Disable live_upgrade test on AArch64
The `live_upgrade` test was broken when the Gic snapshot moved from `Vm`
to `DeviceManager`.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2022-12-01 17:07:25 +01:00
Sebastien Boeuf
1c36065754 vmm: Move devices creation to Vm creation
This moves the devices creation out of the dedicated restore function
which will be eventually removed.

This factorizes the creation of all devices into a single location.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-12-01 13:46:31 +01:00
Sebastien Boeuf
e23f4e0783 tests: Enable VFIO integration tests
Re-enable the VFIO integration now the machine is back online.

The image has been updated to rely on Ubuntu 22.04 (Jammy) and it's
smaller given only the NVIDIA drivers along with the nvidia-smi tool are
installed.

The test to verify the GPU is functional has been simplified given it
only relies on nvidia-smi to validate it has been able to find the Tesla
T4 card, meaning the associated driver was loaded correctly.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-11-25 08:55:14 +00:00
Sebastien Boeuf
405b4a6829 tests: Increase time for proper shutdown in test_simple_launch()
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-11-23 18:37:40 +00:00
Rob Bradford
8868c9c950 tests: Use Ubuntu Jammy for test_multi_cpu
This allows the unification of the same testing methodology with aarch64
and removes a user of the Bionic image.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-11-23 18:02:03 +00:00
Rob Bradford
d2442d39a8 tests: Update version of jammy image in use
This version has the cpuid binary installed which can be used for SGX
integration testing.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-11-18 18:31:55 +00:00
Rob Bradford
1a2185ea96 tests: Modernise SGX testing
The jammy disk image has a new enough kernel to support SGX and if we
rely on just the CPUid information (which is sufficient) then we can use
the regular jammy test image for testing.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-11-18 18:31:55 +00:00
Wei Liu
145df4b689 tests: allow undocumented unsafe blocks in integration test
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2022-11-18 12:50:01 +00:00
Rob Bradford
d3a8332282 tests: Remove test_reboot
There is no need for this test any longer as we have plenty of other
tests that reboot the VM.

Further this test used unmodified bionic image, which not only will be
EOLed soon but also took a long time to shutdown as it still had snapd
installed.

Fixes: #4849

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-11-15 09:30:16 +00:00
Muminul Islam
8b37448d28 tests: Disable test_snapshot_restore_hotplug_virtiomem for MSHV
Signed-off-by: Muminul Islam <muislam@microsoft.com>
2022-11-04 12:24:33 -07:00
Muminul Islam
92d083f593 tests: Add a basic test for snapshot/retsore
Signed-off-by: Muminul Islam <muislam@microsoft.com>
2022-11-04 12:24:33 -07:00
Muminul Islam
58d8795b53 tests: Make a wrapper function for snapshot/restore
Signed-off-by: Muminul Islam <muislam@microsoft.com>
2022-11-04 12:24:33 -07:00
Bo Chen
a9ec0f33c0 misc: Fix clippy issues
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-11-02 09:41:43 +01:00
Bo Chen
6e6b519a74 Revert "tests: Temporarily disable test_live_{migration,upgrade}_watchdog{_local}"
This reverts commit 87fb9cedc9.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-10-14 13:42:03 +01:00
Bo Chen
958ef69295 tests: Rely on wtmp (the login records) to count reboot times
The systemd journal has a known issue of generating large size logs[1],
which makes it unreliable as a source for retrieving system
information, such as for counting reboot times. This is particularly
problematic on disk-constrained systems, like the VMs we launched for
our integration tests, where the disk size is normally 2GB. By default,
the systemd journal has a size limit of 10% of the size of the
underlying file system (e.g. around 200MB for the VMs of our integration
tests), which would remove archived journal files on demand.

A better alternative to count reboot times is based on information from
`wtmp` (e.g. the login records) which is much more concise and can be
accessed via the `last` command.

[1] https://github.com/systemd/systemd/issues/5285

Fixes: #4749

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-10-14 13:42:03 +01:00
Rob Bradford
87fb9cedc9 tests: Temporarily disable test_live_{migration,upgrade}_watchdog{_local}
This test has been identified as flaky and is creating CI churn.

See: #4749

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-10-12 09:17:39 +01:00
Sebastien Boeuf
3bf3cca70a vhost_user_net: Allow user to set MTU
Adding the support for the user to set the MTU for the vhost-user-net
backend, which allows the integration test to be extended with the test
of the MTU parameter.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-09-27 10:37:35 +01:00
Sebastien Boeuf
76dbf85b79 net: Give the user the ability to set MTU
Add a new "mtu" parameter to the NetConfig structure and therefore to
the --net option. This allows Cloud Hypervisor's users to define the
Maximum Transmission Unit (MTU) they want to use for the network
interface that they create.

In details, there are two main aspects. On the one hand, the TAP
interface is created with the proper MTU if it is provided. And on the
other hand the guest is made aware of the MTU through the VIRTIO
configuration. That means the MTU is properly set on both the TAP on the
host and the network interface in the guest.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-09-21 16:20:57 +02:00
Rob Bradford
d4d0780b89 tests: Fix aarch64 beta clippy issues
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-09-20 10:59:48 +01:00
Rob Bradford
f32487f8e8 misc: Automatic beta clippy fixes
e.g. cargo clippy --all --tests --all-targets --fix --features=..

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-09-20 10:59:48 +01:00
Bo Chen
d5219525d8 tests: Add rate limiter test for virtio block
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-14 15:01:43 +01:00
Bo Chen
a15b641c61 tests: Add rate limiter test for virtio net
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-14 15:01:43 +01:00
Bo Chen
60f3bd43f5 tests: live-migration: Split numa tests into its own function
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-08 10:31:50 +02:00
Bo Chen
e145b823a5 tests: live-migration: Split balloon tests into its own function
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-08 10:31:50 +02:00
Bo Chen
ff3e9eb668 tests: live-migration: Split watchdog tests into its own function
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-08 10:31:50 +02:00
Bo Chen
e3d7824f09 tests: Provide a function to log guests outputs w/ migration errors
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-08 10:31:50 +02:00
Bo Chen
d5481cddcf tests: Provide a function to start live migration
This function starts the 'receive-migration' for the destination VM,
'send-migration' for the source VM, waits for the live-migration
completion, and prints debug information upon errors.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-08 10:31:50 +02:00
Bo Chen
1817224fe9 tests: Refactor 'test_watchdog' for better readability
This patch moves the actual test logic and assertions from various
functions to the actual tests, which makes these tests more readable and
easier to debug.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-07 09:51:34 +01:00
Sebastien Boeuf
3b5c2b3718 tests: Disable test_windows_guest_disk_hotplug for aarch64
Until the issue #4583 is resolved, we must disable this test given it's
failing quite often on the aarch64 worker.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-09-05 17:08:34 +02:00
Bo Chen
3c6014554b tests: ovs_dpdk: Cleanup ovs-dpdk after terminating VMs
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-01 08:39:39 +02:00
Bo Chen
6cf4ea74fc tests: live-migration: Cleanup ovs-dpdk setup correctly on failures
As 'handle_child_output()' may terminate the test on panic, we need to
cleanup ovs-dpdk setup in advance.

see: #4555

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-01 08:39:39 +02:00
Anatol Belski
2306291720 tests: Enable more Windows guest tests for aarch64
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2022-08-30 09:02:54 +01:00
Michael Zhao
88bbf7989a tests: Enable live upgrade tests on AArch64
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2022-08-22 10:51:18 +08:00
Rob Bradford
31dfe3d02a tests: Enable live upgrade tests
Following our recent v26.0 release we can re-enable our live upgrade
tests to try and make it possible for us to move to making LTS releases.

Currently limited to x86-64 as the live upgrade tests fail on aarch64.

Fixes: #3949

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-08-18 14:41:22 +01:00
Bo Chen
8f3462b3e3 tests: live_migration: Run most tests in parallel
Only the ovs-dpdk live-migration tests need to run sequentially as they
use the same ovs-dpdk setup.

This is to reduce our CI time, particularly for the live-migration
and aarch64 jobs.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 22:42:33 +01:00
Bo Chen
1f70d16c12 tests: Avoid name clashing for 'parallel/sequential' tests
Add prefix 'common_' to make them more specific.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 22:42:33 +01:00
Bo Chen
76bde33fc4 tests: live-migration: Cleanup ovs-dpdk after terminating VMs
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-08-16 11:45:44 +01:00
Anatol Belski
944d09208e ci: Initial Windows image integration
This enables the Windows test module. One basic test is enabled,
while all others are disabled yet for aarch64. Jenkins file is
extended with the corresponding step for aarch64.

installAzureCli() is parametrized.

It seems that transferring a 30GB image would take >= 15 minutes. An
optimization here is having a gzip'ed image to 10GB which would unpack
in 3 minutes. Expect to be quicker than transferring an uncompressed
image while on another network.

Signed-off-by: Anatol Belski <ab@php.net>
2022-08-12 15:04:06 +01:00
Sebastien Boeuf
6d452fad52 tests: Improve test_virtio_block_topology reliability
The test test_virtio_block_topology has been recently failing due to an
error happening in losetup while trying to set the block size. Since
there's no option in losetup for retrying, we took the approach of
programming the expected behavior of creating a loop device relying
directly on the system ioctl LOOP_CONFIGURE. We apply a retry loop based
on the result returned by this ioctl, so that we don't fail on the first
try. We also added a sleep before retrying, hoping this would help the
next iteration to succeed.

Fixes #3494

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-08-10 14:43:26 +02:00
Wei Liu
a85d27bd52 tests: add OEM strings integration test
Signed-off-by: Wei Liu <liuwe@microsoft.com>
2022-08-08 08:59:19 +01:00
Sebastien Boeuf
dc75519372 tests: Improve reliability of test_bionic_ovmf
It's been observed on the Bionic image that udev and snapd services can
cause some delay in the VM's shutdown. Disabling them before shutting
down the VM improves the reliability of the test.

Also increasing slightly the sleep time to ensure we give the VM enough
time to shutdown before checking the list of events provided by the
event monitor.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-08-05 13:30:22 +01:00
Sebastien Boeuf
3b0f6247b7 ci: Add test_vfio to the baremetal CI
Since it's not possible to run the integration test test_vfio on Azure
at the moment (because of some nested virtualization issues), we can
temporarily run it on the baremetal CI where we already run some VFIO
tests.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-08-04 11:37:18 +01:00
lizhaoxin1
b3b252a5d1 tests: Add integration test for --platform uuid
Signed-off-by: lizhaoxin1 <Lxiaoyouling@163.com>
2022-08-04 09:20:06 +02:00
Sebastien Boeuf
103494f441 tests: Improve live migration tests reliability
Move the live migration tests to a 'jammy' worker rather than
'jammy-small'. This type of worker has more CPUs (64 vs 16) and more RAM
(256G vs 64G), which should improve the time it takes to run each test.
With this improvement, the test shouldn't fail anymore due to timeout
being reached.

A second improvement is to reduce the amount of vCPUs created for each
VM. The point is simply to check we can migrate a VM with multiple
vCPUs, therefore using 2 instead of 6 should be enough when possible.
When testing NUMA, we can't lower the amount of vCPUs since there's a
quite complex topology that is expected there.
Also, the total amount of vCPUs is reduced from 12 to 4 (again when not
testing with NUMA).

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-08-03 10:42:45 -07:00
Sebastien Boeuf
9524a8ffe8 tests: Re-enable virtio_block_topology on aarch64
Improve error catching on the steps creating the block device so that we
can understand if qemu-img or losetup is the faulty command leading to
an empty device path.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2022-08-02 14:46:54 +02:00