Commit Graph

89 Commits

Author SHA1 Message Date
Bo Chen
4d80be3a04 tests: Enable live-upgrade tests based on release v36.0
These live-upgrade tests were disabled due to CLI changes (#5791).

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-11-17 08:43:13 +00:00
Rob Bradford
2b607da2b3 scripts: Clear the toolchain environment variables for virtiofsd
virtiofsd must be built with the default gnu toolchain so clear the
environment variables that may poisoned by the alternative C library
support.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-11-01 11:37:04 +00:00
Wei Liu
8ba5682e3b scripts: propagate RUSTFLAGS and TARGET_CC to test scripts
There is no need to set them in the test scripts while the main script
already has them.

The consolidates how things are done.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2023-10-20 10:35:13 -07:00
Wei Liu
c7e51e51e5 scripts: pass BUILD_TARGET directly to test scripts
There is no need to reconstruct it from within the scripts since the
main script already constructed it once.

Drop the previously useless setting of BUILD_TARGET from various
scripts. The value was always overwritten at a later point.

No functional change intended.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2023-10-20 10:35:13 -07:00
dom.song
7f47a030e7 tests: Update spdk code to support Ampere's new CPU
When performing integration testing on the Ampere One server, an error occurred when compiling spdk and not recognizing the CPU ID.
The latest spdk already contains fixes.

Signed-off-by: dom.song <dom.song@amperecomputing.com>
2023-10-12 11:25:38 -07:00
Anatol Belski
0e75e7d079 scripts: Set LAST_RELEASE_VERSION to v34.0
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2023-08-20 10:39:11 +01:00
Yu Li
4ef388b67c tests: add integration for qcow backing file
This test case creates a new qcow2 file using the image of ubuntu as
its backing file, and boot a virtual machine with this image file.

Signed-off-by: Yu Li <liyu.yukiteru@bytedance.com>
2023-07-19 13:52:43 +01:00
Bo Chen
1faaa2cd0a tests: Enable "dbus_api" feature build only for dbus_api tests
In this way, our integration tests exercise the same set of build
features (e.g. "kvm,mshv") being used for releases.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-06-08 13:18:08 +01:00
Omer Faruk Bayram
a7aecb5eee tests: refactor test_api* to support the D-Bus API and add a new test
Implemented a `TargetApi` enum to make the process of implementing
tests for the D-Bus and HTTP API more convenient.

Refactored `test_api_{create_boot, shutdown, pause_resume, delete}` tests
with the `TargetApi` enum to also implement tests for the D-Bus API.

Added a new test named `test_api_dbus_and_http_interleaved` that uses
both the HTTP and D-Bus API at the same time.

Modified integration test scripts to enable the `dbus_api` feature when
compiling and start a dbus-session when integration tests are run.

Signed-off-by: Omer Faruk Bayram <omer.faruk@sartura.hr>
2023-06-06 10:18:26 -07:00
Ruslan Mstoi
f3870ae638 scripts: indent bash if statement
This commit indents unindented if statements in scripts

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-04-24 13:21:36 +01:00
Bo Chen
d78da5d252 tests: Enable live-upgrade tests based on v30.0
Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-03-08 13:02:38 +00:00
Dom
b35a94d83c tests: integration: Use hugepage size to calculate the number of pages
The tests require a fixed amount of huge page memory to run, rather than
encode that as fixed number of huge pages it should be calculated from
the size of memory required and the huge page size

Signed-off-by: Dom <peng6662001@163.com>
2023-03-08 10:18:28 +00:00
Rob Bradford
d83fc7f663 scripts: Make --hypervisor=mshv only affect features used by tests
This uncouples it from the features used for building the binary under
test allowing it to use the default build features.

This change also removes the feature control from the test scripts where
it was never used (e.g. run_integration_tests_sgx.sh)

This allows the combined binary to be used for all testing but allows
the disabling of tests known not to work under mshv.

Fixes: #4915

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-11-24 17:06:56 +00:00
Rob Bradford
8724ac1fe6 scripts: Remove stripping from testing scripts
The binary stripping is now done by the toolchain for release builds.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-11-21 07:54:39 -08: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
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
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
Bo Chen
edca82c4bd scripts, tests: Add live upgrade tests
By augmenting existing set of tests, this patch added a set of
tests for live-upgrade that covers use cases with NUMA,
vhost-user (OVS-DPDK), and local-migration.

Fixes: #3949

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-04-20 11:51:50 -07:00
Bo Chen
044b57c927 scripts: Bump container version and SPDK version for aarch64
In this way, CI jobs on both `x86_64` and `aarch64` will start to use
the latest version of SPDK.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-04-05 13:04:12 +01:00
Bo Chen
4af04d8f49 tests: Enable 'test_vfio_user' using Jammy on 'aarch64'
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-03-31 09:22:07 +01:00
Bo Chen
661e5eb084 scripts: Use the same spdk version from dev container for aarch64
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-03-31 09:22:07 +01:00
Henry Wang
26351a81b2 scripts: Use the same linux kernel build function everywhere
This commit unifies the custom linux kernel build in x86, Arm, and
performance metrics to the same function. Therefore, when bumping
the kernel version, we can make sure we only need to make the change
in one place.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2022-03-28 10:20:14 +01:00
Henry Wang
4335e5f84c scripts: aarch64: Build fio from source for performance metrics
On Arm64, the fio binary that comes from ubuntu distribution cannot
support io_uring, which is a required engine for the block
performance tests in performance metrics. Therefore this commit
build the fio from a relatively new version, and replace the native
ubuntu fio with the newly build one.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2022-03-23 18:25:48 +08:00
Henry Wang
d4192abce1 scripts: aarch64: Revert the "Reduce source code build" for linux
Changes in commit "scripts: aarch64: Reduce source code build in CI"
for the Linux kernel will lead to the kernel cannot be rebuilt if
the config file is changed. Therefore should be reverted.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2022-03-21 14:41:36 +00:00
Henry Wang
0fa71ddf7e scripts: aarch64: Reduce source code build in CI
As Linux kernel, edk2, virtiofd, SPDK are all build from source, we
need to find a way to reduce the number of source code build.

To address this issue, this commit adds a stage that touching a
".built" file to each repo of the source code after a successfully
build. By checking if the ".built" file exists, we can determine
if there is already an old build. Since the source code repo will
be removed and cloned again when we bump the repo hash, the CI will
rebuild the repo.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2022-03-21 14:05:59 +08:00
Michael Zhao
273098ee99 scripts: Fix musl build error in integration tests
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2022-03-02 14:12:29 +00:00
Bo Chen
4552d07a80 scripts: Support custom arguments to the test binary with dev_cli.sh
The dev container interface script (e.g. 'dev_cli.sh') now supports the
following arguments syntax for running tests:

`tests [--unit|--cargo|--all] [--libc musl|gnu] [-- [<test scripts args>] [-- [<test binary args>]]] `

In this way, we can pass custom arguments to the test binary (either
"cargo test" or "performance-metrics") with our dev container script.
For example:

`$ ./dev_cli.sh tests --metrics -- -- --report-file /tmp/metrics.json --test-filter latency`
`$ ./dev_cli.sh tests --integration -- --test-filter "test_serial"  -- --nocapture --test-threads=1`

Fixes: #3739

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-02-24 16:34:32 +01:00
Rob Bradford
5447451921 scripts: Rename virtiofsd build directory
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-02-21 10:42:36 +00:00
Rob Bradford
b2bf88bcb1 tests, scripts: Rename virtiofsd binary
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-02-21 10:42:36 +00:00
Rob Bradford
e3bb822c4e scripts: Use new virtiofsd url for Rust version
The old URL redirects to this one.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-02-21 10:42:36 +00:00
Rob Bradford
36852795e4 tests: Bump version of virtiofsd-rs in use to latest tagged
Binary is renamed but for clarity continue using the old name for our
tests.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-02-17 17:53:14 +00:00
Henry Wang
1c18d124dc scripts: Add more huge pages for AArch64 integration test
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2022-01-18 18:00:00 -08:00
Henry Wang
7a42ce9310 scripts: AArch64: Build SPDK NVMe before running integration tests
The SPDK-NVMe is needed for the integration test for vfio_user.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-01-18 18:00:00 -08:00
Bo Chen
5b05e0cdcd scripts: Remove use of "integration_tests" feature
Given integration tests don't have special annotations, all our
integration test scripts do not need to carry special flags when running
`cargo test`. This commit also removed the "test::" prefix for
pattern-matching different set of integration tests.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-01-10 10:29:07 +01:00
Rob Bradford
07756aa8fb tests, README: Bump kernel fork to 5.15.12
This updated tree now includes a fix for virtio-net regression that was
present in 5.14:

commit 732b74d647048668f0f8dc0c848f0746c69e2e2f
Author: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Date:   Sat Oct 9 05:17:53 2021 -0400

    virtio-net: fix for skb_over_panic inside big mode

    commit 126285651b7f ("Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net")
    accidentally reverted the effect of
    commit 1a8024239da ("virtio-net: fix for skb_over_panic inside big mode")
    on drivers/net/virtio_net.c

    As a result, users of crosvm (which is using large packet mode)
    are experiencing crashes with 5.14-rc1 and above that do not
    occur with 5.13.

    Crash trace:

    [   61.346677] skbuff: skb_over_panic: text:ffffffff881ae2c7 len:3762 put:3762 head:ffff8a5ec8c22000 data:ffff8a5ec8c22010 tail:0xec2 end:0xec0 dev:<NULL>
    [   61.369192] kernel BUG at net/core/skbuff.c:111!
    [   61.372840] invalid opcode: 0000 [#1] SMP PTI
    [   61.374892] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 5.14.0-rc1 linux-v5.14-rc1-for-mesa-ci.tar.bz2 #1
    [   61.376450] Hardware name: ChromiumOS crosvm, BIOS 0

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-01-04 18:07:35 +01:00
Michael Zhao
ac25172176 scripts: Fix an error in virtiofsd build commands
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-11-30 10:04:38 +01:00
Rob Bradford
1511cbda87 tests, scripts: Update custom aarch64 image to include "stress"
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-09-29 15:01:46 +01:00
Sebastien Boeuf
bebc5f957e scripts: Pin virtiofsd-rs to a specific revision
In order to avoid CI issues, from now on, we'll update the virtiofsd-rs
revision manually.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-09-28 19:48:17 +01:00
Michael Zhao
f9dd0aaf8a scripts: Optimize EDK2 building on AArch64
In integration test, we fetch latest EDK2 code on its master branch and
build. While the update on EDK2 master is frequent. And the building is
time consuming. It takes a lot of time in CI and local test. Floating on
top of a busy master branch also bring potential risk in tracking and
debugging.

Now that Cloud Hypervisor support in EDK2 has been steady, we can pin
the EDK2 software versions to avoid unnecessary updating and building.
We can update the versions manually every after several months.

The commit also optimizes the build process by applying multi-threaded
compiling.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-09-27 17:58:16 +08:00
Michael Zhao
8b7880160e scripts: Refactor the bash code for building linux
Simplified the bash code of building custom linux in integration test.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-09-27 17:58:16 +08:00
Michael Zhao
b7cb6257b5 scripts: Add a bash function to sync external code
Added a bash function in integration test script to checkout source code
of a GIT repo with specified branch and commit.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-09-27 17:58:16 +08:00
Michael Zhao
d76d04e2f2 scripts: Prepare a Focal image with custom kernel
On AArch64, ACPI must work with UEFI (EDK2). This way, the kernel is
always loaded from the disk image. We can not specify a direct custom
kernel while using ACPI.

To use a custom kernel, we have to replace the kernel file in the disk
image by:
- Making a copy of the Focal `raw` image
- Mounting the rootfs with `libguestfs-tools`
- Replacing the compressed kernel file

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2021-09-24 07:57:57 +01:00
Bo Chen
d6c08d902b ci: Use the pre-installed virtiofsd
Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-09-20 16:47:28 +01:00
Bo Chen
2e56f0df77 ci: Rustify ovs-dpdk setup and cleanup
Signed-off-by: Bo Chen <chen.bo@intel.com>
2021-09-10 07:41:15 +01:00
Henry Wang
eed0c927fd scripts: AArch64: Add missing tests in sequential mod
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2021-09-07 09:35:06 +01:00
Henry Wang
fb5cbd966e scripts: AArch64: Run test cases for split modules
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2021-09-07 09:35:06 +01:00
Jianyong Wu
a2e72774a9 bump kernel version to 5.14 for arm
Bump kernel version and update kernel config file accordingly.
Especially, enable virtio-mem and MEMORY_HOTPLUG_DEFAULT_ONLINE here.

Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2021-09-07 09:34:22 +01:00
Henry Wang
5d53648762 scripts: Enable the live-migration test on AArch64
Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2021-09-03 06:36:17 +01:00
Henry Wang
ea0918e5e8 docs, scripts: Use upstream edk2 for AArch64
The edk2 upstream has already suppoorted AArch64 Cloud Hypervisor,
and hence we can use upstream edk2 in CI and doc.

Signed-off-by: Henry Wang <Henry.Wang@arm.com>
2021-07-09 15:36:37 +02:00