Commit Graph

16 Commits

Author SHA1 Message Date
Zeling Feng 86c1ae095a Add support to run packetimpact tests against Fuchsia
blaze test <test_name>_fuchsia_test will run the corresponding packetimpact
test against fuchsia.

PiperOrigin-RevId: 329835290
2020-09-02 19:19:40 -07:00
Tamir Duberstein d3057717dc Include command output on error
Currently the logs produce

  TestOne: packetimpact_test.go:182: listing devices on ... container: process terminated with status: 126

which is not actionable; presumably the `ip` command output is interesting.

PiperOrigin-RevId: 329032105
2020-08-28 16:45:18 -07:00
Adin Scannell c5f5806fe6 Enable "make packetimpact-tests" to work.
This required minor fixes to the bazel wrapper. The "dut_platform" is
also changed to "native" to line-up with the system call tests and
remove the hard-coded "linux" and "netstack" strings.
2020-08-04 20:49:00 -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
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
Jay Zhuang 40826b0557 DUT logs in test failure messages in packetimpact
DUT logs will include logs from the posix server and gVisor, which
provides a way to instrument the DUT during test failures.

PiperOrigin-RevId: 321816647
2020-07-17 11:18:40 -07:00
Jay Zhuang 822fc99ecd Add support for UDP IPv6
Also ironed out all the bugs found on the IPv6 code path that affects socket
bind, send and receive.

PiperOrigin-RevId: 321202653
2020-07-14 11:49:51 -07:00
Jay Zhuang bafef1cf3a Print testbench log on packetimpact failures
These logs include flags passed to packetimpact tests (the Go tests), and test
failure messages.

PiperOrigin-RevId: 320989521
2020-07-13 10:58:21 -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
Bhasker Hariharan c9446f0534 Fix two bugs in TCP sender.
a) When GSO is in use we should not cap the segment to maxPayloadSize in
   sender.maybeSendSegment as the GSO logic will cap the segment to the correct
   size. Without this the host GSO is not used as we end up breaking up large
   segments into small MSS sized segments before writing the packets to the
   host.

b) The check to not split a segment due to it not fitting in the receiver window
   when there are pending segments is incorrect as segments in writeList can be
   really large as we just take the write call's buffer size and create a single
   large segment. So a write of say 128KB will just be 1 segment in the
   writeList.

   The linux code checks if 1 MSS sized segments fits in the receiver's window
   and if not then does not split the current segment. gVisor's check was
   incorrect that it was checking if the whole segment which could be >>> 1 MSS
   would fit in the receiver's window. This was causing us to prematurely stop
   sending and falling back to retransmit timer/probe from the other end to send
   data.

This was seen when running HTTPD benchmarks where @ HEAD when sending large
files the benchmark was taking forever to run.

The tcp_splitseg_mss_test.go is being deleted as the test as written doesn't
test what is intended correctly. This is because GSO is enabled by default and
the reason the MSS+1 sized segment is sent is because GSO is in use. A proper
test will require disabling GSO on linux and netstack which is going to take a
bit of work in packetimpact to do it correctly.

Separately a new test probably should be written that verifies that a segment >
availableWindow is not split if the availableWindow is < 1 MSS.

Fixes #3107

PiperOrigin-RevId: 319172089
2020-06-30 23:56:34 -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
Ian Gudger dc4e0157ef Add test for reordering.
Tests the effect of reordering on retransmission and window size.

Test covers the expected behavior of both Linux and netstack, however, netstack
does not behave as expected. Further, the current expected behavior of netstack
is not ideal and should be adjusted in the future.

PiperOrigin-RevId: 316015184
2020-06-11 18:04:43 -07:00
Ian Gudger 7b79370c10 Add pcap logging to pcaketimpact.
This makes debugging packetimpact tests much easier.

PiperOrigin-RevId: 313662654
2020-05-28 14:43:48 -07:00
gVisor bot 92bafd7929 Automated rollback of changelist 311424257
PiperOrigin-RevId: 313300554
2020-05-26 17:40:57 -07:00
Bhasker Hariharan 8605c97136 Automated rollback of changelist 311285868
PiperOrigin-RevId: 311424257
2020-05-13 16:13:37 -07:00
Ian Gudger e4058c0355 Replace test_runner.sh bash script with Go.
PiperOrigin-RevId: 311285868
2020-05-13 01:22:42 -07:00