c3a170e926
Add snapshot/restore tests for the VM. This test currently suspends the VM, then sends a command to it. This command is stored in the buffer of the serial device. A snapshot is taken with the command stored. The device is resumed, which then runs the command. A restore is triggered using the image taken earlier, which then runs the image again. This test will be developed to include more VM changes as more devices get snapshot. Bug=b:232437513 Test=./tools/dev_container e2e_tests/run Change-Id: If6b39bd9b0f1d2962748cf089959f57f65407ced Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3949685 Reviewed-by: Dennis Kempin <denniskempin@google.com> Commit-Queue: Elie Kheirallah <khei@google.com> Reviewed-by: Frederick Mayle <fmayle@google.com> |
||
---|---|---|
.. | ||
guest_under_test | ||
tests | ||
Cargo.toml | ||
README.md | ||
run |
Crosvm End to End Tests
These tests run a crosvm VM on the host to verify end to end behavior. They use a prebuilt guest kernel and rootfs, which is downloaded from google cloud storage.
Running with locally built kernel/rootfs
If the test needs to run offline, or you want to make changes to the kernel or rootfs, you have to
specify the environment variables CROSVM_CARGO_TEST_KERNEL_BINARY
and
CROSVM_CARGO_TEST_ROOTFS_IMAGE
to point to the right files.
The use_local_build.sh script does this for you:
$ source guest_under_test/use_local_build.sh
Uploading prebuilts
Note: Only Googlers with access to the crosvm-testing cloud storage bin can upload prebuilts.
To upload the modified rootfs, you will have to uprev the PREBUILT_VERSION
variable in:
./guest_under_test/PREBUILT_VERSION
and request a permission
to become a member of the crosvm-policy-uploader
group. Then run the upload script to build and
upload the new prebuilts. Never try to modify an existing prebuilt as the new images may break
tests in older versions.