Commit Graph

361 Commits

Author SHA1 Message Date
Rob Bradford
084eb0792d build: Bump MSRV to 1.74
This is required for the updated clap crate (see #6237)

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-02-29 19:42:16 +00:00
Alexandru Matei
3f2ca5375e scripts: Change features_build variable type to array
Because of double quotes the current value is passed
as a single argument with a space in it to cargo.
This commit changes it to an array so each element
is passed as a different arguments.

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2024-02-29 11:38:43 +00:00
Ravi kumar Veeramally
05ec6190da scripts: Update Azure storage location to access images
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
2024-02-29 08:15:18 +00:00
Bo Chen
1d098949b9 ci: Remove Jenkinsfile
Most of our CI workers are now running form GitHub actions, so we are
ready to disable Jenkins CI workers.

See: #6231

Signed-off-by: Bo Chen <chen.bo@intel.com>
2024-02-28 08:49:29 -08:00
Rob Bradford
6930370a03 tests: Remove download of unused bionic image for aarch64
The bionic image was being downloaded and converted but no test uses
this image any longer.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2024-02-22 12:28:40 +00:00
Stefan Nuernberger
d8cd403c5d arch: x86_64: integration test for bzImage boot
Signed-off-by: Stefan Nuernberger <stefan.nuernberger@cyberus-technology.de>
2024-02-19 17:07:50 +00:00
Ruslan Mstoi
2b2d00653c scripts: fix shell scripts according to shellcheck errors
Unify coding style of shell scripts in accordance with
shellcheck errors.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2024-02-13 10:20:18 +00:00
Ruslan Mstoi
318caeb9d8 scripts: fix shell scripts format according to shfmt
Unify coding style of shell scripts in accordance with shfmt checks.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2024-02-13 10:20:18 +00:00
Muminul Islam
66f8841ba1 scripts: add main as a component
Main should be a component during the commit check.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2024-02-08 09:46:45 -08:00
Ruslan Mstoi
1617736937 scripts: check-image-compatibility.sh: remove unused variable COUNT
COUNT variable is never used, hence remove

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2024-01-30 09:07:34 -08:00
Ruslan Mstoi
a9340f5d9d scripts: check-image-compatibility.sh: remove unused variable extension
extenstion variable is never used, hence remove

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2024-01-30 09:07:34 -08:00
Ruslan Mstoi
82cac6f6ad scripts: check-image-compatibility.sh: fix variable name typo
Fix liness to lines

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2024-01-30 09:07:34 -08:00
Ruslan Mstoi
4625f3ca3a scripts: dev_cli: remove unused cargo variable
Variable cargo is unused, hence remove it.

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2024-01-29 10:03:49 -08:00
Thomas Barrett
76dbe660f5 scripts: create download_ovmf helper function
Move the duplicated logic to download OVMF into a helper function.
Explicitly specify the OVMF_FW_TAG instead of downloading the latest
so that new OVMF versions can be easily tested.

Signed-off-by: Thomas Barrett <tbarrett@crusoeenergy.com>
2024-01-18 14:02:02 -08:00
Ravi kumar Veeramally
24f384d239 tests: Migrate docker container from ubuntu 20.04 to 22.04
The following tests have been temporarily disabled:

1. Live upgrade/migration test with ovs-dpdk (#5532);
2. Disk hotplug tests on windows guests (#6037);

This patch has been tested with PR #6048.

Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com>
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
Tested-by: Bo Chen <chen.bo@intel.com>
2023-12-20 12:12:05 -08:00
Philipp Schuster
91fe48d5f7 scripts: more compatible shebangs
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2023-12-16 09:35:32 +00:00
Michael Zhao
f0c5592ba1 scripts: Workaround random wget failures on AArch64
Random failures of downloading `cloud-hypervisor-static-aarch64` with
`wget` were seen. The commit applies a workaround to retry the download
for a few times.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
2023-12-07 14:29:22 -08:00
Bo Chen
32124bce13 scripts: Show wget details for aarch64 worker
The wget has been causing frequent CI failure for the past few days,
while it can't be reproduced manually. Let's show the wget details in
our CI pipeline to understand better future errors.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-12-04 11:54:50 -08:00
Ruslan Mstoi
851ab0ad43 gitlint: validate title components
Valid title format:
component1[, component2, componentN]: submodule: summary

Title should have at least one component
Components are separated by comma+space: ", "
Components are validated to be in valid_components
Components list is ended by a colon
Submodules are not validated

See: #5846

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-11-20 08:39:43 -08:00
Bo Chen
07475d2bc1 gitlint: Increase the title length limit to 72
This is particularly useful for commits with long component names. Of
course, it is better to have concise subject that is less than 50 char.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-11-17 08:43:19 -08:00
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
Ruslan Mstoi
ea7999e064 build: add gitlint commit message linter
Implement commit message check workflow using gitlint

Fixes: #5840

Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
2023-11-16 16:09:17 +00:00
Rob Bradford
4817578ce9 build: Bump version used into container for clap crate
See: #5925

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-11-08 08:13:45 -08:00
Wei Liu
14907d0752 scripts: fix the check for GitHub authentication token
When the script is invoked via dev_cli.sh, it always gets AUTH_DOWNLOAD_TOKEN
from the environment. The original test always returns true.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
2023-11-08 10:02:15 +00:00
Rob Bradford
99a2551046 scripts: Propagate AUTH_DOWNLOAD_TOKEN into container
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-11-07 08:44:56 -08:00
Rob Bradford
5e1806aed2 scripts: Authenticate to GitHub if token present
Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-11-07 08:44:56 -08:00
Rob Bradford
72e213ebda scripts: Extract downloading hypervisor-fw to a function
This will reduce the number of locations that it will be necessary to
add authentication support.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2023-11-07 08:44:56 -08:00
Bo Chen
bd0ee6236a scripts: Simplify the script for running bare-metal VFIO tests
The script "run_integration_tests_vfio.sh" requires to be ran on a
specific machine with specific hardware (e.g. the "vfio" bera-metal
worker equipped with a Nvidia Tesla T4 card). So the provisioning of the
running machine is out of the scope of this script, including the custom
guest image with Nvidia drivers installed, and properly configured
Nvidia Tesla T4 card.

See: #4405, #5509

Signed-off-by: Bo Chen <chen.bo@intel.com>
2023-11-01 15:00:41 +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
Wei Liu
9d42f48f49 scripts: dev_cli.sh: respect preset RUSTFLAGS
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
Philipp Schuster
7bf0cc1ed5 misc: Fix various spelling errors using typos
This fixes all typos found by the typos utility with respect to the config file.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2023-09-09 10:46:21 +01: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
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