Commit Graph
21 Commits
Author SHA1 Message Date
Adin ScannellandgVisor bot caec235b70 Simplify profiling and benchmarks.
- Tweak the benchmarks to work with b.N where appropriate. In many cases,
  b.N was simply being ignored. This creates an implicit dependency in the
  user passing a reasonable benchtime (less than or equal to the actual
  runtime of the test, or using the X syntax) otherwise the test runs
  forever.
- In cases where the above is impossible, explicitly set benchtime from
  the test wrapper, to prevent the above behavior (tensorflow).
- Drop the *Reverse variants, which are simply hey benchmarks. We should
  just add a hey benchmark. The platforms benchmarks already include a
  native platform, and thus these benchmarks are incredibly confusing.
  (In other words, BenchmarkNginxReverse has nothing to do with an nginx
  benchmark for runsc.)
- Remove the redunant Harness object, which contains no state, in order
  to slightly simplify the code.
- Make Block and Heap profiling actually work, but setting appropriate
  runtime parameters (and plumbing them through the config).
- Split the profiling into two phases: start and stop, since some will
  need to be started early, and others will need to happen at the end.

PiperOrigin-RevId: 349495377
2020-12-29 18:29:12 -08:00
Zeling FengandgVisor bot c0897a4b49 Do not start a ContainerExec twice
ContainerExecStart and ContainerExecAttach both call the /exec/id/start API
endpoint.

PiperOrigin-RevId: 344946627
2020-11-30 21:22:55 -08:00
Adin ScannellandgVisor bot cd577716bf Fail gracefully if Docker is not configured with ipv6.
PiperOrigin-RevId: 343927315
2020-11-23 14:24:27 -08:00
Zeling FengandgVisor bot f7a4ef7453 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
Zach KoopmansandgVisor bot 9398b9b494 Remove go profiling flag from dockerutil.
Go profiling was removed from runsc debug in a previous change.

PiperOrigin-RevId: 328203826
2020-08-24 13:53:10 -07:00
Zach KoopmansandgVisor bot 37b92bb038 Mark integration tests as passing in VFS2 except CheckpointRestore.
Mark all tests passing for VFS2 in:
image_test
integration_test

There's no way to do negative look ahead/behind in golang test regex,
so check if the tests uses VFS2 and skip CheckPointRestore if it does.

PiperOrigin-RevId: 326050915
2020-08-11 10:37:32 -07:00
Zach KoopmansandgVisor bot 60d6f86e4b Port Ruby benchmark.
PiperOrigin-RevId: 325500772
2020-08-07 13:49:07 -07:00
Fabricio VoznikaandgVisor bot c1ea88fd0d Stop profiling when the sentry exits
Also removes `--profile-goroutine` because it's equivalent
to `debug --stacks`.

PiperOrigin-RevId: 325061502
2020-08-05 11:30:11 -07:00
Kevin KrakauerandgVisor bot 1fd57815c8 Have dockerutil.Wait* respect the context deadline
PiperOrigin-RevId: 324044634
2020-07-30 11:29:24 -07:00
Kevin Krakauer f5f34a3863 ip6tables testing
We skip gVisor tests for now, as ip6tables aren't yet implemented.
2020-07-28 10:51:14 -07:00
Zach KoopmansandgVisor bot 504dc8b8bc 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 3279ae429e 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
Zach KoopmansandgVisor bot 8b7b61538b Initial golang Benchmarks
PiperOrigin-RevId: 321021071
2020-07-13 13:29:30 -07:00
Zach KoopmansandgVisor bot c5a0007cec 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
Fabricio VoznikaandgVisor bot 52335056f7 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
gVisor bot 914cd2d6bd Automated rollback of changelist 311424257
PiperOrigin-RevId: 313300554
2020-05-26 17:40:57 -07:00
Fabricio VoznikaandgVisor bot 24183a6bdc Fix TestTmpFile
Split check for file in /tmp from working directory test.
Fix readonly case which should not fail to create working
dir.

PiperOrigin-RevId: 312702930
2020-05-21 11:08:10 -07:00
Bhasker HariharanandgVisor bot 25f7fdfc8d Automated rollback of changelist 311285868
PiperOrigin-RevId: 311424257
2020-05-13 16:13:37 -07:00
Ian GudgerandgVisor bot c8a437e03e Replace test_runner.sh bash script with Go.
PiperOrigin-RevId: 311285868
2020-05-13 01:22:42 -07:00
Eyal SohaandgVisor bot 530e700ba7 More descriptive error message for missing docker image.
Tested:
  Ran a packetimpact test after `docker image rm` and examined the message.
PiperOrigin-RevId: 308370603
2020-04-24 20:00:24 -07:00
Adin ScannellandgVisor bot 1b8133d9f9 Simplify Docker test infrastructure.
This change adds a layer of abstraction around the internal Docker APIs,
and eliminates all direct dependencies on Dockerfiles in the infrastructure.

A subsequent change will automated the generation of local images (with
efficient caching). Note that this change drops the use of bazel container
rules, as that experiment does not seem to be viable.

PiperOrigin-RevId: 308095430
2020-04-23 11:33:30 -07:00