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
Philipp Schuster
363273111a
build: treewide: fmt for edition 2024
...
`cargo +nightly fmt`
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-09-10 18:35:38 +00:00
Philipp Schuster
061351d82d
build: upgrade whole* workspace to Rust edition 2024
...
This upgrades the Cargo workspace to Rust edition 2024 to keep the
code base clean and up to date.
The commit only contains the adjustments to the Cargo.toml files and
basic compiler error fixes. Also, this commit includes new SAFETY
comments as discussed in [1]. The changes were not automatically
fixed by `cargo fix --edition` but needed manual adjustments.
Apart from that, all formatting and clippy adjustments follow in
subsequent commits.
*
As only exception, workspace member net_gen sticks to edition 2021
for now as discussed in [0].
[0] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7295#discussion_r2310851041
[1] https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7256#issuecomment-3271888674
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-09-10 18:35:38 +00:00
Oliver Anderson
8c136041cb
build: Use workspace dependencies
...
Many of the workspace members in the Cloud-hypervisor workspace share
common dependencies. Making these workspace dependencies reduces
duplication and improves maintainability.
Signed-off-by: Oliver Anderson <oliver.anderson@cyberus-technology.de >
On-behalf-of: SAP oliver.anderson@sap.com
2025-07-28 20:19:27 +00:00
Wei Liu
8a26380657
performance-metrics: Add all supported formats to block tests
...
Signed-off-by: Wei Liu <liuwe@microsoft.com >
2025-07-24 23:37:09 +00:00
Wei Liu
76d8d47f6a
performance-metrics: Initialize tests after setting overrides
...
No functional change.
Signed-off-by: Wei Liu <liuwe@microsoft.com >
2025-07-24 23:37:09 +00:00
Wei Liu
cea708deb9
performance-metrics: Fix the names of the kernels
...
In 2b05753716 , the names of the reference kernels are changed.
Signed-off-by: Wei Liu <liuwe@microsoft.com >
2025-07-16 20:20:32 +00:00
Songqian Li
e32fa593e5
build: clean up unused dependencies
...
Signed-off-by: Songqian Li <sionli@tencent.com >
2025-07-15 07:16:36 +00:00
Philipp Schuster
2100d8c30f
misc: performance-metrics: streamline error Display::fmt()
...
The changes were mostly automatically applied using the Python
script mentioned in the first commit of this series.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-13 19:55:54 +00:00
Philipp Schuster
9bd9c0cb71
misc: replace manual From<T> for *Error with #[from]
...
This is a small simplification we can use since we use `thiserror`
anyway. Note that `#[from]` implies `#[source]` [0].
[0]: https://docs.rs/thiserror/2.0.12/thiserror/index.html
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-06-12 15:55:54 +00:00
Philipp Schuster
20296e909a
misc: streamline thiserror cargo dep
...
As almost every sub crate depends on thiserror, lets upgrade it to a
workspace dependency.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-05-28 17:24:34 +00:00
Philipp Schuster
799336459d
misc: performance-metrics: streamline #[source] and Error impl
...
This streamlines the Error implementation in the Cloud Hypervisor code
base to match the remaining parts so that everything follows the agreed
conventions. These are leftovers missed in the previous commits.
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de >
On-behalf-of: SAP philipp.schuster@sap.com
2025-05-22 12:17:13 +00:00
Bo Chen
10ee003d66
misc: Fix beta clippy issues
...
Fixing the following clippy issue using `cargo clippy --fix`:
error: variables can be used directly in the `format!` string
--> build.rs:25:27
|
25 | version.push_str(&format!("-{}", extra_version));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
Signed-off-by: Bo Chen <bchen@crusoe.ai >
2025-05-14 03:44:12 +00:00
Jinank Jain
3698b8e74c
build: Centralize serde_json crate to workspace
...
`serde_json` crate is referenced by multiple components, centralize it
to workspace to better manage this crate.
Signed-off-by: Jinank Jain <jinankjain@microsoft.com >
2025-04-02 06:20:54 +00:00
dependabot[bot]
c43ae1dc9d
build: Bump dirs from 5.0.1 to 6.0.0
...
Bumps [dirs](https://github.com/soc/dirs-rs ) from 5.0.1 to 6.0.0.
- [Commits](https://github.com/soc/dirs-rs/commits )
---
updated-dependencies:
- dependency-name: dirs
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-02-11 23:57:37 +00:00
Rob Bradford
eeae63b459
build: Bump thiserror version
...
Signed-off-by: Rob Bradford <rbradford@rivosinc.com >
2025-01-06 17:39:45 +00:00
Rob Bradford
bac762e472
performance-metrics: Reap child process
...
The snapshot/restore test didn't wait on the child being spawned:
warning: spawned process is never `wait()`ed on
--> performance-metrics/src/performance_tests.rs:495:25
|
495 | let mut child = GuestCommand::new(&guest)
| _________________________^
496 | | .args(["--api-socket", &api_socket_source])
497 | | .args([
498 | | "--cpus",
... |
507 | | .spawn()
508 | | .unwrap();
| |_____________________^
|
= note: consider calling `.wait()`
= note: not doing so might leave behind zombie processes
= note: see https://doc.rust-lang.org/stable/std/process/struct.Child.html#warning
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zombie_processes
= note: `#[warn(clippy::zombie_processes)]` on by default
Signed-off-by: Rob Bradford <rbradford@rivosinc.com >
2024-10-21 15:28:17 +00:00
Ruoqing He
61e57e1cb1
misc: Further improve imports styling
...
By introducing `imports_granularity="Module"` format strategy,
effectively groups imports from the same module into one line or block,
improving maintainability and readability.
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn >
2024-09-29 16:13:48 +00:00
Rob Bradford
88a9f79944
misc: Adapt consistent import style formatting
...
Historically the Cloud Hypervisor coding style has been to ensure that
all imports are ordered and placed in a single group. Unfortunately
cargo fmt has no support for ensuring that all imports are in a single
group so if whitespace lines were added as part of the import statements
then they would only be odered correctly in the group.
By adopting "group_imports="StdExternalCrate" we can enforce a style
where imports are placed in at most three groups for std, external
crates and the crate itself. Choosing a style enforceable by the tooling
reduces the reviewer burden.
Signed-off-by: Rob Bradford <rbradford@rivosinc.com >
2024-09-29 13:08:12 +01:00
dependabot[bot]
5f814308d6
build: Bump clap from 4.5.4 to 4.5.13
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.5.4 to 4.5.13.
- [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.4...clap_complete-v4.5.13 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-20 00:02:25 +00:00
dependabot[bot]
a229afbc24
build: Bump serde from 1.0.203 to 1.0.208
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.203 to 1.0.208.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.208 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-08-17 00:02:04 +00:00
Songqian Li
e18d32bac2
performance-metrics: add restore latency performance metric
...
This patch calculates the recovery latency from the start of
recovery program to the end of restore.
Signed-off-by: Songqian Li <sionli@tencent.com >
2024-08-02 08:29:03 +00:00
dependabot[bot]
0fbb3e2c2c
build: Bump serde_json from 1.0.115 to 1.0.120
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.115 to 1.0.120.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.120 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-07-25 00:28:26 +00:00
Wei Liu
422906a0c7
performance-metrics: use inspect_err instead of map_err
...
Signed-off-by: Wei Liu <liuwe@microsoft.com >
2024-07-23 21:07:17 +00:00
dependabot[bot]
8803e4a2e7
build: Bump thiserror from 1.0.61 to 1.0.62
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.61 to 1.0.62.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.61...1.0.62 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-07-17 08:00:35 +00:00
Rob Bradford
08cf983d42
build: Fix Cargo.toml formatting
...
In 42e9632c53 a fix was made to address a
typo in the taplo configuration file. Fixing this typo indicated that
many Cargo.toml files were no longer adhering to the formatting rules.
Fix the formatting by running `taplo fmt`.
Signed-off-by: Rob Bradford <rbradford@rivosinc.com >
2024-06-18 16:19:12 +00:00
Josh Soref
42e9632c53
misc: Fix spelling issues
...
Misspellings were identified by:
https://github.com/marketplace/actions/check-spelling
* Initial corrections based on forbidden patterns from the action
* Additional corrections by Google Chrome auto-suggest
* Some manual corrections
* Adding markdown bullets to readme credits section
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com >
2024-06-08 16:31:30 +00:00
Rob Bradford
3f8cd52ffd
build: Format Cargo.toml files using taplo
...
Run the taplo formatter with the newly added configuration file
Signed-off-by: Rob Bradford <rbradford@rivosinc.com >
2024-05-08 21:46:13 +00:00
dependabot[bot]
a70808bae9
build: Bump thiserror from 1.0.58 to 1.0.60
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.58 to 1.0.60.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.60 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-05-08 00:08:24 +00:00
Rob Bradford
7966925c1c
build: Bulk update dependencies
...
Signed-off-by: Rob Bradford <rbradford@rivosinc.com >
2024-04-06 09:48:25 +00:00
dependabot[bot]
b072671e82
build: Bump serde_json from 1.0.109 to 1.0.114
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.109 to 1.0.114.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.109...v1.0.114 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-03-02 12:41:30 +00:00
dependabot[bot]
d3fade85a7
build: Bump clap from 4.4.7 to 4.5.1
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.4.7 to 4.5.1.
- [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.4.7...clap_complete-v4.5.1 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-03-01 07:25:13 +00:00
Rob Bradford
adb318f4cd
misc: Remove redundant "use" imports
...
With the nightly toolchain (2024-02-18) cargo check will flag up
redundant imports either because they are pulled in by the prelude on
earlier match.
Remove those redundant imports.
Signed-off-by: Rob Bradford <rbradford@rivosinc.com >
2024-02-19 17:54:30 +00:00
dependabot[bot]
5b0de115f0
build: Bump serde from 1.0.193 to 1.0.196
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.193 to 1.0.196.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.193...v1.0.196 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-02-09 23:45:54 +00:00
Rob Bradford
8899ebd63c
performance-metrics: Allow dead_code for embedded error
...
The embedded error in the enum will be read on debug output of the
error.
Fixes beta clippy issue:
warning: field `0` is never read
--> performance-metrics/src/performance_tests.rs:25:11
|
25 | Infra(InfraError),
| ----- ^^^^^^^^^^
| |
| field in this variant
|
= note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
|
25 | Infra(()),
| ~~
Signed-off-by: Rob Bradford <rbradford@rivosinc.com >
2024-02-07 09:25:40 +00:00
dependabot[bot]
8f90fba250
build: Bump serde from 1.0.168 to 1.0.193
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.168 to 1.0.193.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.168...v1.0.193 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-25 11:09:33 +00:00
dependabot[bot]
d11480197e
build: Bump serde_json from 1.0.107 to 1.0.109
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.107 to 1.0.109.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.107...v1.0.109 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2024-01-02 08:58:51 +00:00
dependabot[bot]
48fc91467b
build: Bump thiserror from 1.0.40 to 1.0.52
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.40 to 1.0.52.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.40...1.0.52 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-12-30 10:28:17 +00:00
dependabot[bot]
815c7f45c4
build: Bump clap from 4.3.11 to 4.4.7
...
Bumps [clap](https://github.com/clap-rs/clap ) from 4.3.11 to 4.4.7.
- [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.3.11...v4.4.7 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-11-08 17:01:37 -08:00
Ravi kumar Veeramally
ce902c19ec
performance-metrics: switch to clap
...
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com >
2023-10-20 11:44:28 -07:00
Wei Liu
7bc3452139
main: switch command parsing to use clap
...
Partially revert 111225a2a5
and add the new dbus and pvpanic arguments.
As we are switching back to clap observe the following changes.
A few examples:
1. `-v -v -v` needs to be written as`-vvv`
2. `--disk D1 --disk D2` and others need to be written as `--disk D1 D2`.
3. `--option value` needs to be written as `--option=value.`
Change integration tests to adapt to the breaking changes.
Signed-off-by: Wei Liu <liuwe@microsoft.com >
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@intel.com >
2023-10-20 11:44:28 -07:00
dependabot[bot]
885412a99e
build: Bump serde_json from 1.0.96 to 1.0.107
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.96 to 1.0.107.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.96...v1.0.107 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-09-19 00:45:18 +00:00
dependabot[bot]
f45bbbfcac
build: Bump serde from 1.0.164 to 1.0.168
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.164 to 1.0.168.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.164...v1.0.168 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-08-25 09:53:12 +00:00
dependabot[bot]
fec39ccf51
build: Bump serde from 1.0.163 to 1.0.164
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.163 to 1.0.164.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.163...v1.0.164 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-28 00:44:59 +00:00
dependabot[bot]
9014a5e59c
build: Bump serde from 1.0.156 to 1.0.163
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.156 to 1.0.163.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.156...v1.0.163 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-06-02 00:38:59 +00:00
dependabot[bot]
681a30bd15
build: Bump thiserror from 1.0.39 to 1.0.40
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.39 to 1.0.40.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.39...1.0.40 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-05-24 00:39:08 +00:00
dependabot[bot]
b7338c96eb
build: Bump serde from 1.0.152 to 1.0.156
...
Bumps [serde](https://github.com/serde-rs/serde ) from 1.0.152 to 1.0.156.
- [Release notes](https://github.com/serde-rs/serde/releases )
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.152...v1.0.156 )
---
updated-dependencies:
- dependency-name: serde
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-05-18 13:54:52 +01:00
dependabot[bot]
97012c511d
build: Bump serde_json from 1.0.95 to 1.0.96
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.95 to 1.0.96.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.95...v1.0.96 )
---
updated-dependencies:
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-04-25 08:45:18 +00:00
Omer Faruk Bayram
59012ccc6e
build: rename BUILT_VERSION to BUILD_VERSION
...
Signed-off-by: Omer Faruk Bayram <omer.faruk@sartura.hr >
2023-04-14 12:13:46 -07:00
dependabot[bot]
948573db0d
build: Bump dirs from 4.0.0 to 5.0.0
...
Bumps [dirs](https://github.com/soc/dirs-rs ) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/soc/dirs-rs/releases )
- [Commits](https://github.com/soc/dirs-rs/commits )
---
updated-dependencies:
- dependency-name: dirs
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-04-13 00:37:35 +00:00