Commit Graph

114 Commits

Author SHA1 Message Date
Rob Bradford
55adcc27da tests: Replace last vestiges of focal use with jammy
Focal has served us well for many years but is now beyond EOL. Remove
all remaining use of focal images from the CI.

Signed-off-by: Rob Bradford <rbradford@meta.com>
2026-05-11 17:52:00 +00:00
Rob Bradford
12f48700a2 tests: Wait for boot notification from test_vfio_user L2 guest
Reuse the boot notification method we have for the L1 guests for the L2
guest. This removes the need to use SSH based boot tracking for
connecfting to the L2 guest and should make the test more reliable.

This requires making the L2 guest use a different cloud-init
configuration to the L1.

Signed-off-by: Rob Bradford <rbradford@meta.com>
2026-05-06 12:30:08 +00:00
Rob Bradford
9703971ae7 tests: Use separate IP address for guest -> host notification
This will allow an L2 guest to notify the L1 host.

Signed-off-by: Rob Bradford <rbradford@meta.com>
2026-05-06 12:30:08 +00:00
Muminul Islam
56a986145e performance-metrics: Add vm_type to PerformanceTestOverrides
Add an optional vm_type field to PerformanceTestOverrides to
allow overriding the VM type at runtime. Include vm_type in
the Display output for override logging.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-05-01 09:36:58 +00:00
Muminul Islam
11623a2183 test_infra: Implement Display for GuestVmType
Add Display trait implementation for GuestVmType to enable
formatted output of the VM type in logs and diagnostics.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-05-01 09:36:58 +00:00
Muminul Islam
0e7fcc623e test_infra: Implement FromStr for GuestVmType
Add FromStr trait implementation for GuestVmType to enable
parsing from CLI string arguments. Supports "regular" and
"confidential" string values.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-05-01 09:36:58 +00:00
Anatol Belski
78a05ab0c1 test_infra: Test stale process group is replaced
Spawn a process that exits immediately, then spawn another under
the same test name. Verify the stale group is detected and a fresh
group is created for the second child.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-04-20 18:09:02 +00:00
Anatol Belski
0a2d078479 test_infra: Test cleanup of unknown name returns false
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-04-20 18:09:02 +00:00
Anatol Belski
6e8c2bd2b3 test_infra: Test multiple spawns share one process group
Spawn two processes under the same test name and verify they
have the same group PID. Cleanup kills both.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-04-20 18:09:02 +00:00
Anatol Belski
6453a9a91a test_infra: Test ProcessRegistry spawn and cleanup
Spawn a sleep process through the registry, verify it is alive,
call cleanup and verify the process was killed.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-04-20 18:09:02 +00:00
Anatol Belski
18513ead0c test_infra: Wire spawn sites through ProcessRegistry
Route GuestCommand::spawn(), iperf3, and ethr spawns through
ProcessRegistry::spawn() when the guest has a test_name.  This
places every child process into the test's shared process group
so they can all be killed with a single killpg call.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-04-20 18:09:02 +00:00
Anatol Belski
3ab2c60489 test_infra: Add ProcessRegistry for per test process groups
Add a global registry that maps test names to process group IDs.
The first child spawned for a test creates a new process group
via setpgid(0, 0); subsequent children join it via setpgid(0, pgid).
A single killpg(pgid, SIGKILL) tears down all processes the test
spawned.

Also add Guest.test_name, populated automatically from the current
thread name at construction time.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-04-20 18:09:02 +00:00
Rob Bradford
67cf328a9e tests: Speed up test_pci_device_id()
This test was taking > 300s due to SSH backoffs.

Signed-off-by: Rob Bradford <rbradford@meta.com>
2026-04-17 07:45:22 +00:00
Pascal Scholz
8259f92909 tests: Return stderr when executing commands
If we want to test for error cases, it can be useful to inspect the
`stderr` of a `Command` to analyze the errors. For example, this allows
us to ensure that a `Command` returns an `IoError` by parsing the
error trace, if an `IoError` is expected.

This commit prepares the implementation of negative integration tests
for the configurable BDFs.

Signed-off-by: Pascal Scholz <pascal.scholz@cyberus-technology.de>
On-behalf-of: SAP pascal.scholz@sap.com
2026-04-17 07:45:22 +00:00
Rob Bradford
030e63476e tests: Reduce explicit sleep time in _test_api_* tests
Use new `wait_until()` and existing boot response mechanisms to remove
explicit sleeps from these tests.

Signed-off-by: Rob Bradford <rbradford@meta.com>
2026-04-16 22:50:47 +00:00
Anatol Belski
e5ad85d7de test_infra: Prepare QCOW2 overlay for Windows guests
WindowsDiskConfig now creates a qcow2 overlay backed by the raw
Windows image during prepare_files(). The overlay is placed under
~/workloads alongside the raw image. Writes go into the overlay
so the backing raw image stays unmodified, matching the CoW
semantics already provided by the dm snapshot for raw tests.

Drop removes the qcow2 file.

The DiskConfig trait gains a qcow2_disk() default method returning
None. WindowsDiskConfig overrides it to expose the overlay path.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-04-15 17:28:58 +00:00
Anatol Belski
73680c38c7 ci: Switch to Windows Server 2025 for AMD64
The updated image is configured in a same way as the
previously used 2022.

SAC, SSH, and RDP are configured.

All Windows updates to the curent date are installed.

Includes latest stable virtio-win 0.1.285 drivers.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-04-14 16:09:36 +00:00
Philipp Schuster
47024e73ce tests: Replace common integration sleeps with polling
Use polling helpers in common integration tests instead of fixed
sleeps where the tests already know the expected ready state.

This updates CPU and memory hotplug checks as well as a few
device- and restore-related waits in common_parallel to stop
oversleeping on the fast path while keeping the same assertions.

On-behalf-of: SAP philipp.schuster@sap.com
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2026-04-14 09:18:47 +00:00
Philipp Schuster
b26488b1bf test_infra: bound SSH session runtime in wait_for_ssh
Allow one-shot SSH commands to install a libssh2 session timeout and
use that path from wait_for_ssh.

This keeps SSH readiness probes from blocking far beyond their caller
provided timeout when the guest network is slow or broken.

On-behalf-of: SAP philipp.schuster@sap.com

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2026-04-14 09:18:47 +00:00
Philipp Schuster
a3b4687caa test_infra: split SSH command helpers by retry behavior
Split the SSH helpers into a one-shot execution path and a retrying
wrapper with linear backoff.

This makes it possible to use a single bounded SSH attempt when tests
need a direct readiness probe while preserving the existing retrying
behavior for callers that expect it.

On-behalf-of: SAP philipp.schuster@sap.com

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2026-04-14 09:18:47 +00:00
Philipp Schuster
c77094bd54 test_infra: add polling helpers for integration tests
Add generic polling helpers for integration tests and build the
SSH wait helpers on top of them.

This lets follow-up test changes replace fixed sleeps with
condition-based waits without duplicating retry logic at each call
site.

On-behalf-of: SAP philipp.schuster@sap.com

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
2026-04-14 09:18:47 +00:00
Bo Chen
e8b6fe0548 tests: vfio: Capture guest dmesg when nvidia-smi failed
The guest dmesg can provide more context from the guest kernel, say
Nvidia driver errors, IOMMU faults, etc.

Signed-off-by: Bo Chen <bchen@crusoe.ai>
2026-04-13 07:40:02 +00:00
Muminul Islam
c8bfac66f4 test_infra: Move remote_command to test_infra
Move remote_command() and remote_command_w_output() from
tests/common/utils.rs into test_infra/src/lib.rs to allow
reuse across crates.

The cloud-hypervisor integration tests already use
'use test_infra::*', so the functions are available
without any caller changes.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-04-02 14:39:21 +00:00
Muminul Islam
0fc0f2bd0e tests: add basic_regular_guest macro and with_kernel
Introduce a basic_regular_guest! macro in integration.rs
to reduce boilerplate when creating regular (non-CVM)
guest instances. Also add a with_kernel() builder method
to Guest in test_infra, allowing fluent configuration of
the kernel path.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-25 13:34:59 +00:00
Muminul Islam
2aa92bf4b4 tests: Add platform argument support to kernel cmdline builder
Introduce default_kernel_cmdline_with_platform() in GuestCommand
that accepts an optional platform parameter. For confidential
VMs, the platform arg is prepended to sev_snp=on. For regular
VMs, it is passed via --platform if provided.

Retain default_kernel_cmdline() as a convenience wrapper that
calls the new method with None, preserving backward
compatibility.

This enables tests to pass additional platform configuration
such as num_pci_segments alongside the default kernel and
cmdline setup.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-19 16:17:28 +00:00
Muminul Islam
9059fb902d tests: Refactor test_cpu_affinity into reusable helper
Extract CPU affinity test logic from test_cpu_affinity into a
standalone _test_cpu_affinity helper that accepts a Guest
reference. The helper verifies the host has at least 4 CPUs,
boots a VM with affinity settings, and asserts vcpu0 is pinned
to cores 0,2 and vcpu1 to cores 1,3.

Add default_cpus_with_affinity_string() to Guest and
default_cpus_with_affinity() to GuestCommand in test_infra
to generate CPU arguments with affinity configuration.

Update the test_cpu_affinity call site in common_parallel to
use GuestFactory and delegate to the new helper, enabling
reuse with different guest types.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-19 16:17:28 +00:00
Muminul Islam
e278e5e931 tests: Refactor _test_power_button to accept Guest parameter
Remove the acpi bool parameter and internal guest and kernel
setup from _test_power_button. The function now accepts a Guest
reference and uses default_kernel_cmdline() instead of
hardcoded kernel paths.

Update test_power_button in common_parallel to create a regular
guest via GuestFactory. Update test_power_button_acpi in
aarch64_acpi to use with_kernel_path(edk2_path()) for ACPI
firmware support.

Add with_kernel_path() builder method on Guest in test_infra
to allow overriding the kernel path after guest creation.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-19 16:17:28 +00:00
Muminul Islam
f6a1d821d7 tests: extend timeout for CVM tests
Confidential VMs require additional time during boot to load the IGVM
image, complete page measurements, and perform Reverse Map Table (RMP)
validation. In addition, PSP latency can further delay the boot
process. Extend the test timeout to accommodate these additional
initialization steps.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-13 08:59:00 +00:00
Muminul Islam
7a0019514f tests: Make api_create_body() parameterless
Refactor api_create_body() to read cpu_count, kernel_path,
and kernel_cmdline from Guest fields instead of taking them
as parameters. This makes Guest the single source of truth
for VM configuration.

Update all call sites in HTTP and DBus API tests to use the
new parameterless signature. Switch guest creation to use
GuestFactory for consistent 4-CPU configuration.

Replace manual CPU and memory assertions with
validate_cpu_count() and validate_memory() helpers.
Replace thread::sleep with wait_vm_boot() in
_test_api_create_boot for proper boot synchronization.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-03 09:09:34 +00:00
Muminul Islam
f443bae9d9 tests: Support CVM in api_create_body()
Refactor api_create_body() to branch based on GuestVmType.
For confidential VMs, the JSON body now includes:
- platform config with sev_snp enabled
- IGVM payload with host_data instead of kernel
- nested virtualization disabled in CPU config

Replace the monolithic format! macro with incremental
push_str calls for clearer JSON construction.

Also improve error handling in GuestCommand by replacing
an unwrap() with a descriptive expect() on the IGVM path.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-03 09:09:34 +00:00
Muminul Islam
85159c9255 tests: Add factory pattern to create guest instances
Introduce GuestFactory struct that encapsulates GuestVmType,
boot timeout, and nested virtualization defaults. This avoids
repeatedly specifying VM type and associated defaults when
constructing Guest instances in integration tests.

Two factory constructors are provided:
- new_regular_guest_factory: default timeout, nested enabled
- new_confidential_guest_factory: CVM timeout, nested disabled

Multiple create_guest variants allow customizing CPU count,
memory size, and nested virtualization while inheriting the
factory's VM type and timeout settings.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-03 09:09:34 +00:00
Muminul Islam
f2d3c17e1f test_infra: set default kernel path and cmdline in Guest
Initialize kernel_path and kernel_cmdline with standard
direct boot defaults in the Guest constructor instead of
None. This removes boilerplate from individual tests that
use the common direct kernel boot configuration.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-03 09:09:34 +00:00
Muminul Islam
838a4f86c4 tests: move shared constants and helpers to test_infra
Move test constants (MAX_NUM_PCI_SEGMENTS,
DIRECT_KERNEL_BOOT_CMDLINE, CONSOLE_TEST_STRING),
arch-specific image name modules (x86_64, aarch64),
and helper functions (direct_kernel_boot_path, edk2_path)
from integration.rs to test_infra/src/lib.rs.

This centralizes shared test definitions so they can be
reused across multiple test crates instead of being
confined to integration.rs.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-03-03 09:09:34 +00:00
Muminul Islam
32edcf39a6 tests: centralize memory validation in test helpers
Replace the hard-coded memory threshold check in the simple launch
integration test with Guest::validate_memory(None).

Add Guest::get_expected_memory() to derive thresholds from mem_size_str
and vm_type, and reuse this through validate_memory().

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-02-27 10:44:18 +00:00
Muminul Islam
05aeef06e5 tests: centralize default memory args in helpers
Replace hard-coded --memory args in simple launch tests
with GuestCommand defaults driven by Guest state.
Add Guest.mem_size_str with a default of 512M and introduce
default_memory_string() and GuestCommand::default_memory().

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-02-27 10:44:18 +00:00
Muminul Islam
45a5c7a04e tests: validate CPU count in the test infra
Instead of validating number of CPU in the test case itself,
moving the checking of the CPU count to Guest struct with a
new function as The Guest already has the Default CPU number.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-02-27 10:44:18 +00:00
Muminul Islam
60c6242bde tests: centralize default CPU arguments in test infrastructure
Replace the hard-coded  .args(["--cpus", "boot=1"]) in the simple
launch integration test with a shared helper (default_cpus) from test
infrastructure.

Extend Guest with explicit CPU-related defaults (num_cpu, nested)
and add default_cpus_string() so CPU configuration is derived from
guest state instead of being duplicated at call sites.

This refactor improves consistency and makes CPU defaults easier to
maintain across integration tests.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-02-27 10:44:18 +00:00
Muminul Islam
fdc51d923f tests: refactor event sequencing expectations for simple launch
Move MetaEvent from the integration test into shared test infrastructure
and expose it for reuse. Add a Guest helper that returns the expected
sequential events for simple launch, and update the integration test to
consume this helper instead of maintaining a local event list.

Adjust expected behavior for confidential VMs by omitting the disk reset
event, which is not guaranteed to be emitted in that mode. Preserve the
existing expected sequence for non-confidential VMs.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-02-27 10:44:18 +00:00
Anatol Belski
e067c76880 tests: windows: Disable sparse for DM snapshot OS disks
The Windows tests use a DM snapshot device for the OS disk.
DM snapshot targets do not support BLKDISCARD, so the VMM returns
IOERR for every TRIM attempt. viostor.sys may BSOD when the host
returns an error for negotiated discard/write-zeroes operations.

Add a default_disks_sparse_off() helper to GuestCommand and use it
in all Windows tests.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2026-02-26 00:43:20 +00:00
dependabot[bot]
a702bf1d10 build: Bump the non-rust-vmm group across 2 directories with 19 updates
Includes fix for rand build error (need to use trait).

Bumps the non-rust-vmm group with 15 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.100` | `1.0.101` |
| [clap](https://github.com/clap-rs/clap) | `4.5.56` | `4.5.57` |
| [libc](https://github.com/rust-lang/libc) | `0.2.180` | `0.2.181` |
| [zerocopy](https://github.com/google/zerocopy) | `0.8.37` | `0.8.39` |
| [flate2](https://github.com/rust-lang/flate2-rs) | `1.1.8` | `1.1.9` |
| [getrandom](https://github.com/rust-random/getrandom) | `0.4.0` | `0.4.1` |
| [rand](https://github.com/rust-random/rand) | `0.9.2` | `0.10.0` |
| [jiff](https://github.com/BurntSushi/jiff) | `0.2.18` | `0.2.19` |
| [memchr](https://github.com/BurntSushi/memchr) | `2.7.6` | `2.8.0` |
| [regex](https://github.com/rust-lang/regex) | `1.12.2` | `1.12.3` |
| [regex-automata](https://github.com/rust-lang/regex) | `0.4.13` | `0.4.14` |
| [regex-syntax](https://github.com/rust-lang/regex) | `0.8.8` | `0.8.9` |
| [tempfile](https://github.com/Stebalien/tempfile) | `3.24.0` | `3.25.0` |
| [unicode-ident](https://github.com/dtolnay/unicode-ident) | `1.0.22` | `1.0.23` |
| [zmij](https://github.com/dtolnay/zmij) | `1.0.19` | `1.0.20` |

Bumps the non-rust-vmm group with 8 updates in the /fuzz directory:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.100` | `1.0.101` |
| [clap](https://github.com/clap-rs/clap) | `4.5.56` | `4.5.57` |
| [libc](https://github.com/rust-lang/libc) | `0.2.180` | `0.2.181` |
| [zerocopy](https://github.com/google/zerocopy) | `0.8.37` | `0.8.39` |
| [flate2](https://github.com/rust-lang/flate2-rs) | `1.1.8` | `1.1.9` |
| [memchr](https://github.com/BurntSushi/memchr) | `2.7.6` | `2.8.0` |
| [unicode-ident](https://github.com/dtolnay/unicode-ident) | `1.0.22` | `1.0.23` |
| [zmij](https://github.com/dtolnay/zmij) | `1.0.19` | `1.0.20` |

Updates `anyhow` from 1.0.100 to 1.0.101
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.100...1.0.101)

Updates `clap` from 4.5.56 to 4.5.57
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.56...clap_complete-v4.5.57)

Updates `libc` from 0.2.180 to 0.2.181
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.181/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.180...0.2.181)

Updates `zerocopy` from 0.8.37 to 0.8.39
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/compare/v0.8.37...v0.8.39)

Updates `flate2` from 1.1.8 to 1.1.9
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.1.8...1.1.9)

Updates `getrandom` from 0.4.0 to 0.4.1
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/getrandom/compare/v0.4.0...v0.4.1)

Updates `rand` from 0.9.2 to 0.10.0
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/rand_core-0.9.2...0.10.0)

Updates `clap_builder` from 4.5.56 to 4.5.57
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.5.56...v4.5.57)

Updates `jiff` from 0.2.18 to 0.2.19
- [Release notes](https://github.com/BurntSushi/jiff/releases)
- [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.18...jiff-static-0.2.19)

Updates `jiff-static` from 0.2.18 to 0.2.19
- [Release notes](https://github.com/BurntSushi/jiff/releases)
- [Changelog](https://github.com/BurntSushi/jiff/blob/master/CHANGELOG.md)
- [Commits](https://github.com/BurntSushi/jiff/compare/jiff-static-0.2.18...jiff-static-0.2.19)

Updates `memchr` from 2.7.6 to 2.8.0
- [Commits](https://github.com/BurntSushi/memchr/compare/2.7.6...2.8.0)

Updates `regex` from 1.12.2 to 1.12.3
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.12.2...1.12.3)

Updates `regex-automata` from 0.4.13 to 0.4.14
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/regex-automata-0.4.13...regex-automata-0.4.14)

Updates `regex-syntax` from 0.8.8 to 0.8.9
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/regex-syntax-0.8.8...regex-syntax-0.8.9)

Updates `tempfile` from 3.24.0 to 3.25.0
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Stebalien/tempfile/commits)

Updates `unicode-ident` from 1.0.22 to 1.0.23
- [Release notes](https://github.com/dtolnay/unicode-ident/releases)
- [Commits](https://github.com/dtolnay/unicode-ident/compare/1.0.22...1.0.23)

Updates `zerocopy-derive` from 0.8.37 to 0.8.39
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/compare/v0.8.37...v0.8.39)

Updates `zmij` from 1.0.19 to 1.0.20
- [Release notes](https://github.com/dtolnay/zmij/releases)
- [Commits](https://github.com/dtolnay/zmij/compare/1.0.19...1.0.20)

Updates `anyhow` from 1.0.100 to 1.0.101
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.100...1.0.101)

Updates `clap` from 4.5.56 to 4.5.57
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.56...clap_complete-v4.5.57)

Updates `libc` from 0.2.180 to 0.2.181
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Changelog](https://github.com/rust-lang/libc/blob/0.2.181/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.180...0.2.181)

Updates `zerocopy` from 0.8.37 to 0.8.39
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/compare/v0.8.37...v0.8.39)

Updates `flate2` from 1.1.8 to 1.1.9
- [Release notes](https://github.com/rust-lang/flate2-rs/releases)
- [Commits](https://github.com/rust-lang/flate2-rs/compare/1.1.8...1.1.9)

Updates `clap_builder` from 4.5.56 to 4.5.57
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.5.56...v4.5.57)

Updates `hashbrown` from 0.16.1 to 0.15.5
- [Release notes](https://github.com/rust-lang/hashbrown/releases)
- [Changelog](https://github.com/rust-lang/hashbrown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/hashbrown/compare/v0.16.1...v0.15.5)

Updates `memchr` from 2.7.6 to 2.8.0
- [Commits](https://github.com/BurntSushi/memchr/compare/2.7.6...2.8.0)

Updates `unicode-ident` from 1.0.22 to 1.0.23
- [Release notes](https://github.com/dtolnay/unicode-ident/releases)
- [Commits](https://github.com/dtolnay/unicode-ident/compare/1.0.22...1.0.23)

Updates `zerocopy-derive` from 0.8.37 to 0.8.39
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/compare/v0.8.37...v0.8.39)

Updates `zmij` from 1.0.19 to 1.0.20
- [Release notes](https://github.com/dtolnay/zmij/releases)
- [Commits](https://github.com/dtolnay/zmij/compare/1.0.19...1.0.20)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-version: 1.0.101
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: clap
  dependency-version: 4.5.57
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: libc
  dependency-version: 0.2.181
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: zerocopy
  dependency-version: 0.8.39
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: flate2
  dependency-version: 1.1.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: getrandom
  dependency-version: 0.4.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: rand
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: clap_builder
  dependency-version: 4.5.57
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: jiff
  dependency-version: 0.2.19
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: jiff-static
  dependency-version: 0.2.19
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: memchr
  dependency-version: 2.8.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: regex
  dependency-version: 1.12.3
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: regex-automata
  dependency-version: 0.4.14
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: regex-syntax
  dependency-version: 0.8.9
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: tempfile
  dependency-version: 3.25.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: unicode-ident
  dependency-version: 1.0.23
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: zerocopy-derive
  dependency-version: 0.8.39
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: zmij
  dependency-version: 1.0.20
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: anyhow
  dependency-version: 1.0.101
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: clap
  dependency-version: 4.5.57
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: libc
  dependency-version: 0.2.181
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: zerocopy
  dependency-version: 0.8.39
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: flate2
  dependency-version: 1.1.9
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: clap_builder
  dependency-version: 4.5.57
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: hashbrown
  dependency-version: 0.15.5
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: memchr
  dependency-version: 2.8.0
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: non-rust-vmm
- dependency-name: unicode-ident
  dependency-version: 1.0.23
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: zerocopy-derive
  dependency-version: 0.8.39
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
- dependency-name: zmij
  dependency-version: 1.0.20
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: non-rust-vmm
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Rob Bradford <rbradford@meta.com>
2026-02-10 15:26:04 +00:00
Muminul Islam
258f826027 tests: Add initial support of CVM test on MSHV
This patch adds the skeleton of the CVM test
support and modify existing scripts and test framework
to enable such scenario. Split the sha1sum to support both
regular and CVM guest. Add one test case for CVM. Will further
add more test cases.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-02-06 06:37:26 +00:00
Muminul Islam
6042eb969e tests: remove timeout argument
Now Guest struct has an option to set timeout.
No need to pass timeout while booting the guest.
If no timeout is set, default is used.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-02-06 06:37:26 +00:00
Muminul Islam
12f66b7ddc tests: Add option to pass guest for tests
Modify Guest struct to keep some test specific
data so that test cases could be shared between
regular guest and CVM.

Signed-off-by: Muminul Islam <muislam@microsoft.com>
2026-02-06 06:37:26 +00:00
Philipp Schuster
70146ee7af test_infra: Adapt to workspace + make code more robust
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
2025-12-09 16:13:10 +00:00
Philipp Schuster
c53781bf5f misc: clippy: add needless_pass_by_value
This is a follow-up of [0].

# Advantages

- This saves dozens of unneeded clone()s across the whole code base
- Makes it much easier to reason about how parameters are used
  (often we passed owned Arc/Rc versions without actually needing
  ownership)

# Exceptions

For certain code paths, the alternatives would require awkward or overly
complex code, and in some cases the functions are the logical owners of
the values they take. In those cases, I've added
#[allow(clippy::needless_pass_by_value)].

This does not mean that one should not improve this in the future.

[0] 6a86c157af

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
2025-11-27 17:11:14 +00:00
Philipp Schuster
0a07c96d17 misc: clippy: add if_not_else
This removes cognitive load when reading if statements.
All changes were applied by clippy via `--fix`.

Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
2025-11-25 16:05:46 +00:00
Philipp Schuster
7cb73e9e56 misc: clippy: add unnecessary_semicolon
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de>
On-behalf-of: SAP philipp.schuster@sap.com
2025-11-21 09:32:11 +00:00
Rob Bradford
176023156e test_infra: Make guest ID generation multiprocess safe
When using nextest for running tests each test is run in its own process
so the old solution of using a static variable for the guest ID (used to
determine the network segment) no longer works.

Instead use a text file on the filesystem protected with an exclusive
lock. The test process will read from it and then write back the next ID
that can be used. It wraps around at the limit of u8 and skips ID 0.

This function intentionally panics rather than propagate errors as it
should only be called for testing purposes and there the panic handler
will give a useful backtrace and cleanup.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2025-11-17 10:22:34 +00:00
Rob Bradford
11eabaf97d tests: Add second network interface definition to guest
Add a second L1 network interface definition to the guest Cloud Init
configuration, including an additional host IP. Do this by splitting the
network range into two /25s. For clarity the network struct members have
also been renamed.

Signed-off-by: Rob Bradford <rbradford@rivosinc.com>
2025-10-21 23:41:37 +00:00
Bo Chen
f122398262 misc: Fix beta clippy issues
Fixed with 'cargo clippy --fix' mostly.

Signed-off-by: Bo Chen <bchen@crusoe.ai>
2025-09-17 03:59:57 +00:00