gvisor/test
Fabricio Voznika c6bb9ceb66 Remove VFS2 test dimension
The default is VFS2 enabled, so the tests setting VFS2 are redundant.

Updates #1624

PiperOrigin-RevId: 431827013
2022-03-01 18:59:30 -08:00
..
benchmarks Hoist Fifo QDisc to NIC layer. 2021-12-13 18:31:19 -08:00
cmd/test_app
e2e Remove VFS2 test dimension 2022-03-01 18:59:30 -08:00
fsstress Add fsstress test to goferfs 2021-07-20 22:21:24 -07:00
fuse Merge pull request #7138 from avagin:fuse-test 2022-02-03 16:57:22 -08:00
image
iptables Validate flags during install. 2022-02-11 11:24:01 -08:00
kubernetes Make the webhook deterministic. 2022-01-13 15:20:43 -08:00
packetdrill Clean test tags. 2021-04-20 13:11:25 -07:00
packetimpact Fix the RST response to unacceptable ACK in SYN-RCVD 2022-02-23 00:44:22 -08:00
perf Do not generate native variants for verity benchmarks. 2022-02-25 12:38:30 -08:00
root Automated rollback of changelist 431455723 2022-02-28 12:53:28 -08:00
runner Do not generate native variants for verity benchmarks. 2022-02-25 12:38:30 -08:00
runtimes Drop nodejs test that started spontaneously failing. 2021-12-09 11:17:16 -08:00
syscalls Implement close_range. 2022-02-28 09:37:03 -08:00
uds [op] Replace syscall package usage with golang.org/x/sys/unix in test/. 2021-03-06 09:54:09 -08:00
util cgroupfs: Implement task migration 2022-02-22 12:43:54 -08:00
BUILD Standardize on tools directory. 2020-01-27 12:21:00 -08:00
README.md

README.md

Tests

The tests defined under this path are verifying functionality beyond what unit tests can cover, e.g. integration and end to end tests. Due to their nature, they may need extra setup in the test machine and extra configuration to run.

  • syscalls: system call tests use a local runner, and do not require additional configuration in the machine.
  • integration: defines integration tests that uses docker run to test functionality.
  • image: basic end to end test for popular images. These require the same setup as integration tests.
  • root: tests that require to be run as root. These require the same setup as integration tests.
  • util: utilities library to support the tests.

For the above noted cases, the relevant runtime must be installed via runsc install before running. Just note that they require specific configuration to work. This is handled automatically by the test scripts in the scripts directory and they can be used to run tests locally on your machine. They are also used to run these tests in kokoro.

Example:

To run image and integration tests, run:

make docker-tests

To run root tests, run:

make root-tests

There are a few other interesting variations for image and integration tests:

  • overlay: sets writable overlay inside the sentry
  • hostnet: configures host network pass-thru, instead of netstack
  • kvm: runsc the test using the KVM platform, instead of ptrace

The test will build runsc, configure it with your local docker, restart dockerd, and run tests. The location for runsc logs is printed to the output.