Commit graph

7 commits

Author SHA1 Message Date
Dennis Kempin
3b3545b2c3 Upgrade ci containers to bullseye and clean up
We no longer need to build dependencies from source and provide them
via pkg-config, this simplifies much of our builder container setup.

As debian bullseye got promoted to stable, we can now also simplify
further by just using bullseye stable instead of mixing stable and
testing packages.

BUG=b:181359683
TEST=./test_all

Change-Id: I2ce61992d5cfe6eb5dc3f0ec61920dcc5455ca40
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3141772
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-09-15 17:06:46 +00:00
Dennis Kempin
75eef5f065 Docker: Do not curl | bash
Instead, download the rustup-init binary directly and verify it's sha
before executing.
Also update debian image used in the bundled VM. The previous image
file was no longer available.

TEST=Rebuilt docker images
BUG=b:192355221

Change-Id: I8a2d8091b9cecdf40ecbdd4bb6cef7ca161421d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3011343
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-07-07 23:55:27 +00:00
Dennis Kempin
3f63661afc Run integration_tests by calling crosvm binary
Instead of instanciating crosvm directly, we can start the binary as
a sub-process.
This includes parsing of crosvm options in the tests, and makes the
test cases closer to real-world usage.

To make make this possible, we need to make sure that the crosvm binary
is uploaded to the VM before running the test, which is done by the
sync_so script, which is baked into the builder container.
We prevent future container re-builds for just maintaining the script,
I have removed them from the container, and call the scripts from the
local source directly.

The test runner is also updated to ensure all package binaries are
built (currently only tests are built).

BUG=b:182841358
TEST=./test_all passes

Change-Id: I7dfd21abcb2b90fe125eb43f85572fbf645b888a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2744280
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2021-03-19 20:35:53 +00:00
Dennis Kempin
3682372764 ci: Upgrade test-vm to debian bullseye
This change updates the test VM to debian bullseye, primarily to enable
io_uring features that are not available in the 4.16 kernel shipping
with debian buster.

We are not updating the builder containers to bullseye, as newer
versions of qemu fail to start on kokoro. See b/181359683

Since it was needed for debugging this CL, it includes a feature to
debug kokoro builders via SSH. It can be enabled by setting
DEBUG_SSH_KEY from the fusion2 UI.

BUG=b:178228512
TEST=./test_all passes

Change-Id: I22f1678577183a0aace80245a87c31907221cc09
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2721062
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-03-10 03:37:00 +00:00
Daniel Verkamp
0a91c96437 arch: rewrite FDT writer in native rust
This removes some unsafe code, improving the interface so that it cannot
be misused (e.g. previously, different Vec<u8> instances could be passed
to fdt functions that did not validate the contents).

The new implementation also adds some extra error checking to catch
invalid string values in all API entry points that accept strings, as
well as out-of-order node nesting that would result in DTB data that did
not conform to the spec.

BUG=b:175729255
TEST=cargo test -p arch
TEST=Boot Crostini on kevin (arm)
TEST=diff old and new dts from `dtc -I fs -O dts /proc/device-tree`

Change-Id: I567d562ed1b447aa0d282b68c71758edea13ffc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2713569
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2021-03-03 01:29:15 +00:00
Dennis Kempin
4d2253b529 Kokoro: Extensive polishing and bugfixing
This CL fixes some of the issues that prevented the
test system from running on other workstations.

- Builders run by Kokoro will not use a scratch mount.
  It's not needed, and will cause issues if stored on
  /tmp with noexec set.
- Running podman with label=disable to prevent selinux
  issues.

The run_tests implementation has been moved to a separate
file and updated with parsing of cargo test output. This
allows simpler test output and integration with the
test results UI in sponge.

The sponge test UI can make it much easier to see which
tests failed, and to find the log of that test case.

This CL also includes an ./ci/kokoro/uprev script to
uprev the manifest versions. And runs the uprev.

BUG=b:174861002
TEST=Tested by forcing a kokoro build with this CL

Change-Id: I0cba9bb68915e2558a4ea6061dd9ba0a7050421b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2669712
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-02-10 22:04:43 +00:00
Dennis Kempin
aa0717443e Add VM to builders
The VM allows both the x86 and aarch64 builders to run tests which
require access to kernel devices that docker would prevent us
from accessing.
The VM is automatically started in the endpoint script, and the
environment is set up to execute `cargo test` binaries inside the VM.

This allows for convenient interactive usage.
The VM is also integrated into the run_tests scripts, executing tests
that do not require special privileges first, while the VM is still
booting up, then execuing the remaining tests in the VM.

BUG=b:177228167,b:177951276
TEST=These test calls pass:
./ci/builder --vm ./run_tests
./ci/aarch64_builder --vm ./run_tests
./run_tests

Change-Id: I20bf2cd848e944d411b97f1f8356279e312d8583
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2642766
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2021-02-05 03:01:53 +00:00