Commit Graph

77 Commits

Author SHA1 Message Date
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
Michael Pratt fb053829f9 Update testDeps definition for https://golang.org/cl/354632
The in-progress Go 1.18's testing.corpusEntry changed definition slightly in
https://golang.org/cl/354632. Update our definition to the new version.

PiperOrigin-RevId: 404040853
2021-10-18 13:15:59 -07:00
Nicolas Lacasse d93c3c2eff Wrap testing.MainStart to work around upcoming signature change.
Go1.18 is changing the signature of testing.MainStart. To ensure compatibility,
we wrap MainStart and different implementations for versions before/after
Go1.18.

PiperOrigin-RevId: 401362668
2021-10-06 16:08:32 -07:00
Fabricio Voznika 85a0a353ad Replace whitelist with allowlist
PiperOrigin-RevId: 384586164
2021-07-13 17:20:41 -07:00
Adin Scannell 9a8692c82a Remove eternal and enormous tests.
PiperOrigin-RevId: 366573366
2021-04-03 00:18:34 -07:00
Ayush Ranjan 0a909ba75a [op] Replace syscall package usage with golang.org/x/sys/unix in test/.
The syscall package has been deprecated in favor of golang.org/x/sys.

Note that syscall is still used in some places because the following don't seem
to have an equivalent in unix package:
- syscall.SysProcIDMap
- syscall.Credential

Updates #214

PiperOrigin-RevId: 361332034
2021-03-06 09:54:09 -08:00
Ayush Ranjan dea894238b [infra] Update JDK11 version for java runtime tests.
PiperOrigin-RevId: 358085809
2021-02-17 19:28:43 -08:00
gVisor bot a0209de301 Internal change.
PiperOrigin-RevId: 348089449
2020-12-17 14:05:01 -08:00
Adin Scannell 80552b936d Support partitions for other tests.
PiperOrigin-RevId: 345399936
2020-12-03 01:00:21 -08:00
Adin Scannell 24d6eb58e5 Skip generating an empty (broken) test case.
It's possible that all the cases in a given batch are excluded if
the offsets line up just right, which will cause the test to fail.
Don't generate an invalid test in this case.

PiperOrigin-RevId: 345276588
2020-12-02 11:40:27 -08:00
Ayush Ranjan fe9442d327 [vfs] Return EEXIST when file already exists and rp.MustBeDir() is true.
This is consistent with what Linux does. This was causing a PHP runtime test
failure. Fixed it for VFS2.

PiperOrigin-RevId: 341155209
2020-11-06 18:52:38 -08:00
Ayush Ranjan f27edcc708 [runtime tests] Add partitions to runtime tests.
This will allow us to run massive runtime tests live java to run in parallel
across multiple jobs.

PiperOrigin-RevId: 340956246
2020-11-05 17:11:32 -08:00
Ayush Ranjan caf1e52e18 [runtime tests] Exclude ext/pcre/tests/cache_limit.phpt.
PiperOrigin-RevId: 340925131
2020-11-05 14:09:22 -08:00
Andrei Vagin df88f223bb net/tcpip: connect to unset loopback address has to return EADDRNOTAVAIL
In the docker container, the ipv6 loopback address is not set,
and connect("::1") has to return ENEADDRNOTAVAIL in this case.

Without this fix, it returns EHOSTUNREACH.

PiperOrigin-RevId: 340002915
2020-10-31 01:19:40 -07:00
Ayush Ranjan 710a878847 [runtime tests] Unexclude fixed test.
#4641 fixed the PHP runtime test ext/standard/tests/network/bug20134.phpt.
We should start testing it again.

Also excluded another flaky test. Seems like a test bug.

PiperOrigin-RevId: 339475716
2020-10-28 09:35:54 -07:00
Ayush Ranjan 6237563f0a [runtime tests] Exclude flaky tests.
Also updated a test which only fails with VFS1.

PiperOrigin-RevId: 338704940
2020-10-23 10:56:18 -07:00
Andrei Vagin b6a0c91aa1 test/runtime: set the NOFILE soft rlimit to 32K
The python:test_subprocess enumerates all possible file descriptors and fails
by timeout if the limit is too high.

There is a know thing about docker that it sets this limit to 1M by default,
but on native linux, this limit will be between 1K to 32K.

PiperOrigin-RevId: 338197239
2020-10-20 21:44:51 -07:00
Ayush Ranjan e36a2b7930 [runtime tests] Update exclude files.
bhaskerh@ fixed a bunch of the EADDRINUSE flakes in #3662 so we should
unexclude them.

I have also tested other flaky tests on this list and removed those that do
not flake anymore.

PiperOrigin-RevId: 338158545
2020-10-20 16:19:15 -07:00
Ayush Ranjan 85a58d110f [runtime-tests] Exclude failing test due to expired cert.
PiperOrigin-RevId: 335927821
2020-10-07 12:32:44 -07:00
Jamie Liu ed94c0de51 Actually disable nodejs test parallel/test-fs-write-stream-double-close.
PiperOrigin-RevId: 335070320
2020-10-02 11:51:17 -07:00
Adin Scannell ae51aef5bb Ensure proctor is built as pure Go binary.
PiperOrigin-RevId: 334716351
2020-09-30 17:48:52 -07:00
Adin Scannell d4d9238c52 Stop depending on go_binary targets.
Closes #3374

PiperOrigin-RevId: 334505627
2020-09-29 18:34:59 -07:00
Jamie Liu d79cf4808d Disable flaky java11 tests.
Regarding ThreadCpuTimeArray.java: The test starts 10 threads, each of which
does some computation, then blocks. When all threads are blocked, the test
sleeps for 200ms, then checks that less than 100ns of CPU time in userspace
elapse over the course of the sleep; AFAICT, the 100ns of slop is because a
thread indicates that it's in the WAITING state before it actually blocks, and
because signals can cause threads to be temporarily woken. gVisor's CPU clocks
have a granularity of 10ms (the interval of Kernel.cpuClockTicker is
//pkg/abi/linux.ClockTick), so a single tick pushes the test over the
threshold.

PiperOrigin-RevId: 333830287
2020-09-25 16:28:00 -07:00
Jamie Liu b8ba0893ec Disable PHP test ext/standard/tests/streams/proc_open_bug60120.phpt.
PiperOrigin-RevId: 332521647
2020-09-18 14:00:19 -07:00
Jamie Liu 51a2fe8eb4 Disable nodejs12.4 test async-hooks/test-statwatcher.
PiperOrigin-RevId: 332281912
2020-09-17 11:53:10 -07:00
Ayush Ranjan 0356c7ef32 [runtime tests] Add documentation.
Added a README describing what these tests are, how they work and how to run
them locally. Also reorganized the exclude files into a directory.

PiperOrigin-RevId: 332079697
2020-09-16 13:48:26 -07:00
Ayush Ranjan 8ab08cdc01 [runtime tests] Exclude flaky nodejs test
PiperOrigin-RevId: 329749191
2020-09-02 11:13:02 -07:00
Ayush Ranjan b03e0ee802 [runtime-tests] Exclude flaky nodejs test.
PiperOrigin-RevId: 328579755
2020-08-26 12:11:43 -07:00
Jamie Liu bee07a2d68 Link to PHP bug for disabled disk space tests.
PiperOrigin-RevId: 328410399
2020-08-25 15:06:57 -07:00
Adin Scannell b0c53f8475 Add nogo support to go_binary and go_test targets.
Updates #3374

PiperOrigin-RevId: 328378700
2020-08-25 12:18:25 -07:00
Jamie Liu 10fa583c36 Disable PHP disk space tests.
These tests print disk_free_space()/disk_total_space() and expect the printed
result to be an integer (despite the fact that both the documented and returned
type is float). After cl/297213789, free/total disk space on tmpfs is
sufficiently large that PHP prints the result in scientific notation instead:

        ========DIFF========
        012+ float(9.2233720368548E+18)
        013+ float(9.2233720368548E+18)
        012- float(%d)
        013- float(%d)
        ========DONE========
        FAIL disk_total_space() and disk_free_space() tests [ext/standard/tests/file/disk.phpt]

PiperOrigin-RevId: 328349906
2020-08-25 09:57:59 -07:00
Ayush Ranjan 293f11ca95 [runtime tests] Exclude flaky/failing tests
PiperOrigin-RevId: 325481011
2020-08-07 12:07:46 -07:00
Adin Scannell 90021e775a Add bzl_library rules for .bzl files without one.
PiperOrigin-RevId: 325280924
2020-08-06 12:10:49 -07:00
Ayush Ranjan 72b528c840 [runtime tests] Exclude failing python and java tests
test_httplib was un-excluded in cl/325137657. Exclude it again.
test_httplib fails consistently when running in a kokoro job. Could not repro
with Docker.

There are some java tests that pass locally on Docker but fail when running
within a kokoro job.

Also make shard count a multiple of 8 to minimize idle cores and minimize test
time.

PiperOrigin-RevId: 325267071
2020-08-06 11:08:50 -07:00
Ayush Ranjan ce463c027b [runtime tests] Update python tests.
- un-exclude passing tests to increase testing surface.
- create/update bugs for tests that fail on runsc but pass on runc.

PiperOrigin-RevId: 325137657
2020-08-05 17:48:07 -07:00
Ayush Ranjan d0127b23f2 [runtime tests] Update bugs and un-exclude passing tests.
PiperOrigin-RevId: 325045486
2020-08-05 10:23:12 -07:00
Ayush Ranjan 338f96b36c [runtime tests] Exclude flaky tests.
PiperOrigin-RevId: 324923599
2020-08-04 17:20:24 -07:00
Ayush Ranjan 7dfcf727a5 [runtime tests] Fix nodejs runtime tests.
- Exclude flaky tests.
- Bump timeout.
- Un-exclude passing tests to increase testing surface.
- Create/Update bugs for tests that pass on runc but fail on runsc.

PiperOrigin-RevId: 324830840
2020-08-04 09:51:13 -07:00
Dean Deng b5c9ff8192 Exclude flaky nodejs runtime test.
PiperOrigin-RevId: 324738840
2020-08-03 20:32:23 -07:00
Ayush Ranjan 12a6657d9c [runtime tests] Enhance java runtime test.
- Added a bunch of helpful options which help in speeding up the test and
  providing useful output.
- Unexcluded passing tests and updated bugs. Excluded tests which were failing.
- Increased the batch size for java tests so that we can take advantage of
  the shared JVMs.

The running time of the tests decreased from 3+ hours (I don't know the exact
running time because this test has always timed out after 3 hours) to 1 hour
15 minutes. We can reliably run this a CI kokoro job.

PiperOrigin-RevId: 324301503
2020-07-31 16:01:36 -07:00
Ayush Ranjan f7281902f8 [runtime tests] go language test enhancement
- Unexported some passing tests. This will increase the testing surface and
  will be especially helpful when this is enabled for vfs2.
- Run tool tests with -v (verbose output). We only print the output when a test
  fails so this should not clutter the output.
- Run tool tests with "-no-rebuild" flag.
- Surround test name with appropriate regex, i.e. ^testname$. This will ensure
  that only that test is run. Earlier running go_test:os would also run
  go_test:os/exec, go_test:os/signal, go_test:os/user. This should help speed
  up the tests as we do not run the same test multiple times anymore.
- Updated bugs.

Updates #3191

PiperOrigin-RevId: 324028878
2020-07-30 10:26:09 -07:00
Ayush Ranjan 15d13e3398 [Runtime Tests] Exclude flaky/failing tests
PiperOrigin-RevId: 323632510
2020-07-28 12:47:12 -07:00
Ayush Ranjan 40acd22bc8 Runtime tests are enormous
PiperOrigin-RevId: 321885126
2020-07-17 17:19:34 -07:00
Ayush Ranjan c0ee95198a Automated rollback of changelist 321647645
PiperOrigin-RevId: 321808673
2020-07-17 10:45:25 -07:00
Ayush Ranjan e6894cb99f Port runtime tests to use go_test
PiperOrigin-RevId: 321647645
2020-07-16 14:37:13 -07:00
Ayush Ranjan 69f2059e5d Runtime test batch executor
Earlier we were docker exec-ing each test at a time. However invoking the test
framework has a fixed overhead which made it infeasible to make the runtime
tests run as presubmits. This change now executes tests in batches of 50 (can
be altered). This really speeds up testing process.

With this change, the following tests can be run in reasonable times:
- Go
- Nodejs
- Php
- Python

PiperOrigin-RevId: 320763916
2020-07-11 08:18:35 -07:00
Zach Koopmans f3fa43cf23 Move all tests to new docker API.
Moves following to new dockerutil API:
- //test/e2e:integration_test
- //test/image:image_test
- //test/iptables:iptables_test
- //test/root:root_test
- //test/packetimpact:packetimpact_test

PiperOrigin-RevId: 320253118
2020-07-08 13:26:23 -07:00
Ayush Ranjan e3db9bda60 Enable shards in runtime test runner.
Fixed an issue with the runtime test runner which enables us to run tests in
shards. We had to touch the status file as indicated by an env var.

PiperOrigin-RevId: 320236205
2020-07-08 12:05:04 -07:00
Fabricio Voznika 97f6b20e89 Move mount configutation to RunOpts
Separate mount configuration from links and move it to
RunOpts, like the other options.

PiperOrigin-RevId: 317010158
2020-06-17 18:43:26 -07:00
Michael Pratt 885605c5e4 Remove blacklist from //test/runtimes
Updates #2972

PiperOrigin-RevId: 316534165
2020-06-15 13:36:24 -07:00