Name Date Size #Lines LOC

..--

benches/H25-Apr-2025-8662

fixture/H25-Apr-2025-1,8831,481

guest_under_test/H25-Apr-2025-1,5271,248

tests/H25-Apr-2025-2,8732,210

Cargo.tomlH A D25-Apr-2025603 2420

README.mdH A D25-Apr-20251.8 KiB5940

README.md

1# Crosvm End to End Tests
2
3These tests run a crosvm VM on the host to verify end to end behavior. They use a prebuilt guest
4kernel and rootfs, which is downloaded from google cloud storage.
5
6The e2e_tests can be executed by:
7
8```sh
9$ ./tools/run_tests --dut=vm -E 'rdeps(e2e_tests)'
10```
11
12## Running with locally built kernel/rootfs
13
14If you want to make changes to the kernel or rootfs, you have to specify the environment variables
15`CROSVM_CARGO_TEST_KERNEL_IMAGE` and `CROSVM_CARGO_TEST_ROOTFS_IMAGE` to point to the right files
16and then run `cargo test`.
17
18With use_local_build.sh script, e2e_tests can be executed with custom kernel/rootfs as follows:
19
20```sh
21$ cd /path/to/crosvm
22$ cd e2e_tests
23$ source guest_under_test/use_local_build.sh
24$ cargo test
25```
26
27Unsetting the variables will bring back you to the original behavior.
28
29```sh
30unset CROSVM_CARGO_TEST_KERNEL_IMAGE
31unset CROSVM_CARGO_TEST_ROOTFS_IMAGE
32```
33
34Note: The custom images cannot be used with `tools/run_tests`.
35
36## Uploading prebuilts
37
38Note: Only Googlers with access to the crosvm-testing cloud storage bin can upload prebuilts.
39
40To upload the modified rootfs, you will have to uprev the `PREBUILT_VERSION` variable in:
41
42- `./guest_under_test/PREBUILT_VERSION`
43
44and [request a permission](http://go/crosvm/infra.md?cl=head#access-on-demand-to-upload-artifacts)
45to become a member of the `crosvm-policy-uploader` group.
46
47Then run the upload script to build and upload the new prebuilts.
48
49```sh
50# Install QEMU-user-static to build aarch64 images
51$ sudo apt install binfmt-support qemu-user-static
52# Register binfmt_misc entries
53$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
54# Build and upload the new artifacts
55$ ./guest_under_test/upload_prebuilts.sh
56```
57
58**Never** try to modify an existing prebuilt as the new images may break tests in older versions.
59