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>
There are quite a few, genuine useful cases where one wants to overflow
the recommended 75 (some use 72) character rule.
Breaking long lines or manually breaking long compiler or other
tool-generated outputs is just confusing and error-prone.
This does not mean that we should stop wrapping manually written text
at a sane length, but enforcing the rule with a script seems to yield
questionable results while creating quite a bit of friction.
Signed-off-by: Erik Schilling <erik.schilling@linaro.org>
When the coverage changes, we raise exceptions with simple strings,
this causes the following error:
TypeError: exceptions must derive from BaseException
Let's use derivatives of BaseException to fix this issue.
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
This version contains an updated rust toolchain (1.68.2 -> 1.69.0), as
well as the miri component for the nightly toolchain.
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
This revision contains critcmp and cargo-audit on ARM again, after the
previous revision was lacking them due to an OOM at container build
time.
Closes#123
Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
That updates to a newer version of Rust, 1.68.2, and adds back
libclang-dev package which is required by vhost-device/gpio crates.
An earlier version, v20, is skipped here as we missed updating
rust-vmm-ci along with it. v20 updated documentation and triggered
builds for changes in build_container.sh.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
There should be no changes required in the crates. The only
difference is in the libgpio library, as we're using a release
and not a certain commit on the main branch.
This is the first container built with the automation, and in
the process we had to do some significant cleanup to remove
things that were not needed. Hopefully this will not trigger
any errors in the CIs.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
This container version updates the Rust version to 1.67.1, the base
Ubuntu image to 22.04 (which is the newest that still works with
kcov), and adds the gpio library needed by the vhost-device tests.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
By default we are now using the kvm hypervisor in tests.
This can be overritten for the entire pipeline at the pipeline
level by using the environment variable `AGENT_TAG_HYPERVISOR`.
Fixes: https://github.com/rust-vmm/rust-vmm-ci/issues/115
Signed-off-by: Andreea Florescu <fandree@amazon.com>
Without this fix, yml is generated wrongly like below:
steps:
- label: coverage-x86_64
command: pytest $(find . -type f -name "test_coverage.py")
retry:
automatic: false
agents:
os: linux
platform: x86_64.metal
hypervisor: mshv
plugins:
- docker#v3.8.0:
image: rustvmm/dev:v16
always-pull: true
privileged: true
timeout_in_minutes: 5
hypervisor: mshv // This is now right
Signed-off-by: Muminul Islam <muislam@microsoft.com>
In order to support Microsoft Hypervisor, this tag is used
to identify agents that has MSHV support
Signed-off-by: Muminul Islam <muislam@microsoft.com>
This is needed so we can have separate queues for tests that require
special instances. For example, running performance tests require
nothing else to run at the same time.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
Any keys in the input JSON that we do not recognize we are adding
as they are to the output pipeline. This is needed so that we don't
have to always update the autogeneration script for each new Buildkite
configuration that we want to support.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
In the script for autogenerating the rust-vmm-ci tests, we were using
self directly for setting the configuration of the tests, and then
we were returning vars(self). This was a pretty obfuscated way of
returning a JSON, so instead we're now just explicitly declaring
a dictionary as part of self, and returning that instead. This
is needed for future extensions as well as we want to be able to
extend the tool such that it supports any keys from the input
to be passed as they are so that we don't need to keep changing it
whenever we need to add support for another Buildkite configuration
parameter.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
We already have this as a requirement for merging PRs as part of the
PR checklist template, but it's better to enforce it. This comes with
the disadvantage that we will need to update all comments and add the
prefix "SAFETY: " as required by the clippy check.
Signed-off-by: Andreea Florescu <fandree@amazon.com>
Before this patch the timeout could only be overwritten in the
TIMEOUT environment variable. While that approach works and it
is still needed so we can set a different timeout depending
on the repository on which we run the pipeline, we also need a
way to easily set a different timeout in custom tests. This
comes handy when we have custom pipeline for certain crates
and we want to be able to easily specify a timeout in a
more human readable way.
Signed-off-by: Andreea Florescu <fandree@amazon.com>