Commit Graph

29 Commits

Author SHA1 Message Date
Adin Scannell 3b2e50f539 Include shim in individual released binaries.
The debian rules are also moved to the top-level, since they
apply to binaries outside the //runsc directory.

Fixes #3665

PiperOrigin-RevId: 328379709
2020-08-25 12:24:32 -07:00
Zach Koopmans 89f3197fc3 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 Koopmans 9ac71dc78f Mark DirCreation/tmp tests as passing.
PiperOrigin-RevId: 325861904
2020-08-10 12:27:53 -07:00
Zach Koopmans 80c80a1410 Remove old benchmark tools.
Remove the old benchmark-tools directory, including
imports in the WORKSPACE file and associated bazel rules.

The new Golang benchmark-tools can be found at //test/benchmarks
and it is functionally equivalent, excepting syscall_test
which can be found in //test/perf/linux.

PiperOrigin-RevId: 325529075
2020-08-07 16:18:51 -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
Kevin Krakauer fcc88a8b27 Fix PHONY target typos
PiperOrigin-RevId: 324305107
2020-07-31 16:20:35 -07:00
Adin Scannell 6a59e765c3 Override the test timeout for runtimes.
PiperOrigin-RevId: 324026021
2020-07-30 10:12:20 -07:00
Zach Koopmans b38bae0088 Mark Passing Integration Tests for VFS2.
Mark the currently passing integration/image tests for
VFS2. Bugs will be filed for remaining failing tests.

Updates #1487

PiperOrigin-RevId: 323297260
2020-07-26 21:43:46 -07:00
Ayush Ranjan 7dd8d87c96 Fix make dev
The "dev" target had been failing. The failure was being caused due to variable
overload of "RUNTIME".

PiperOrigin-RevId: 323106040
2020-07-24 17:49:19 -07:00
Ayush Ranjan c9399797d8 Fix kokoro presubmits!
Fixed the following error:
tools/bazel.mk:119: *** Destination not provided..  Stop.
The issue was that we were running all make commands in a subshell so variables
like $T were not passed on.

The other issue was related to credentials. The test passed locally but not on
kokoro, the only difference in the workflow was the credentials bit.

Also fixed up some other tiny issues I came across, were not blockers.

PiperOrigin-RevId: 322782457
2020-07-23 07:29:06 -07:00
Adin Scannell e1a04f84e8 Add standard entrypoints for test targets.
PiperOrigin-RevId: 322265513
2020-07-20 18:05:05 -07:00
gVisor bot c81ac8ec3b Merge pull request #2672 from amscanne:shim-integrated
PiperOrigin-RevId: 321053634
2020-07-13 16:10:58 -07:00
Adin Scannell 2afff44403 Update shim to build using bazel.
The go.mod dependency tree for the shim was somehow contradictory. After
resolving these issues (e.g. explicitly imported k8s 1.14, pulling a
specific dbus version), and adding all dependencies, the shim can now be
build as part of the regular bazel tree.

As part of this process, minor cleanup was done in all the source files:
headers were standardized (and include "The gVisor Authors" in addition
to the "The containerd Authors" if originally derived from containerd
sources), and comments were cleaned up to meet coding standards.

This change makes the containerd installation dynamic, so that multiple
versions can be tested, and drops the static installer for the VM image
itself.

This change also updates test/root/crictl_test.go and related utilities,
so that the containerd tests can be run on any version (and in cases
where it applies, they can be run on both v1 and v2 as parameterized
tests).
2020-07-09 17:39:47 -07:00
Adin Scannell fa9c905505 Fix test release commands to work with older GPG.
The --quick-generate-key command wasn't added until recently.

PiperOrigin-RevId: 314570297
2020-06-03 11:32:11 -07:00
gVisor bot b062821d3e Merge pull request #2837 from avagin:make-startup-option
PiperOrigin-RevId: 314415164
2020-06-02 15:24:33 -07:00
Andrei Vagin 5e4d7072a6 make: Allow to specify bazel startup options.
And don't parse binary paths for the build target.

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-06-02 11:30:26 -07:00
Fabricio Voznika ca5912d13c More runsc changes for VFS2
- Add /tmp handling
- Apply mount options
- Enable more container_test tests
- Forward signals to child process when test respaws process
  to run as root inside namespace.

Updates #1487

PiperOrigin-RevId: 314263281
2020-06-01 21:32:09 -07:00
Adin Scannell 2c6c4365ea Move to make for tag release workflow.
This will make tag & release workflows idempotent.

PiperOrigin-RevId: 314154888
2020-06-01 10:31:26 -07:00
Adin Scannell c017ca8138 Fix issue with make copy targets.
PiperOrigin-RevId: 313838809
2020-05-29 13:21:20 -07:00
Adin Scannell 04a1f431e3 Fix the APT repository structure.
This change fixes the apt repository structure to avoid emiting warnings on
Ubuntu 18.04 (and potentially other versions). This requires a slight refactor
of the repository generation scripts, since we can no longer copy the same
release files for different "suites".

This should avoid the warning by setting the suite to the distribution:
  https://github.com/Debian/apt/blob/master/apt-pkg/metaindex.cc#L75

This change also moves over to the standardized Makefile entrypoint, which
makes settings clearer and enables local testing.

PiperOrigin-RevId: 313817017
2020-05-29 11:30:02 -07:00
Geethanjali Eswaran 76d0aa47f4 Fix typo in 'make tests' recipe
test_tag_filter => test_tag_filters
Ref: https://docs.bazel.build/versions/master/command-line-reference.html#flag--test_tag_filters
2020-05-23 11:00:27 +00:00
gVisor bot a3f97a757a Merge pull request #2513 from amscanne:website-integrated
PiperOrigin-RevId: 311184385
2020-05-12 12:55:23 -07:00
Adin Scannell 508e25b6d6 Adapt website to use g3doc sources and bazel.
This adapts the merged website repository to use the image and bazel
build framework. It explicitly avoids the container_image rules provided
by bazel, opting instead to build with direct docker commands when
necessary.

The relevant build commands are incorporated into the top-level
Makefile.
2020-05-06 14:15:18 -07:00
Adin Scannell c60613475c Standardize all Docker images.
This change moves all Docker images to a standard location, and abstracts the
build process so that they can be maintained in an automated fashion. This also
allows the images to be architecture-independent.

All images will now be referred to by the test framework via the canonical
`gvisor.dev/images/<name>`, where `<name>` is a function of the path within the
source tree.

In a subsequent change, continuous integration will be added so that the images
will always be correct and available locally.

In the end, using `bazel` for Docker containers is simply not possible. Given
that we already have the need to use `make` with the base container (for
Docker), we extend this approach to get more flexibility.

This change also adds a self-documenting and powerful Makefile that is intended
to replace the collection of scripts in scripts. Canonical (self-documenting)
targets can be added here for targets that understand which images need to be
loaded and/or built.

PiperOrigin-RevId: 308322438
2020-04-24 14:11:42 -07:00
Andrei Vagin 75d7f76a6c arm64: add a travis build ci
Build runsc and run "runsc do ls".

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-02-21 22:44:19 -08:00
Ian Lewis 7ac46c5048 Allow non-unique UIDs in bazel docker containers
Allow non-unique UIDs in the bazel docker container in order to avoid failures
using host UIDs that are already present in the image.

Issue #1267

PiperOrigin-RevId: 283456369
2019-12-02 18:00:33 -08:00
Ian Lewis e31686500d Allow non-unique group IDs in bazel docker containers
Allow non-unique group IDs in the bazel docker container in order to avoid
failures using host group IDs that are already present in the image.

Issue #801

PiperOrigin-RevId: 267306089
2019-09-04 23:20:12 -07:00
Nicolas Lacasse d60d99cb61 Bump rules_go to v0.19.3 and bazel_gazelle to v0.18.1.
And bump go toolchain to v1.12.9.

Protobuf dependencies must be explicitly included now.

PiperOrigin-RevId: 263853370
2019-08-16 15:02:11 -07:00
Andrei Vagin 9e1c253fe8 gvisor: run bazel in a docker container
bazel has a lot of dependencies and users don't want to install them
just to build gvisor.

These changes allows to run bazel in a docker container.
A bazel cache is on the local file system (~/.cache/bazel), so
incremental builds should be fast event after recreating a bazel
container.

Here is an example how to build runsc:
make BAZEL_OPTIONS="build runsc:runsc" bazel

Change-Id: I8c0a6d0c30e835892377fb6dd5f4af7a0052d12a
PiperOrigin-RevId: 246570877
2019-05-03 14:13:08 -07:00