Commit Graph

14 Commits

Author SHA1 Message Date
Rob Bradford
d6895188b1 build: Use consistent version of dirs crate
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2022-03-03 16:59:58 +00:00
Bo Chen
c9c031a425 test_infra: Fix clippy issue on aarch64
error: unused variable: `fw_path`
   --> test_infra/src/lib.rs:837:9
    |
837 |         fw_path: &str,
    |         ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_fw_path`
    |
    = note: `-D unused-variables` implied by `-D warnings`

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-02-17 14:14:38 +00:00
Bo Chen
0ab4097606 test_infra: Enable cross-build for "musl" and "aarch64" targets
With enabling the `vendered-openssl` feature, we can now cross-build the
`test_infra` crate for  "musl" and "aarch64" targets. In this way, we
can remove the `test_infra` crate from the "exclude" list, so that this
crate can be checked and processed by "cargo clippy" and "cargo fmt".

More details can be found: https://docs.rs/openssl/latest/openssl/#vendored

As 'musl-gcc' is required, this commit also installs the `musl-tools`
package for our "build" github action on the musl target [1].

[1] https://github.com/actions-rs/toolchain/issues/102

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-02-17 14:14:38 +00:00
Bo Chen
f1151cb55e test_infra: Allow to not print commandline when spawning guest
keep it as default to print out commandline when spawning guest in favor
of integration tests for debugging purpose, while allowing to disable
it when needed (e.g. for performance tests).

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-02-17 14:14:38 +00:00
Bo Chen
9b0bd71154 test_infra: Add helper function for performing scp
Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-02-17 14:14:38 +00:00
Bo Chen
7f987552ef test_infra: Move struct Guest and struct GuestCommand from tests
In this way, these structs can be reused for performance tests.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2022-02-07 10:34:00 +01:00
Sebastien Boeuf
cab0b3446f tests: Test OVMF with Linux guest
Extending the test_simple_launch() integration test to validate Cloud
Hypervisor boots correctly with both rust-hypervisor-fw and OVMF on
x86_64 platforms.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-12-04 23:04:32 +01:00
dependabot[bot]
f67b3f79ea build: bump vmm-sys-util from 0.8.0 to 0.9.0
Bumps [vmm-sys-util](https://github.com/rust-vmm/vmm-sys-util) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/rust-vmm/vmm-sys-util/releases)
- [Changelog](https://github.com/rust-vmm/vmm-sys-util/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-vmm/vmm-sys-util/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: vmm-sys-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

This needed a bunch of manual updates as well, including vfio-ioctls and
vhost crates. The vhost crate is being patched with the latest version
from rust-vmm because the version 0.1.0 on crates.io doesn't include the
patches we need yet.

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-09-16 14:01:19 +01:00
Rob Bradford
3dff598fa2 test_infra: Fix needless borrow warnings
These are are already references so there is no need to take another
reference.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-08-04 16:19:14 +02:00
Rob Bradford
d494d6b837 test_infra: Fix clippy warning (expect_fun_call)
warning: use of `expect` followed by a function call
   --> test_infra/src/lib.rs:598:10
    |
598 |         .expect(&format!("Expected '{}' to run", command))
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("Expected '{}' to run", command))`
    |
    = note: `#[warn(clippy::expect_fun_call)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call

warning: use of `expect` followed by a function call
   --> test_infra/src/lib.rs:605:10
    |
605 |         .expect(&format!("Expected '{}' to run", command))
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("Expected '{}' to run", command))`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-06-25 08:54:17 -07:00
Sebastien Boeuf
1e2aa769e5 test_infra, tests: Introduce exec_host_command_output() function
This new function allows for better readability of the code by
factorizing a few of lines of code into a single one.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-06-04 16:25:41 +02:00
Sebastien Boeuf
eca1df4e2d test_infra, tests: Introduce exec_host_command_status() function
This new function allows for better readability of the code by
factorizing a bunch of lines of code into a single one.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2021-06-04 16:25:41 +02:00
Rob Bradford
e7cf513064 test_infra: Return an error if SSH executed command exits with non-zero
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-06-03 13:28:25 -07:00
Rob Bradford
88c30764e0 tests: Move test_infra from a module to crate
It must be specified as excluded from the workspace as it must not be
built on non-test targets due to issues with the ssh2 dependency and the
musl toolchain.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
2021-03-23 18:04:50 +01:00