tree: 4bcb292987891897e592f6acd831201a7b2d89b1 [path history] [tgz]
  1. expects/
  2. gvisor/
  3. meta/
  4. BUILD.gn
  5. LATEST_GIT_COMMIT.txt
  6. LICENSE
  7. METADATA.textproto
  8. OWNERS
  9. README.fuchsia
  10. README.md
  11. TEST_SRC_FILENAMES.txt
  12. TEST_UTILS_FILENAMES.txt
  13. update.sh
third_party/gvisor_syscall_tests/README.md

gVisor Syscall Tests

Overview

The gVisor syscall suite contains a large number of tests that validate POSIX behaviors on loopback sockets. The Netstack team relies heavily on this suite to prevent regressions and iterate on new functionality.

Test suites are available for three versions of the Netstack:

Running the tests

  1. fx set core.qemu-x64 --with //third_party/gvisor_syscall_tests:tests
  2. fx test netstack{3,2-with-fast-udp,2-with-sync-udp}-syscall-tests

Updating the tests

  1. Check the commit history in https://github.com/google/gvisor/tree/master/test/syscalls/linux and insert the names of any newly added test sources into TEST_SRC_FILENAMES.txt.
  2. Run update.sh to vendor the latest version of the gVisor test sources intree.
  3. Add the names of any newly added test sources into the appropriate test target in BUILD.gn.
  4. Build the tests and fix failures:
    • If a test source includes a new util file under gvisor/test/util/, add the new filename to TEST_UTILS_FILENAMES.txt and rerun update.sh.
    • If a test source or util includes a system header that is not available on Fuchsia (e.g. <linux/capability.h>), submit a gVisor change that adds an appropriate ifdef and rerun update.sh.
  5. Run the tests and fix failures:
    • Examine the failure and determine whether it is expected.
    • If the failure is expected, add the appropriate expectation (SkipTest, ExpectFailure, etc).
    • If the failure is not expected, add the appropriate expectation and file a bug.
  6. Upload a CL to Gerrit.