Commit Graph

893 Commits

Author SHA1 Message Date
Zach Koopmans 5873b0f43f Port tensorflow benchmark.
PiperOrigin-RevId: 323633737
2020-07-28 12:56:06 -07:00
Ayush Ranjan 15d13e3398 [Runtime Tests] Exclude flaky/failing tests
PiperOrigin-RevId: 323632510
2020-07-28 12:47:12 -07:00
Jay Zhuang 487b0905a4 More test cases on receiving UDP mcast/bcast
PiperOrigin-RevId: 323553832
2020-07-28 05:30:02 -07:00
Rahat Mahmood c8fa685cb6 Fix when FUSE tests need to be skipped due to sentry configuration.
PiperOrigin-RevId: 323426851
2020-07-27 13:26:23 -07:00
gVisor bot c40a3304e4 Merge pull request #3371 from kevinGC:ipt-tests-udp-faster
PiperOrigin-RevId: 323426155
2020-07-27 13:18:17 -07:00
gVisor bot 1876225fc8 Merge pull request #3377 from kevinGC:native-tags
PiperOrigin-RevId: 323398518
2020-07-27 11:10:24 -07:00
Zach Koopmans 77552f1c77 Port ffmpeg benchmark
PiperOrigin-RevId: 323383320
2020-07-27 10:10:14 -07:00
Zach Koopmans 29e5609b22 Port redis benchmark
PiperOrigin-RevId: 323381964
2020-07-27 10:01:45 -07:00
Jay Zhuang cf7141fb43 Ask for *testing.T instead of storing it
Storing *testing.T on test helper structs is problematic when
subtests are used, because it is possible for nested tests to call
Fatal on parent test, which incorrect terminates the parent test.

For example

  func TestOuter(t *testing.T) {
    dut := NewDUT(t)

    t.Run("first test", func(t *testing.T) {
      dut.FallibleCall()
    })

    t.Run("second test", func(t *testing.T) {
      dut.FallibleCall()
    }
  }

In the example above, assuming `FallibleCall` calls `t.Fatal` on the
`t` it holds, if `dut.FallibleCall` fails in "first test", it will
call `Fatal` on the parent `t`, quitting `TestOuter`. This is not a
behavior we want.

PiperOrigin-RevId: 323350241
2020-07-27 06:39:06 -07:00
Zach Koopmans 2ecf66903e Add profiling to dockerutil
Adds profiling with `runsc debug` or pprof to dockerutil. All
targets using dockerutil should now be able to use profiling.

In addition, modifies existing benchmarks to use profiling.

PiperOrigin-RevId: 323298634
2020-07-26 22:02:51 -07:00
Andrei Vagin d6b676ae6a test/syscall: run each test case in a separate network namespace
... when it is possible.

The guitar gVisorKernel*Workflow-s runs test with the local execution_method.
In this case, blaze runs test cases locally without sandboxes. This means
that all tests run in the same network namespace. We have a few tests which
use hard-coded network ports and they can fail if one of these port will be
used by someone else or by another test cases.

PiperOrigin-RevId: 323137254
2020-07-25 01:04:45 -07:00
Kevin Krakauer 91a47a40a8 Bugfix: non-native tests were tagged as native
Copy the list of tags when passing it to _syscall_test.
2020-07-24 17:27:11 -07:00
Kevin Krakauer da631a3ef2 Speed up some iptables tests
Sending UDP packets in a loop can be done in a separate goroutine. We
can't do this in ContainerAction because the container will terminate
early.

Locally, scripts/iptables_tests.sh runs ~40 seconds faster.
2020-07-24 15:06:07 -07:00
Ayush Ranjan 65b5e64802 Enable open test
Updates #2923

PiperOrigin-RevId: 322953552
2020-07-24 01:13:06 -07:00
Nicolas Lacasse 4ec3516332 Implement get/set_robust_list.
PiperOrigin-RevId: 322904430
2020-07-23 17:42:50 -07:00
gVisor bot 5e34ee68c9 Merge pull request #3024 from ridwanmsharif:ridwanmsharif/fuse-stub-impl
PiperOrigin-RevId: 322890087
2020-07-23 16:34:09 -07:00
Ridwan Sharif 3e0e3b9b11 Added stub FUSE filesystem
Allow FUSE filesystems to be mounted using libfuse.
The appropriate flags and mount options are parsed and
understood by fusefs.
2020-07-23 17:13:24 -04:00
gVisor bot 15da310efa Internal change.
PiperOrigin-RevId: 322859907
2020-07-23 13:58:42 -07:00
gVisor bot fc26b3764e Merge pull request #3207 from kevinGC:icmp-connect
PiperOrigin-RevId: 322853192
2020-07-23 13:25:33 -07:00
Bhasker Hariharan 20b556e625 Fix wildcard bind for raw socket.
Fixes #3334

PiperOrigin-RevId: 322846384
2020-07-23 12:54:12 -07:00
Nicolas Lacasse b396d3882c Port sendfile to vfs2.
And do some refactoring of the wait logic in sendfile/splice/tee.

Updates #1035 #2923

PiperOrigin-RevId: 322815521
2020-07-23 10:36:17 -07:00
Kevin Krakauer fb8be7e627 make connect(2) fail when dest is unreachable
Previously, ICMP destination unreachable datagrams were ignored by TCP
endpoints. This caused connect to hang when an intermediate router
couldn't find a route to the host.

This manifested as a Kokoro error when Docker IPv6 was enabled. The Ruby
image test would try to install the sinatra gem and hang indefinitely
attempting to use an IPv6 address.

Fixes #3079.
2020-07-22 16:51:42 -07:00
Kevin Krakauer 89bd71c942 iptables: don't NAT existing connections
Fixes a NAT bug that manifested as:
- A SYN was sent from gVisor to another host, unaffected by iptables.
- The corresponding SYN/ACK was NATted by a PREROUTING REDIRECT rule
  despite being part of the existing connection.
- The socket that sent the SYN never received the SYN/ACK and thus a
  connection could not be established.

We handle this (as Linux does) by tracking all connections, inserting a
no-op conntrack rule for new connections with no rules of their own.

Needed for istio support (#170).
2020-07-22 16:49:11 -07:00
Ayush Ranjan 39525d64cb Add O_APPEND support in vfs2 gofer.
Helps in fixing open syscall tests: AppendConcurrentWrite and AppendOnly.

We also now update the file size for seekable special files (regular files)
which we were not doing earlier.

Updates #2923

PiperOrigin-RevId: 322670843
2020-07-22 15:42:33 -07:00
Bhasker Hariharan 71bf90c55b Support for receiving outbound packets in AF_PACKET.
Updates #173

PiperOrigin-RevId: 322665518
2020-07-22 15:33:33 -07:00