gvisor/test
Arthur Sfez b8689e0586 Simplify TOS and TClass UDP tests
This adds helpers to send both of these control messages via sendmsg,
and most of the initialization is moved into the SetUp body.

The parametrization is now more meaningful. The kDualStack is actually
impactful, which means DifferentTOSAndTClass test has been removed. The
IPv4-mapped IPv6 scenario is now tested in the SetAndReceiveTOSOrTClass.

PiperOrigin-RevId: 426313619
2022-02-03 21:57:29 -08:00
..
benchmarks Hoist Fifo QDisc to NIC layer. 2021-12-13 18:31:19 -08:00
cmd/test_app Rename go files that contain "main" function to main.go. 2021-06-09 17:36:51 -07:00
e2e Implement ioctl(fd, FIONREAD) for host FDs 2021-11-10 17:07:06 -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 Fail tests when container returns non-zero status 2021-04-05 11:39:53 -07:00
iptables Fix typo and bazel output binary path. 2021-11-11 13:12:55 -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 Do not reject TCP SYN w/ ECN flags set. 2022-01-21 09:55:37 -08:00
perf Deflake test/perf:randread_benchmark 2021-08-17 12:58:37 -07:00
root runsc: Fix the data race 2021-12-23 13:03:58 -08:00
runner Support STAGED_BINARIES to run prebuilt binaries with the test pipeline. 2021-11-17 17:49:35 -08:00
runtimes Drop nodejs test that started spontaneously failing. 2021-12-09 11:17:16 -08:00
syscalls Simplify TOS and TClass UDP tests 2022-02-03 21:57:29 -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 Allow SetAttr and Allocate for deleted files 2021-11-02 12:29:06 -07:00
BUILD Standardize on tools directory. 2020-01-27 12:21:00 -08:00
README.md Remove unused scripts. 2020-09-23 17:38:02 -07:00

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.