gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/test/README.md (about) 1 # Tests 2 3 The tests defined under this path are verifying functionality beyond what unit 4 tests can cover, e.g. integration and end to end tests. Due to their nature, 5 they may need extra setup in the test machine and extra configuration to run. 6 7 - **syscalls**: system call tests use a local runner, and do not require 8 additional configuration in the machine. 9 - **integration:** defines integration tests that uses `docker run` to test 10 functionality. 11 - **image:** basic end to end test for popular images. These require the same 12 setup as integration tests. 13 - **root:** tests that require to be run as root. These require the same setup 14 as integration tests. 15 - **util:** utilities library to support the tests. 16 17 For the above noted cases, the relevant runtime must be installed via `runsc 18 install` before running. Just note that they require specific configuration to 19 work. This is handled automatically by the test scripts in the `scripts` 20 directory and they can be used to run tests locally on your machine. They are 21 also used to run these tests in `kokoro`. 22 23 **Example:** 24 25 To run image and integration tests, run: 26 27 `make docker-tests` 28 29 To run root tests, run: 30 31 `make sudo TARGETS=test/root:root_test` 32 33 There are a few other interesting variations for image and integration tests: 34 35 * overlay: sets writable overlay inside the sentry 36 * hostnet: configures host network pass-thru, instead of netstack 37 * kvm: runsc the test using the KVM platform, instead of systrap 38 39 The test will build runsc, configure it with your local docker, restart 40 `dockerd`, and run tests. The location for runsc logs is printed to the output.