15 Commits
Author SHA1 Message Date
gVisor bot 680df82012 Internal change
PiperOrigin-RevId: 698529562
2024-11-20 14:53:44 -08:00
Ayush RanjanandgVisor bot e3aa1bf7dd Disable nogo for pkg/test/criutil:criutil and pkg/test/dockerutil:profile_test.
PiperOrigin-RevId: 674352028
2024-09-13 10:40:44 -07:00
Etienne PerotandgVisor bot 1e97c039bf Automated rollback of changelist 673541771
PiperOrigin-RevId: 673651019
2024-09-11 20:42:21 -07:00
Etienne PerotandgVisor bot 64de876102 Do not embed the run_sniffer binary in the dockerutil library.
This is causing nogo test failures. Use a `data` dependency instead.

Updates #10885

PiperOrigin-RevId: 673541771
2024-09-11 14:42:34 -07:00
Etienne PerotandgVisor bot a689c11a76 Integrate GPU ioctl sniffer in GPU tests.
This wraps all GPU tests' command line with the nvproxy ioctl sniffer.

This has multiple functions:

- Verifying that the application does not call ioctls unsupported by
  nvproxy. This is controlled by a `AllowIncompatibleIoctl` option, which
  is initially set to `true` in all tests to mirror current behavior, but
  should be flipped as we verify that they do not call unsupported ioctls.
- Verifying that the sniffer itself works transparently for a wide range
  of applications.
- Later down the line, enforcing that the application only calls ioctls
  that are part of GPU capabilities that it has a need for. This is
  controlled by a capability string which is currently only used to set
  the `NVIDIA_DRIVER_CAPABILITIES` environment variable.

Updates issue #10856

PiperOrigin-RevId: 672714520
2024-09-09 16:34:19 -07:00
Etienne PerotandgVisor bot cc8c584508 dockerutil.ContainerPool: Add debugging and utilization information.
`ContainerPool` is useful to make sure tests can productively use the CPU
by using pre-spun containers in parallel. While the test is running, it is
difficult to know which containers are doing what, and how effective the
container pool actually is.

This change adds state tracking to each container to make this process
easier. Each container has a state and a user-assignable label (e.g. the
test name) to indicate what it is doing. Then, the pool now has a `String`
function to print what each container is doing.

This is useful for CUDA tests which are very close to the test runtime limit
of one hour, in order to see how they can better spend their time, and to
know which container to `exec` into when debugging.

PiperOrigin-RevId: 626501528
2024-04-19 16:50:13 -07:00
Etienne PerotandgVisor bot e1d2ce8cfa Move GPU test utilities to its own package.
These will be reusable across GPU tests, not just the smoke tests.

PiperOrigin-RevId: 587888928
2023-12-04 17:26:28 -08:00
Zach KoopmansandgVisor bot 324735cfc0 Update docker packages to new moby repo.
PiperOrigin-RevId: 555358714
2023-08-09 20:48:47 -07:00
Adin ScannellandgVisor bot 1ceb814544 Add default_applicable_licenses rules to packages.
PiperOrigin-RevId: 513581243
2023-03-02 10:50:04 -08:00
Lucas ManningandgVisor bot bf86207401 Add systemd-cgroup support to runsc.
This change adds systemd-cgroup support to cgroupv2 and modifies existing
cgroup tests for systemd support.

Fixes #193

PiperOrigin-RevId: 435457762
2022-03-17 15:03:44 -07:00
Adin ScannellandgVisor bot 8192cccda6 Clean test tags.
PiperOrigin-RevId: 369505182
2021-04-20 13:11:25 -07:00
Ayush RanjanandgVisor bot a9441aea27 [op] Replace syscall package usage with golang.org/x/sys/unix in pkg/.
The syscall package has been deprecated in favor of golang.org/x/sys.

Note that syscall is still used in the following places:
- pkg/sentry/socket/hostinet/stack.go: some netlink related functionalities
  are not yet available in golang.org/x/sys.
- syscall.Stat_t is still used in some places because os.FileInfo.Sys() still
  returns it and not unix.Stat_t.

Updates #214

PiperOrigin-RevId: 360701387
2021-03-03 10:25:58 -08:00
Zach KoopmansandgVisor bot 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
Zach KoopmansandgVisor bot 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
Adin ScannellandgVisor bot 1481499fe2 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