There seems to be a bug in dependabot where sometimes it refuses to open
PRs due to hitting the pull request limit despite no PRs being open. The
rust-vmm/kvm repository ran into this. To avoid this in the future, drop
the open-pull-requests-limit key, which fixed the issue for
rust-vmm/kvm. In practice, due to us only having a single submodule and
due to cargo updates being grouped, we can only get at most one PR per
ecosystem at a time anyway.
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
Clean up and standardize our examples by always mounting the crate in
/crate and using --workdir to avoid `cd ..` in the container.
While we're here, let's remove a strange mount of ~/.ssh in the last
example.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
We recently changed the container tags from vNN to gSHA-1, but we didn't
update README.md. Also, we now push `latest`, which is always updated,
so use this tag in the examples and mention to look at CONTAINER_VERSION
in .buildkite/autogenerate_pipeline.py for a specific version.
Reported-by: Hanna Czenczek <hreitz@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Mention that `crate_features` is now optional, and also update a very
outdated reference to `cargo kcov`
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
Currently, if a crate wishes to run the coverage test with some cargo
features enabled, it must explicitly list them out in the
`crate_features` key of the coverage json files.
Change this so that if this key is omitted from the json file, then
test_coverage.py passes `--all-features` to cargo.
No functional change, as currently `crate_features` is a mandatory key,
so to opt-in to this new behavior, crates must remove this key from
their coverage json file(s).
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
We are missing `rsync` for `seccompiler`. And after bumping to
ubuntu:24.04, some dependencies required by `vhost-devices` could be
installed from ubuntu sources, so @stefano-garzarella reworked the
preparation of `vhost-devices` dependencies in
rust-vmm/rust-vmm-container#128.
Update to g82bd1a3 dev image to apply the changes.
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
`libc-bin` is broken in previous images which causes problem in
rust-vmm/vhost-device#820.
We ended up upgrading to ubuntu 24:04 to address this.
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
Rust does optimizations which can cause havoc
in `--release` mode, so add another set of unit tests
with all optimizations enabled.
Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
It seems that the raw output of llvm-cov changed at some point, and we
ended upcomparing functoin coverage instead of line coverage. Fix this
by instead using the new json output, which will hopefully prevent such
goofs in the future.
Fixes#170
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
Before checking out different commits, clean the working directory to
avoid checkout failures to to temporary files created during benchmark
execution (as is done by linux-loader)
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
Version v47 [1] incorporates:
- chore: Move RUST_TOOLCHAIN into build_container.sh
- chore: Refactor dialing to reduce useless hints
- riscv64: Set MIN_CORES to 4
[1] rust-vmm/rust-vmm-container#118
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
After `.platform` mechanism was introduced in #159, it silently filters
out tests with no `platform` specified. Enable them to execute by adding
`platform is not None` predicate preceeds allowlist check.
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This version [1] incorporates:
- Support of running unit-tests of `linux-loader`, `vm-memory` and etc.
by mounting `tmpfs` onto `/tmp`
- Improvement on `sshd` inside QEMU VM connectivity test.
[1] rust-vmm/rust-vmm-container#117
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
It's happening quite often to have CI broken on the main branch
because we only run `black` on merges, to prevent these problems,
let's run `black` or PR as well.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Introduce logic necessary for generating YAML needed by BuildKite, which
are designed to work with image introduced in
rust-vmm/rust-vmm-container#106.
The container version is updated to v44 to enable CI on RISC-V platform.
Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This version includes vhost-device-gpu dependencies
which is required for vhost-device-gpu crate
more info about the crate can be found here:
rust-vmm/vhost-device#668
link to the PR that adds these dependencies
where the tag is generated can be found here:
rust-vmm/rust-vmm-container#110
Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This version includes vhost-device-gpu dependencies
which is required for vhost-device-gpu crate
more info about the crate can be found here:
rust-vmm/vhost-device#668
link to the PR that adds these dependencies
where the tag is generated can be found here:
rust-vmm/rust-vmm-container#107
Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
This version includes libepoxy dependencies
which is required for vhost-device-gpu crate
more info about the crate can be found here:
rust-vmm/vhost-device#668
link to the container PR that adds libepoxy
where the tag is generated can be found here:
rust-vmm/rust-vmm-container#103
Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
The intention with these is that crates including rust-vmm-ci as a
submodule will be able to copy either the monthly or weekly schedule to
their repository's .github/dependabot.yml. Sadly, it is not possible to
automatically keep these in-sync with upstream, as dependabot does not
support symlinking the dependabot.yml file into a submodule. However, we
expect updates to be rare enough for this to not be a practical problem.
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
This version adds musl-tools package
which is required for rust-vmm/vhost#218
to compile userfaultfd crate for musl target.
Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
The new version reduces the size of the container by removing
unneeded pipewire dependencies and adds dbus.
This is needed to test vhost-device-sound.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
For convenience, since the two are related directly.
Also fix a small typo while at it.
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
If we increase the coverage the message prints a negative value
as the difference from the previous value. This can be confusing
as it looks like the coverage has decreased.
For example if the value in coverage_config_x86_64.json is 73.42,
and the new coverage is 73.96 (increased), we have the following
error:
ValueError: Current code coverage (73.96%) deviates by -0.54%
from the previous code co...
Let's calculate the difference in reverse so that we have a
negative value if it decreases and positive otherwise.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
`black` suggests putting the string between single quotes so
there is no need to escape double quotes.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
This new version contains alsa and pipewire libraries to build
vhost-device-sound audio backends.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Now that we use cargo-llvm-cov, `exclude_path` should be a regular
expression, since we are using `--ignore-filename-regex` option:
--ignore-filename-regex <PATTERN>
Skip source code files with file paths that match the given
regular expression
To prevent users from separating multiple files with commas,
let's update the `exclude_path` description in the README and in
the examples.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
We don't want the shell to interpret the contents of exclude_path,
but we want it all used as a single string for `--ignore-filename-regex`,
so let's put it between double quotes.
An example of failure is when we have | , as in this case:
$ CARGO_TARGET_DIR=./cov_build cargo llvm-cov test --summary-only \
--ignore-filename-regex crates/virtio-bindings|crates/virtio-queue/src/mock.rs \
--workspace --features=virtio-blk/backend-stdio
bash: crates/virtio-queue/src/mock.rs: Permission denied
...
error: failed to generate report: process didn't exit successfully: ...
(exit status: 74)
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Starting from v0.18.0, cargo-audit hangs indefinitely if Cargo.lock
does not exist. We discovered this while upgrading the container
from v26 to v28 [1], which among other things updated cargo-audit.
For the binary crates this should not be a problem, since they have
Cargo.lock committed, but for many libraries this may not be true.
If Cargo.lock is not there, we are generating one with the latest
available versions, which may not be very significant. For this and
other reasons it's now suggested that libraries also have a
Cargo.lock [2] committed (thanks Manos for pointing this out).
Note: `cargo generate-lockfile` updates Cargo.lock if it's already
there, but we don't want it, that's why we have the guard.
[1] https://github.com/rust-vmm/rust-vmm-ci/pull/138
[2] https://doc.rust-lang.org/nightly/cargo/faq.html#why-have-cargolock-in-version-control
Suggested-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Suggested-by: Patrick Roy <roypat@amazon.co.uk>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Using kcov, a coverage of 33.3% was reported, even though that are no
rust-test code in the dummy crate that is included in this repository.
This commit adds an actual unit test, so that the test_coverage test
actually properly self-tests here.
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
cargo-kcov is broken on rust versions >=1.71.0. This is currently
blocking us from upgrading to the new toolchain version (1.72.0), which
is required to compile linux-loader (due to one dependency having a MSRV
policy of "N-2", meaning our current toolchain is no longer supported).
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>