Commit Graph

327 Commits

Author SHA1 Message Date
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
Ruslan Mstoi
cd010052f8 tests: Revert disable test_vfio test
This reverts commit 268c4ea214.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-08-20 10:38:44 +01:00
Anatol Belski
376b676910 Dockerfile: Build SPDK for skylake
As the container image can be used on both Intel and AMD,
ensure the SPDK binaries are compatible. This implies -march=skylake
passed to the underlaying toolchain.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2023-08-04 13:50:34 +01:00
Bo Chen
219716c3f1 scripts: Stop using "--no-default-features" for cargo build
Now feature "mshv" can be built together with "kvm". There is no need to
use "--no-default-features" any more.

Fixes: #5647

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-08-04 07:34:13 +01:00
Ruslan Mstoi
70cfd1be67 scripts: dev_cli: add possibly to use different container registry
Currently if container registry is inaccessible the image will be built
locally and that takes time. This patch adds support to use mirror
registry. To use a different registry CTR_IMAGE environment variable
must be set. For example:

CTR_IMAGE="registry/cloud-hypervisor" scripts/dev_cli.sh

or

export CTR_IMAGE="registry/cloud-hypervisor"
scripts/dev_cli.sh

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-08-04 08:12:22 +08:00
Anatol Belski
0b6bc75d3a tests: Ensure sufficient nofile limit for VFIO tests
The VFIO tests based on the NVMe emulation framework require cause a
high number of file descriptors to be opened on the system. On systems
with a low limit on opened files, tests like test_vfio_user can possibly
fail with "too many open files" exeption. This issue is fixed by raising
the corresponding limit.

A tricky detail here is, that the limit has to be changed in the test
container and not on the host. As the the container is executed in the
privileged mode, the setting in it will override the host value.

Related: #5426

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2023-07-31 17:21:47 +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
Ruslan Mstoi
7d0aa1fd02 scripts: dev_cli: Bump container version
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-06-20 12:39:18 -07:00
Bo Chen
268c4ea214 tests: disable test_vfio test
Details: https://github.com/cloud-hypervisor/cloud-hypervisor/issues/5190#issuecomment-1599357074

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-06-20 12:14:03 -07:00
Ruslan Mstoi
29a0ddc58e tests: Revert disable test_vfio test
This reverts commit 51c1738d55.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-06-20 16:39:21 +01:00
Ruslan Mstoi
56207dc3a0 tests: fix issue running vfio tests with empty workloads directory
Download firmware and focal image to fix issue of running vfio tests
with empty worlkoads directory:

$ scripts/dev_cli.sh tests --integration-vfio
+ cp /root/workloads/focal-server-cloudimg-amd64-custom-20210609-0.raw /root/workloads/vfio
cp: cannot stat '/root/workloads/focal-server-cloudimg-amd64-custom-20210609-0.raw': No such file or directory
+ cp /root/workloads/hypervisor-fw /root/workloads/vfio
cp: cannot stat '/root/workloads/hypervisor-fw': No such file or directory

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-06-15 15:54:43 -07:00
Ravi kumar Veeramally
e8d6c9ecb0 test_data: Simplify default configuration for local testing
Script `create-cloud-init.sh" uses the same cloud init data as the the CI
but this means it is somewhat overloaded with unhelpful network configuration
entries and scripts that are only needed for the CI.

For local testing data kept in test_data/cloud-init/ubuntu/local folder.
This contains minimum configuration data for user to test it locally.
Script assigns default IP address using "network-config" details
with --net "tap=" option. The default network interface will be "ens4".

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
2023-06-14 10:23:52 -07: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
18e1d2caf5 tests: fix sha1sum check warning
Remove empty line to fix warning:
"sha1sum: WARNING: 1 line is improperly formatted"

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-06-01 13:45:47 +01: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
smit-gardhariya
b56da6ee24 Export RUST_BACKTRACE when it is not set explicitly
Currently we are overwriting the RUST_BACKTRACE if set
explicitly by user while running performance metrics tests
using dev_cli.sh

This change will allow user to set the RUST_BACKTRACE
while running performance metrics tests with dev_cli.sh
which invokes run_metrics.sh to run the performance binary.
We will set RUST_BACKTRACE to 1 if not set explicitly.

Signed-off-by: smit-gardhariya <gardhariya.smit@gmail.com>
2023-04-10 14:08:21 -07:00
Alyssa Ross
67ad3ff1ba scripts: run doc tests
Signed-off-by: Alyssa Ross <hi@alyssa.is>
2023-04-05 11:22:47 +01:00
Omer Faruk Bayram
06a9c3b839 scripts: dev_cli: mention the --local flag in the help string
Signed-off-by: Omer Faruk Bayram <omer.faruk@sartura.hr>
2023-03-28 12:37:35 +01:00
Rob Bradford
a062401be6 scripts: dev_cli: Bump container version
Unfortunately the build had a transient error and so needed to be
restarted which generated a build with a different date tag.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-03-16 08:36:25 +00:00
Rob Bradford
ca96ff601b build: Migrate from DockerHub to ghcr
It is necessary to transition away from DockerHub as the small
organisation plan in being EOLed.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-03-15 22:41:23 +00:00
Bo Chen
c152f9f6bc mics: Update reference kernel to 6.2
Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-03-11 09:55:34 +00:00
Bo Chen
325e62372d scripts: Ensure to rebuild custom kernel for bare-metal tests
Tests of rate-limiter and vfio are running on bare-metal, so we need to
ensure the custom kernel is updated and rebuilt for them.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-03-11 09:55:34 +00:00
Bo Chen
9421884334 scripts: Use 'build_custom_linux' if possible
Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-03-11 09:55:34 +00: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
Bo Chen
85962099c7 build: Update development container and release action to Rust 1.67
This latest stable Rust toolchain can help reduce the final binary size
around ~300k when comparing with building with Rust 1.62. Specifically,
the binary size now is 3.3M (previously 3.6M) with default feature, and
4.0M (previously 4.2M) with "kvm+mshv" feature (e.g. our release action
build) .

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-03-01 15:16:23 +00:00
Ruslan Mstoi
2e94a86b31 scripts: dev_cli.sh: print help if command unspecified
To improve user friendliness, print help text when no command is given.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-02-22 11:29:54 -08:00
Ruslan Mstoi
bd1e1677bd scripts: ch-trace-visualiser.py: remove unused import 'xml'
Unused import 'xml' is redefined at:

> xml = ET.ElementTree(element=svg)

Hence, remove unused xml import.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-02-17 11:48:37 -08:00
Rob Bradford
51c1738d55 tests: Disable test_vfio test
This test (which relies on nesting) is failing on the VFIO worker. The tests that use the
dedicated hardware pass fine.

See: #5190

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-02-15 12:30:34 +00:00
Anatol Belski
934b20a77a ci: Switch to Windows Server 2022
The updated image is configured in a same way as the previously used
2019, it has same

- Credentials
- Services configured, like SAC, SSH, RDP
- Size

All the Windows updates are applied so the state is current to the date.
Also, the latest stable version 0.1.229 of the VirtIO Windows drivers
is installed.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2023-02-10 17:48:46 +01:00
Rob Bradford
d5ce855649 misc: Update reference kernel to 6.1.6
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-01-30 08:12:56 +00:00
Ravi kumar Veeramally
8e682bcb00 scripts: Avoid warning from mkdosfs command
Fix lowercase label to avoid "mkfs.fat: Warning: lowercase labels
might not work properly on some systems".

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
2023-01-27 08:12:38 -08:00
Muminul Islam
e436b382cc scripts: check if /dev/{mshv,kvm} exists before test run
Right now integration test fails during the test run if
/dev/mshv or /dev/kvm does not exist. We should not
progress and exit early if not present.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2023-01-26 07:58:13 +00:00
Praveen K Paladugu
a4ef6e57a7 ci: install swtpm in Docker container
Add steps to build and install swtpm and its dependencies in
ci docker container.

Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
2023-01-23 10:10:19 -08:00
Rob Bradford
a86edd3032 tests: Add tpm2-tools to custom jammy image
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-01-19 19:19:52 +00:00
Rob Bradford
5034bea8c4 Docker: Update Rust toolchain in dev container
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2023-01-16 16:43:49 +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
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
Rob Bradford
c95b82d975 scripts: Build dual kvm/mshv binary (like release.yaml) for integration testing
This means we are testing the same binary as we use in our releases.

Fixes: #4915

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-11-24 17:06:56 +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
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
Rob Bradford
103fe1f48b tests: Skip building kernel if already present
When running the glibc and musl integration tests on the CI after each
other skip building the kernel a second time.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-11-02 09:42:07 +00:00
Smit Gardhariya
45fa8be97a scripts: Remove common feature flag for mshv tests
Commit b2d1dd65f3 ("build: Remove "fwdebug" and "common" feature
flags") removed support for common features flag. But some of the
scripts are still using that parameter specifically test related to mshv
hypervisor. Thus fix those scripts by removing common feature flag.

Signed-off-by: Smit Gardhariya <sgardhariya@microsoft.com>
2022-09-28 10:53:22 +00:00
Rob Bradford
5e811a6823 scripts: Add tracing visualisation script
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-09-22 18:09:31 +01:00
Bo Chen
ef1983ee60 scripts: Add script to run rate limiter integration tests
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-09-14 15:01:43 +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