gvisor/test/runtimes
Adin Scannell 6b558bb433 Drop nodejs test that started spontaneously failing.
It is unclear exactly what happened in the DNS response that has caused
this test to start breaking. However, since this is unrelated to any code
change, this can be attributed to a non-hermetic or broken test case.

See master failure:
https://buildkite.com/gvisor/pipeline/builds/10462#ae46ee7c-855c-4efe-8165-f0c694557cf9

This may be related to https://github.com/nodejs/node/issues/28790, where
older versions of node are not parsing this field correctly? However, we
would like to retain other tests from the same older version of node.

For posterity, the current serial field appears as:

; <<>> DiG 9.17.19-1-Debian <<>> nodejs.org -t SOA +multiline
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56131
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;nodejs.org.            IN SOA

;; ANSWER SECTION:
nodejs.org.             3402 IN SOA meera.ns.cloudflare.com. dns.cloudflare.com. (
                                2264470260 ; serial
                                10000      ; refresh (2 hours 46 minutes 40 seconds)
                                2400       ; retry (40 minutes)
                                604800     ; expire (1 week)
                                3600       ; minimum (1 hour)
                                )

;; Query time: 59 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Thu Dec 09 10:35:57 PST 2021
;; MSG SIZE  rcvd: 102

PiperOrigin-RevId: 415308624
2021-12-09 11:17:16 -08:00
..
exclude Drop nodejs test that started spontaneously failing. 2021-12-09 11:17:16 -08:00
proctor
runner Update testDeps definition for https://golang.org/cl/354632 2021-10-18 13:15:59 -07:00
BUILD Support partitions for other tests. 2020-12-03 01:00:21 -08:00
README.md
defs.bzl

README.md

gVisor Runtime Tests

App Engine uses gvisor to sandbox application containers. The runtime tests aim to test runsc compatibility with these standard runtimes. The test itself runs the language-defined tests inside the sandboxed standard runtime container.

Note: Ruby runtime is currently in beta mode and so we do not run tests for it yet.

Testing Locally

To run runtime tests individually from a given runtime, use the following table.

Language Version Download Image Run Test(s)
Go 1.12 make -C images load-runtimes_go1.12 If the test name ends with .go, it is an on-disk test:
docker run --runtime=runsc -it gvisor.dev/images/runtimes/go1.12 ( cd /usr/local/go/test ; go run run.go -v -- <TEST_NAME>... )
Otherwise it is a tool test:
docker run --runtime=runsc -it gvisor.dev/images/runtimes/go1.12 go tool dist test -v -no-rebuild ^TEST1$|^TEST2$...
Java 11 make -C images load-runtimes_java11 docker run --runtime=runsc -it gvisor.dev/images/runtimes/java11 jtreg -agentvm -dir:/root/test/jdk -noreport -timeoutFactor:20 -verbose:summary <TEST_NAME>...
NodeJS 12.4.0 make -C images load-runtimes_nodejs12.4.0 docker run --runtime=runsc -it gvisor.dev/images/runtimes/nodejs12.4.0 python tools/test.py --timeout=180 <TEST_NAME>...
Php 7.3.6 make -C images load-runtimes_php7.3.6 docker run --runtime=runsc -it gvisor.dev/images/runtimes/php7.3.6 make test "TESTS=<TEST_NAME>..."
Python 3.7.3 make -C images load-runtimes_python3.7.3 docker run --runtime=runsc -it gvisor.dev/images/runtimes/python3.7.3 ./python -m test <TEST_NAME>...

To run an entire runtime test locally, use the following table.

Note: java runtime test take 1+ hours with 16 cores.

Language Version Running the test suite
Go 1.12 make go1.12-runtime-tests{_vfs2}
Java 11 make java11-runtime-tests{_vfs2}
NodeJS 12.4.0 make nodejs12.4.0-runtime-tests{_vfs2}
Php 7.3.6 make php7.3.6-runtime-tests{_vfs2}
Python 3.7.3 make python3.7.3-runtime-tests{_vfs2}

Clean Up

Sometimes when runtime tests fail or when the testing container itself crashes unexpectedly, the containers are not removed or sometimes do not even exit. This can cause some docker commands like docker system prune to hang forever.

Here are some helpful commands (should be executed in order):

docker ps -a  # Lists all docker processes; useful when investigating hanging containers.
docker kill $(docker ps -a -q)  # Kills all running containers.
docker rm $(docker ps -a -q)  # Removes all exited containers.
docker system prune  # Remove unused data.

Testing Infrastructure

There are 3 components to this tests infrastructure:

  • runner - This is the test entrypoint. This is the binary is invoked by bazel test. The runner spawns the target runtime container using runsc and then copies over the proctor binary into the container.
  • proctor - This binary acts as our agent inside the container which communicates with the runner and actually executes tests.
  • exclude - Holds a CSV file for each language runtime containing the full path of tests that should be excluded from running along with a reason for exclusion.