Commit Graph

103 Commits

Author SHA1 Message Date
Andrei Vagin b8fa96e201 test/runtime: add the timeout option for proctor
proctor is running in a sandbox and it executes tests. If it is able to
handle timeouts, we will know that a test sandbox is alive and proctor
will send SIGTERM to test processes and collect all logs.

In addition, these changes contains a few things:
* upload runsc logs with other test artifacts.
* increase log level for java tests.
* call Fatalf instead of Errorf when we want to terminate a test.

PiperOrigin-RevId: 437385756
2022-03-25 19:38:39 -07:00
Lucas Manning 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
Zach Koopmans 334090575d [benchmarks] Fix issue with run-benchmark.
make run-benchmark should not install a new runtime. Instead, just run the
benchmark with the given RUNTIME.

Move all of the logic to install the runtime to benchmark-platforms.

PiperOrigin-RevId: 434838884
2022-03-15 13:22:07 -07:00
Ayush Ranjan 804c429021 Enable all tests for lisafs.
- Generates a lisafs variant of all syscall tests.
- Adds Makefile targets to run runtime tests with lisafs. We run runtime tests
  continuously (on every commit to master) and on presubmits iff the commit
  message contains "lisafs".
- Updates the docker tests target to run the integration tests with lisafs too.

Fixes #5466

PiperOrigin-RevId: 433782954
2022-03-10 10:09:05 -08:00
Ayush Ranjan 1fcaa119a5 Make watchdog panic for runtime tests.
This will make deadlocks more apparent in test results. Currently runtime tests
just timeout after 30 mins if there is some deadlock.

PiperOrigin-RevId: 433654750
2022-03-09 21:46:37 -08:00
Adin Scannell 137468a8eb Make release pipeline architecture-independent.
PiperOrigin-RevId: 432006218
2022-03-02 12:51:03 -08:00
Fabricio Voznika 25c6517105 Drop support for containerd 1.3
Update containerd versions used in test to the latest of each
minor version.

PiperOrigin-RevId: 431993047
2022-03-02 11:55:29 -08:00
Fabricio Voznika c6bb9ceb66 Remove VFS2 test dimension
The default is VFS2 enabled, so the tests setting VFS2 are redundant.

Updates #1624

PiperOrigin-RevId: 431827013
2022-03-01 18:59:30 -08:00
Fabricio Voznika 0b86ae090e Add tests for containerd v1.6.0-rc.4
PiperOrigin-RevId: 429182915
2022-02-16 17:48:15 -08:00
Adin Scannell 7ecf36cc84 Validate flags during install.
First, this change moves the internal config API to use flag.FlagSet, which
allows more flexibility and fixes many test usages.

Second, the runtime flags are validated during install. The platform is opened
and a warning issued if this fails, but this is not fatal.

This change requires moving the Makefile to --test_env, since the attribute
is not properly supported by test targets. Therefore, the targets can use args
while the Makefile must pass in configuration via --test_env.

PiperOrigin-RevId: 428048274
2022-02-11 11:24:01 -08:00
Adin Scannell a87bb4aae2 Ensure that nogo is enabled.
A recent change stopped using the correct file (the export data, not the
archive) and checklocks started failing. Unfortunately, this was suppressed,
since the filter command was not failing with findings.

This change fixes that problem and adds a test to ensure that this cannot
happen again. If nogo starts failing to identify problems, the sanity_test in
nogo/sanity will also start to fail.

This change also requires updating the WORKSPACE to the latest rules_go and
Go version, in order to pick up the fixed go_tools. The latest rules_go in
turn required an updated bazel, which in turn required a minor change in the
coverdata implementation.

Fixing the fact propagation brought forward a number of problems with caching
for bazel workers. Its unclear whether this was a core worker issue or whether
some caching was broken, but the situation was basically undebugable. Instead,
the way facts are stored and loaded is optimized to be able to remove the use
of workers altogether and ideally make nogo debuggable.

PiperOrigin-RevId: 426327186
2022-02-03 23:45:40 -08:00
Adin Scannell c18ec0b53c Fix race build error.
This adds a test to smoke-tests to ensure that the race build does not
break again. In debugging this issue, a race in the nogo tool itself
was discovered, and a related fix is included.

PiperOrigin-RevId: 424393624
2022-01-26 11:08:21 -08:00
Adin Scannell 0e492a2b5e Refactor nogo and provide facts render.
This change makes the core nogo package less of a "catch all", and splits
functionality into multiple packages. Instead of separate binaries for each
function, a single "cli" package is added with subcommands, and the core
starlark wrappers are also refactored to minimize redundancy.

The new "cli" package also adds support for a "render" command, which
allows factors to be rendered via a Go text template. This is useful for
debugging, but also allows code generation to be updated to use this
mechanism. This eliminates the use of a QEMU wrapper for the older
arch_genrule, and allows the use of a native bazel transition to extract
facts for the appropriate generated file. In other words, the correct facts
will be rendered for generating XXX_arm64.s, even on amd64.

PiperOrigin-RevId: 422846459
2022-01-19 10:26:27 -08:00
Adin Scannell 8b8a181868 Make the webhook deterministic.
We add a simple image that will generate certificates as a init container,
and refer to this directly use the Kubernetes yaml. Note that this also fixes
the issue of versioning within the yaml file, as this will now generate a
version of this file that refers to the precise local versions.

PiperOrigin-RevId: 421671040
2022-01-13 15:20:43 -08:00
Zeling Feng 164a2fe386 Remove unused docker image
- Remove packetimpact docker image
- Update Makefile to remove unnecessary steps
- Remove unused runner flags

PiperOrigin-RevId: 416621865
2021-12-15 12:34:24 -08:00
Zach Koopmans 74536aba2c [benchmarks] Don't run vfs1 benchmarks anymore.
PiperOrigin-RevId: 413860206
2021-12-02 23:58:36 -08:00
Daniel Dao 51f39a1204
cgroupv2: skip tests on containerd < 1.4
containerd < 1.4 does not support cgroupv2, so we adjust the Make
targets and installer scripts to skip test run on those versions.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2021-11-25 11:55:19 +00:00
Adin Scannell f1a46c928f Support STAGED_BINARIES to run prebuilt binaries with the test pipeline.
In some cases, it may be desirable to prebuild binaries and run all tests,
for example to run benchmarks with various experiments. Allow the top-level
Makefile to support this by checking for a STAGED_BINARIES variable.

PiperOrigin-RevId: 410673120
2021-11-17 17:49:35 -08:00
Fabricio Voznika 9262ea47a5 Add support for containerd 1.5
"cri.runtimeoptions.v1" moved to "runtimeoptions.v1" and containerd
configuration format version 2 is required.

Updates #6449

PiperOrigin-RevId: 405474653
2021-10-25 13:17:25 -07:00
Adin Scannell 8dc3be7a61 Use --output=starlark trick for all build path parsing.
There is no reason to limit this to debian paths.

PiperOrigin-RevId: 392469415
2021-08-23 10:53:38 -07:00
Ayush Ranjan c2353e4055 [op] Fix //debian:debian.
Co-authored-by: Andrei Vagin <avagin@google.com>
PiperOrigin-RevId: 390232925
2021-08-11 15:28:51 -07:00
Zach Koopmans c3326c440a [benchmarks] Fix redis benchmark.
Intermittenly, the connection between the client redis_benchmark container can be
flaky with the server, even if the server has been up for a long time. If this
happens, just re-run a client until we get a result.

Also, don't start a new server for each operation.

Also also, modify Makefile run-benchmark call to accept RUNTIME=runc correctly.

PiperOrigin-RevId: 378918886
2021-06-11 11:56:15 -07:00
Ayush Ranjan 915b813798 [op] Remove Build job from GitHub actions.
We already have blocking nogo tests which show all findings. This job was
building all nogo targets, and posting all the findings to GitHub as a check
run. Building nogo takes a while so we actually end up wasting a lot of time
doing redundant work.

This is aligned with our goal of moving away from GitHub actions to BuildKite
only.

PiperOrigin-RevId: 370134875
2021-04-23 12:33:48 -07:00
Adin Scannell 8192cccda6 Clean test tags.
PiperOrigin-RevId: 369505182
2021-04-20 13:11:25 -07:00
Ayush Ranjan 064a849f36 [op] Split nogo target out of unit tests.
Building nogo targets takes a very long time. This change extracts it into its
own BuildKite job.

This change also additionally speeds up other targets that were using the bazel
flag --test_tag_filters. Without --build_tag_filters, the filter is not
applied while building the specified targets and so we might end up building
targets that are not actually tested.

PiperOrigin-RevId: 368918211
2021-04-16 14:20:46 -07:00
Rahat Mahmood 932c8abd0f Implement cgroupfs.
A skeleton implementation of cgroupfs. It supports trivial cpu and
memory controllers with no support for hierarchies.

PiperOrigin-RevId: 366561126
2021-04-02 21:10:44 -07:00
Zach Koopmans 1b53550e55 Add vfs1 to go/runsc-benchmarks
PiperOrigin-RevId: 366470480
2021-04-02 10:41:23 -07:00
Ayush Ranjan ee6b22ca63 [perf] Run benchmarks with VFS2.
The run-benchmark target would run the benchmark with VFS1.

PiperOrigin-RevId: 362754188
2021-03-13 20:29:56 -08:00
Rahat Mahmood 192318a231 fusefs: Implement default_permissions and allow_other mount options.
By default, fusefs defers node permission checks to the server. The
default_permissions mount option enables the usual unix permission
checks based on the node owner and mode bits. Previously fusefs was
incorrectly checking permissions unconditionally.

Additionally, fusefs should restrict filesystem access to processes
started by the mount owner to prevent the fuse daemon from gaining
priviledge over other processes. The allow_other mount option
overrides this behaviour. Previously fusefs was incorrectly skipping
this check.

Updates #3229

PiperOrigin-RevId: 362419092
2021-03-11 17:59:13 -08:00
Adin Scannell 017348af99 Drop gazelle target from the Makefile.
This is replaced with a straight call to bazel. Unfortunately,
the built gazelle target requires a bazel installation to run
anyways.

PiperOrigin-RevId: 355211990
2021-02-02 11:29:02 -08:00
Ayush Ranjan cbcebfea80 [infra] Fix gazelle target.
PiperOrigin-RevId: 354991724
2021-02-01 11:53:30 -08:00
Fabricio Voznika c7fc4a5d66 Add fsstress tests
Updates #5273

PiperOrigin-RevId: 352088736
2021-01-15 14:51:51 -08:00
Zach Koopmans 95371cff35 Don't run profiles on runc.
PiperOrigin-RevId: 351906812
2021-01-14 17:04:13 -08:00
Adin Scannell a684bfb6c0 Split container tests from unit tests.
PiperOrigin-RevId: 351632484
2021-01-13 11:48:50 -08:00
Adin Scannell fb95e13df5 Don't remove release directory.
If the release directory is a parent directory (for reasons), then this causes
a few problems (to say the least).

PiperOrigin-RevId: 351515882
2021-01-12 22:25:46 -08:00
Fabricio Voznika 8b0f0b4d11 Delete shim v1
gvisor-containerd-shim is not compatible with containerd 1.1 or earlier.
Starting from containerd 1.2, shim v2 is the preferred interface.

PiperOrigin-RevId: 351485556
2021-01-12 17:54:10 -08:00
Adin Scannell a20da70829 Fix Go branch for arm64.
This requires several changes:
* Templates must preserve relevant tags.
* Pagetables templates are split into two targets, each preserving tags.
* The binary VDSO is similarly split into two targets, with some juggling.
* The top level tools/go_branch.sh now does a crossbuild of ARM64 as well,
  and checks and merges the results of the two branches together.

Fixes #5178

PiperOrigin-RevId: 351304330
2021-01-11 22:33:36 -08:00
Adin Scannell 0c99ab7090 Support releasing aarch64 builds.
This change works around an issue in rules_pkg, described here:
  https://github.com/bazelbuild/rules_pkg/pull/263

PiperOrigin-RevId: 350869030
2021-01-08 18:03:17 -08:00
Adin Scannell df1b23c8de Fix sha256 for github-workflow.json.
This was not being tested as part of the unit test workflows, and thus was
not being hit normally. These tests are also added to the unit tests target.

PiperOrigin-RevId: 350766814
2021-01-08 08:17:41 -08:00
Andrei Vagin 8de562b799 Add ARM smoke test
make BAZEL_CONFIG=aarch64 arm-qemu-smoke-test

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2021-01-07 17:41:43 -08:00
Adin Scannell 776016ac64 Fix native benchmarks.
PiperOrigin-RevId: 350509137
2021-01-07 01:17:10 -08:00
Adin Scannell fa8682da0f Export a pprof visualization endpoint.
This allows us to link directly to profiling results from
the build results. The code uses the standard pprof http
server, exported from the Cloud Run instance.

PiperOrigin-RevId: 350440910
2021-01-06 15:44:07 -08:00
Adin Scannell b06e5bc5b0 Add benchmarks targets to BuildKite.
This includes minor fix-ups:

* Handle SIGTERM in runsc debug, to exit gracefully.
* Fix cmd.debug.go opening all profiles as RDONLY.
* Fix the test name in fio_test.go, and encode the block size in the test.

PiperOrigin-RevId: 350205718
2021-01-05 13:21:54 -08:00
Adin Scannell 899b9ba46a Add BuildKite annotations for failures and profiles.
This change cleans up some minor Makefile issues, and adds support for
BuildKite annotations on failure and on profiles being generated. These
annotations will make failures very clear and link to the artifacts.

This change is a stepping stone for aggregating coverage data from all
individual test jobs, as this will also happen in .buildkite/annotate.sh.

PiperOrigin-RevId: 349606598
2020-12-30 15:09:12 -08:00
Fabricio Voznika eeee055d60 Set --nocache_test_results to runtime tests
If not set, the cached result is used even when runtime options
are changed, because they are not visible to blaze/bazel.

PiperOrigin-RevId: 348074339
2020-12-17 12:42:09 -08:00
Adin Scannell 7da25e6dc3 Restore refresh target.
PiperOrigin-RevId: 347864621
2020-12-16 11:45:28 -08:00
Adin Scannell 5bdc167d17 Fix run and sudo targets.
These are not passing arguments properly. This breaks the current
pre-command for BuildKite.

PiperOrigin-RevId: 347062729
2020-12-11 13:25:44 -08:00
Ian Lewis 0eb4acad37 Fix website build
Fix 'run' function call so that parameters are passed properly to the function.

PiperOrigin-RevId: 346929952
2020-12-10 21:50:03 -08:00
Adin Scannell a855a814d6 Refactor the Makefile to avoid recursive Make.
Recursive make is difficult to follow and debug. Drop this by using
internal functions, which, while difficult, are easier than trying to
following recursive invokations.

Further simplify the Makefile by collapsing the image bits and removing
the tools/vm directory, which is effectively unused.

Fixes #4952

PiperOrigin-RevId: 346569133
2020-12-09 15:53:23 -08:00
Peter Johnston eeb23531eb Support icmpv6 transport protocol
PiperOrigin-RevId: 346101076
2020-12-07 08:44:44 -08:00