These libraries are needed to build the upcoming vaapi backend. Also
update the container so they are included.
BUG=b:214478588
TEST=./tools/dev_container ./tools/presubmit --all
Change-Id: Id30c38557d56b4c94ca5f2419c73b34520916ed0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3715087
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
rwroot automatically adds root=/dev/vd[a-z], but the example image
actually uses /dev/vda5. This leads to confusion when two root= kernel
command line arguments are passed in and only one of them works.
Therefore we use rwdisk instead which doesn't add the kernel argument.
BUG=b:236198584
TEST=mdbook builds, examples build and run
Change-Id: I9bfc05445b1e2aef197a43ee647d7c784d50dad7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3708365
Commit-Queue: Yuanchu Xie <yuanchu@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
To enable the merge bot on luci we had to solve a couple of problems:
- We cannot use http cookies for auth, so added gcloud auth into
merge_bot.
- Switch back to original HEAD after running merge bot. Otherwise
the version of the merge_bot script can change between invocations.
- Do not soft reset when checking out crosvm source.
- For less invasive testing, also added a few more exceptions when
using MERGE_BOT_TEST so it won't email, etc.
- Rename to update_chromeos_merges, as it is more fitting to what
the bot is doing
BUG=b:233913643
TEST=https://ci.chromium.org/swarming/task/5b58ed4497fda510
Change-Id: Iaa9b4821b70a1e90d19637d01856196bd7852ed5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3692686
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
The virtio video decoder device is currently only available under very
drastic conditions: a build linked against libvda (a ChromeOS-only
library that needs the cros chroot to be built and linked against), and
a ChromeOS-flavored Chrome instance running alongside crosvm, so the
browser can provide the video decoding service through Mojo.
This makes the decoder device very difficult to develop on for
non-Chromies, and also for Chromies actually since they will always need
a DUT to test it on.
This patch introduces an alternative decoder backend based on
ffmpeg's libraries that performs decoding on the host's CPU. It supports both
guest pages and virtio objects as target, and can be considered a
reliable and predictable way to test the decoder in any environment.
We introduce our own ffmpeg bindings after a quick state of the art
revealed that the existing ones were all unsuitable, either for
technical or licensing reasons. Doing so is also not a big effort and
does not add any new external crate dependency to crosvm.
BUG=b:169295147
TEST=cargo test --features "video-decoder,ffmpeg" -p devices ffmpeg
TEST=v4l2r's simple_decoder example decodes test-25fps.h264 properly with the
following command:
./simple_decoder test-25fps.h264 /dev/video0 --input_format h264 --save test-25fps.nv12
TEST=ARCVM Android youtube plays videos correctly when the ffmpeg
backend is used.
Change-Id: Ic9c586193f7939f2a3fe59d009c3666585a8bbc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3026355
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Add the ffmpeg libraries needed by the ffmpeg decoder device backend and
bump the dev_container and testvm to include them.
BUG=b:169295147
TEST=./tools/install-deps
TEST=./tools/dev_container
Change-Id: Ifc07b9599403aa1ed18a96067ada1fa2efa6e13c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3685682
Reviewed-by: Junichi Uekawa <uekawa@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
See USAGE for documentation.
This tool will be needed to upload to the upstream repository, as
we will no longer be able to use repo.
Currently, for testing it still points to the chromiumos repository.
BUG=b:221088786
TEST=Follow USAGE
Change-Id: I4a8d88a8354942f0ddfb7f9420ef1cf7f5885867
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3687419
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
The bot cannot resolve those automatically. To ease the process, we
will upload the merge anyway, so the oncall can download and resolve
the conflict.
Dry runs are not created when there are conflicts, they are bound
to fail and there is nothing the oncall can do about conflicts
until the actual merge is generated.
BUG=b:234847583
TEST=MERGE_BOT_TEST=1 ./tools/chromeos/merge_bot update-merges / update-dry-runs
Change-Id: I409e6b99284ff8a98b504b390c35329875d6a8b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3689544
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
We will be merging from the upstream repo into the cros repo. The
script can be run from both an upstream and a cros checkout, it
will setup the required remotes.
The CLI changes a little. We now require a revision to merge from
needs to be specified, since the script is not setting up the
upstream remote.
CI jobs will simply use HEAD, as the version to merge is already
checked out by the CI system.
BUG=b:233913643
TEST=
./merge_bot update-merges HEAD
./merge_bot update-merges origin/main
./merge_bot update-dry-runs HEAD
Change-Id: I247e1edc3ad951becf5d59b63efd74914bb2205f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3687222
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Pull the declaration of the `EventToken` enum up to the top level of the
base crate, replacing the identical implementations inside sys/windows
and sys/unix.
Use the `EventToken` name consistently throughout the tree to remove the
unix-flavored "poll" nomenclature.
BUG=b:213153157
TEST=tools/dev_container tools/presubmit --all
Change-Id: I0ba42037b533b796797a7a3f6d8d7e71a5592aba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3642673
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
Some recent changes introduced a bug that breaks reusage of
containers. Instead of trying to restart a stopped container,
we delete it instead and start a fresh one.
The code was refactored to allow for testing. The tests run
against the real docker service and are run as part of the health
checks in kokoro / luci.
This CL also gets rid of the custon command line parsing since
luci can now run it with argh available.
BUG=b:234402839
TEST=./tools/dev_containes --self-test [--podman]
Change-Id: Id5eaf0ea83ff07433f8f57cb652b5c393dcb9da3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3681399
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
chromeos branch is a stable base to work on, but patches need to land on
the main branch. For uploading to that directory, it's always necessary
to rebase onto that branch.
BUG=b:227535695
TEST=rebase_for_review && repo upload --cbr .
Change-Id: I5f41e52f91adf15ade84ae09f6b34dcdbe733d23
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3565627
Commit-Queue: Junichi Uekawa <uekawa@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Another script that needs to run on python 3.8. I filed b/234173142 to
make this consistent across all scripts and environments.
BUG=b:233913643
TEST=vpython3 tools/chromeos/merge_bot
Change-Id: Ic42423040feaaa5741a123972978af364886dc9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3674220
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
- Use vpython to call crovm tooling (This provides a predictable python
environment and allow us to use argh).
- Add build_context() to provide a simple API that readies source and
container.
- Nest preparation steps to reduce noise on builder page.
BUG=b:233913643
TEST=recipes.py test run
Change-Id: I6800e55f7311b32c6ef61918d13795af1fb3b588
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3674217
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anton Romanov <romanton@google.com>
This just creates unnecessary noise. Just create a single dry run
merge commit each time.
BUG=b:227224259
TEST=None
Change-Id: I54385fd80f01771bb83e02f2b48e604ad2d68d1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3673021
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Otherwise we may exit thinking we are trying to run an interactive
command in a non-interactive terminal.
BUG=None
TEST=./tools/dev_container --stop </dev/null
Change-Id: Ie34cf662b82090b100533306572552c5a550211e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3671132
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
The default is still to run all of them, but this will allow us to run
checks in separate luci steps to provide an easier to read result.
BUG=b:233913455
TEST=./tools/health-check python fmt
Change-Id: Iddc803f8f423db36ece53a13acfe564560b789a6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3668812
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
We run a neverending command in the container to keep it alive in the
background.
By default, this would be bash, which does the job when --tty is
specified. But we no longer do that all the time.
Instead we can use sleep, which does not rely on such tricks.
BUG=b:233913455
TEST=./tools/dev_container true
Change-Id: I2d04aabbef6b670daf6b94fdc2c65c7bd759c61b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3669682
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
They have been dropped with the recent refactoring to not use argh.
BUG=None
TEST=./tools/dev_container -v
Change-Id: Ifa65b14d316e27dbb5cef9714fbd3adf110b79e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3664051
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
This fixes little annoyances where fmt or other tools would try to run
on files not part of version control (e.g. local editor configs).
BUG=b:227224259
TEST=./tools/fmt -v
Change-Id: Iddff90ec95a9e28cd80ac3aece26202e8a42e9d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3662022
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
By passing main(..., podman=args.podman), we mask the function's default
value for that parameter which is False when --podman isn't passed. This
doesn't match what 34811a88ee ("dev_container: Add --podman command
line parameter") says about the flag:
The parameter [--podman] defaults to true if docker is not installed
Instead, use the computed default for the argument itself.
BUG=b:233346153
TEST=tools/dev_container bash -c 'echo Hello'
Change-Id: I2e5f9855853279a8ceeb9347931d59fd334f0004
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3655968
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Pierre-Clément Tosi <ptosi@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
This script is naturally used outside of the container and we
want to avoid having to install dependencies or special python
versions to run it.
This CL reduces the python requirement from 3.9 to 3.8 and
allows the script to run without any dependencies.
BUG=b:233230344
TEST=pyenv global 3.8.15
./tools/dev_container
Change-Id: Ieeb868f7fb275a8e6e39e577b5e984895307765e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3657816
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anton Romanov <romanton@google.com>
Sometimes we are left with an existing container that has been stopped.
Usually happens after reboots.
Make sure we start the container again before trying to execute.
BUG=None
TEST=docker stop $USER_dev_container
./tools/dev_container
Change-Id: Ib68091a09546cfefa452ddb8e6f268e495f2167c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3657815
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Anton Romanov <romanton@google.com>
The parameter defaults to true if docker is not installed. This also
resolves previous issues with resolving which docker command to use.
A warning is added when executing dev_container with podman.
BUG=b:233346153
TEST=./tools/dev_container --podman
Change-Id: I1d3dad6a657c0273c82634e409a0991245f56f4d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3657814
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This fixes problems with freezing when running luci recipes locally.
An interactive process can still be forced by flag -i or --interactive.
BUG=b:233230344
TEST=cd infra && ./recipes.py run build_linux
Change-Id: I261f0ffddcc3795e17bcbe023fa920f48769fdb4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3657813
Reviewed-by: Anton Romanov <romanton@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This will be run when using repo upload from a chromiumos checkout
and reminds developers that Cq-Depend cannot be used with crosvm.
BUG=b:226975263
TEST=./tools/chromeos/check_cq_depend
Change-Id: Ib9cafaba181cb2103838369123e6c1288e653486
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3651674
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
crosvm-fuzz only contains fuzzer binaries, which don't have any
documentable items and clutter up the list of crates.
BUG=None
TEST=tools/cargo-doc
Change-Id: I0a8a5a61977643920d66a0f2662a1050a66192a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3630425
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
This helps with integration of `tools/clippy` in `rust-analyzer` and
potentially other IDEs which can parse the json output better than the
text output.
TEST=Ran it with `rust-analyzer` in VSCode.
Change-Id: Iceb2748994cbbacf48dc473a9ad06eec567beb0a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3630700
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Vaibhav Nagarnaik <vnagarnaik@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
This reverts commit 15a4ee3200.
Reason for revert: Should pass now
Original change's description:
> Do not run cros_async tests on armhf
>
> The test has been flaking with segfaults occasionally.
>
> BUG=None
> TEST=presubmit
>
> Change-Id: Ifbfee7e7ed5de91b7bdf9b25db7983139951f81f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3606751
> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
> Tested-by: kokoro <noreply+kokoro@google.com>
> Commit-Queue: Dennis Kempin <denniskempin@google.com>
Bug: None
Change-Id: I85d0885ce9f9fa3d46dd86536a5a20a71ffbbabb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3626010
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
The sys_util crate has been merged into base, but a few places still
refer to the old name. Fix or remove them as appropriate.
BUG=b:227226222
TEST=tools/presubmit --all
Change-Id: Icf9b57aff672b7c1afec768c9694e059f0f9a43d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3621205
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Fixes cases when we use target vm:aarch64 but arch armhf and test_runner
picks up tests for aarch64
BUG=none
TEST=run and made sure armhf-disabled tests are not picked up
Change-Id: I4d0734bb6320fc698bf16adc59de5e03b00a4a68
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3617081
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Auto-Submit: Anton Romanov <romanton@google.com>
The test has been flaking with segfaults occasionally.
BUG=None
TEST=presubmit
Change-Id: Ifbfee7e7ed5de91b7bdf9b25db7983139951f81f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3606751
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
And fix a nit in the existing tests to make it pass.
BUG=b:219965702
TEST=presubmit
Change-Id: I65fb98b04d7042755930dd34913f679fa129c88c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3594248
Reviewed-by: Maciek Swiech <drmasquatch@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>