Commit Graph

339 Commits

Author SHA1 Message Date
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
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