Commit Graph

77 Commits

Author SHA1 Message Date
Nicolas Lacasse 2374660f11 Automated rollback of changelist 312522097
PiperOrigin-RevId: 312529859
2020-05-20 12:17:06 -07:00
Nicolas Lacasse 7f57a09008 Upgrade to Bazel 3.1.0.
This upgrades the Kokoro images, bazel toolchains used by RBE runners, and
rules_go, gazelle, and go toolchain versions.

PiperOrigin-RevId: 312522097
2020-05-20 11:36:24 -07:00
Adin Scannell a79b3f4cdb Update minor formatting issues. 2020-05-06 14:15:17 -07:00
Adin Scannell 64723470a6 Use existing bazeldefs with top-level BUILD file.
PiperOrigin-RevId: 308901116
2020-04-28 14:46:19 -07:00
Eyal Soha 79542417fe Fix Layer merge and add unit tests
mergo was improperly merging nil and empty strings

PiperOrigin-RevId: 308170862
2020-04-23 18:24:31 -07:00
Adin Scannell 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
Adin Scannell c615aafa21 Add internal nogo analysis & checkescape tool.
See tools/nogo/README.md.

The checkescape tool is able to perform recursive escape analysis, using the
actual generated binary to confirm the results produced by the compiler itself.

As an initial use case, this replaces the manual escape analysis tests used for
go_marshal, and validates that the CopyIn and CopyOut paths will not require
any allocation or stack splits.

Updates #2243

PiperOrigin-RevId: 307532986
2020-04-20 20:58:20 -07:00
Eyal Soha 75e864fc75 Use multierr in packetimpact Connection.Close()
PiperOrigin-RevId: 306930652
2020-04-16 15:15:50 -07:00
Nicolas Lacasse 9a5e5ab2fa Bump rule_go, bazel toolchain, and go toolchain versions.
PiperOrigin-RevId: 305751225
2020-04-09 13:42:10 -07:00
Zach Koopmans e36eccc4b1 BigQuery schema for benchmark-tools dashboard.
PiperOrigin-RevId: 303805784
2020-03-30 13:05:45 -07:00
Eyal Soha 3192e55ffe Packetimpact in Go with c++ stub
PiperOrigin-RevId: 301382690
2020-03-17 08:53:27 -07:00
Andrew Dunham 2cf974117d WORKSPACE: bump rules_python to include reproducibility fix 2020-03-04 22:54:32 -08:00
Andrei Vagin 5fadbea3ed Update golang.org/x/sys
It was downgraded by mistake in
e5d9a4010b ("Add ability to execute go.mod in gopath context.")

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-03-02 14:40:45 -08:00
Nicolas Lacasse ccecf29f3f Bump rules_go to 0.22.0 and go toolchain to 1.14.
PiperOrigin-RevId: 297915917
2020-02-28 13:26:27 -08:00
Adin Scannell e5d9a4010b Add ability to execute go.mod in gopath context. 2020-02-28 10:21:17 -08:00
Haibo Xu 5d711c329a Force downloading new version of org_golang_x_sys.
ARM64 PTRACE_SYSEMU support was added to Linux kernal from
v5.3 and the corresponding support in golang is also enabled
in the latest org.golang/x/sys repository.

Updates #1876

Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: I10750c4c8b68f6f68d0a4d828e266966434c92fe
2020-02-21 01:51:14 +00:00
Adin Scannell 30794512d3 Add basic microbenchmarks.
PiperOrigin-RevId: 296104390
2020-02-19 18:21:54 -08:00
Nicolas Lacasse 223931da84 Bump rules_go, gazelle, and go toolchain.
PiperOrigin-RevId: 294253155
2020-02-10 10:42:15 -08:00
Nicolas Lacasse 159992300d Toolchain version bumps.
- bazel_toolchain to 2.0.2
- rules_go to 0.21.0
- Go toolchain to 1.13.6
- Use new proto lib archive.

PiperOrigin-RevId: 290999410
2020-01-22 11:52:38 -08:00
Fabricio Voznika 1c24201467 Github bug reviver
For everyone's joy, this is a tool that reopens issues that
have been closed, but are still referenced by TODOs in the
code. The idea is to run it in Kokoro nightly. Kokoro changes
are coming up next.

PiperOrigin-RevId: 288789560
2020-01-08 16:06:40 -08:00
Kevin Krakauer be2754a4b9 Add iptables testing framework.
It would be preferrable to test iptables via syscall tests, but there are some
problems with that approach:

* We're limited to loopback-only, as syscall tests involve only a single
  container. Other link interfaces (e.g. fdbased) should be tested.
* We'd have to shell out to call iptables anyways, as the iptables syscall
  interface itself is too large and complex to work with alone.
* Running the Linux/native version of the syscall test will require root, which
  is a pain to configure, is inherently unsafe, and could leave host iptables
  misconfigured.

Using the go_test target allows there to be no new test runner.

PiperOrigin-RevId: 285274275
2019-12-12 14:42:11 -08:00
Zach Koopmans ce32c06843 Import benchmark-tools to main repository.
This has adapted for use with bazel from the original commit
a26e93769ebefd82593a43e22fb13a09717cfa6d.

In particular, the style has been made consistent with internal python style
guidelines, and the packages (including the main entrypoint) have been
refactored in order to allow bazel testing targets.

PiperOrigin-RevId: 283484433
2019-12-02 22:53:26 -08:00
Andrew Dunham d2df9d76eb Bump gazelle to v0.19.1 2019-11-07 22:19:33 -08:00
Nicolas Lacasse 1e21496e95 Bump rules_go to v0.20.2 and go toolchain to v1.13.4.
PiperOrigin-RevId: 278424814
2019-11-04 11:27:57 -08:00
Nicolas Lacasse a9358ce81f Bump rules_go to v0.20.1 and go toolchain to v1.13.3.
PiperOrigin-RevId: 275909782
2019-10-21 13:28:17 -07:00
Nicolas Lacasse 010396545e Bump rules_go to v0.20.0 and gazelle to v0.19.0
PiperOrigin-RevId: 274673485
2019-10-14 15:27:41 -07:00
Nicolas Lacasse 6a54aa1f14 Bump rules_go to 0.19.5 and Go to 1.13.1.
PiperOrigin-RevId: 271664207
2019-09-27 15:51:33 -07:00
Andrei Vagin fa15fda6c4 bazel: use rules_pkg from https://github.com/bazelbuild/
BUILD:85:1: in _pkg_deb rule //runsc:runsc-debian: target
'//runsc:runsc-debian' depends on deprecated target
'@bazel_tools//tools/build_defs/pkg:make_deb': The internal version of
make_deb is deprecated. Please use the replacement for pkg_deb from
https://github.com/bazelbuild/rules_pkg/blob/master/pkg.
PiperOrigin-RevId: 271590386
2019-09-27 09:50:18 -07:00
Tamir Duberstein bbaaa1fcc2 Simplify ICMPRateLimiter
https://github.com/golang/time/commit/c4c64ca added SetBurst upstream.

PiperOrigin-RevId: 270925077
2019-09-24 09:50:51 -07:00
Michael Pratt 56cb004218 Migrate from gflags to absl flags
absl flags are more modern and we can easily depend on them directly.

The repo now successfully builds with --incompatible_load_cc_rules_from_bzl.

PiperOrigin-RevId: 269387081
2019-09-16 11:58:27 -07:00
Nicolas Lacasse e2528cae76 Bump bazel toolchain.
This fixes the RBE warning:
DEBUG: rbe_default not using checked in configs; Bazel version 0.29.1 was
picked/selected but no checked in config was found in map[...]
PiperOrigin-RevId: 268747944
2019-09-12 13:04:50 -07:00
Nicolas Lacasse f52dd451ed Bump bazel, rules_go, gazelle, and go toolchain to latest versions.
PiperOrigin-RevId: 268486127
2019-09-11 10:19:50 -07:00
Michael Pratt 98f7fbb59f Load C++ rules from @rules_cc
See https://github.com/bazelbuild/bazel/issues/8743. This will be required in
Bazel 1.0.

Protobuf was updated in
bf0c69e130 (diff-96239ee297e0a92ac6ff96a6bc434ef0).

GoogleTest was updated in
6fd262ecf7.

gflags has not yet been updated, so the repo still won't build with
--incompatible_load_cc_rules_from_bzl.

Tested with buildifier -warnings=native-cc -lint=warn **/BUILD.

PiperOrigin-RevId: 267638515
2019-09-06 11:29:00 -07:00
Adin Scannell 888e87909e Add C++ toolchain and fix compile issues.
This was accidentally introduced in 31f05d5d4f.

Fixes #788.

PiperOrigin-RevId: 266462843
2019-08-30 15:03:15 -07:00
gVisor bot 31f05d5d4f Internal change.
PiperOrigin-RevId: 266199211
2019-08-29 14:01:47 -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
Nicolas Lacasse fa3d0e6f63 Bump Bazel to v0.28.0
The new version has a change in behavior when using a custom platform:
* Old behavior: rules that don't require a toolchain used host_platform, no
  matter what execution platforms are specified.
* New behavior: rules that don't require a toolchain use standard platform
  resolution that starts with execution platforms.

As part of this change, we cannot use the "extra_exectution_platforms" flag
provided by the default bazelrc. I got rid of the default bazelrc file, and
made our custom .bazelrc as minimal as possible.

PiperOrigin-RevId: 263176802
2019-08-13 11:21:55 -07:00
Nicolas Lacasse 5fdb945a0d Rate limit the unimplemented syscall event handler.
This introduces two new types of Emitters:
1. MultiEmitter, which will forward events to other registered Emitters, and
2. RateLimitedEmitter, which will forward events to a wrapped Emitter, subject
	to given rate limits.

The methods in the eventchannel package itself act like a multiEmitter, but is
not actually an Emitter. Now we have a DefaultEmitter, and the methods in
eventchannel simply forward calls to the DefaultEmitter.

The unimplemented syscall handler now uses a RateLimetedEmitter that wraps the
DefaultEmitter.

PiperOrigin-RevId: 260612770
2019-07-29 17:12:50 -07:00
Nicolas Lacasse 07bb86080f Bump rules_go to v0.18.7 and go toolchain to v1.12.7.
PiperOrigin-RevId: 257703164
2019-07-11 16:20:43 -07:00
Adin Scannell dea3cb92f2 build: add nogo for static validation
PiperOrigin-RevId: 257297820
2019-07-09 16:44:06 -07:00
Nicolas Lacasse 94ab253d7e Bump rules_go to v0.18.6, and go toolchain to v1.12.6.
PiperOrigin-RevId: 253061432
2019-06-13 10:47:29 -07:00
Ian Lewis 74e397e39a Add introspection for Linux/AMD64 syscalls
Adds simple introspection for syscall compatibility information to Linux/AMD64.
Syscalls registered in the syscall table now have associated metadata like
name, support level, notes, and URLs to relevant issues.

Syscall information can be exported as a table, JSON, or CSV using the new
'runsc help syscalls' command. Users can use this info to debug and get info
on the compatibility of the version of runsc they are running or to generate
documentation.

PiperOrigin-RevId: 252558304
2019-06-10 23:38:36 -07:00
Nicolas Lacasse 3b950344b3 Bump googletest version.
PiperOrigin-RevId: 251716439
2019-06-05 14:17:22 -07:00
Adin Scannell f520d0d585 Resolve impossible dependencies.
PiperOrigin-RevId: 251377523
2019-06-03 23:00:40 -07:00
Adin Scannell 216da0b733 Add tooling for Go-compatible branch.
The WORKSPACE go_repositories can be generated from a standard go.mod file. Add
the necessary gazelle hooks to do so, and include a test that sanity checks
there are no changes. This go.mod file will be used in a subsequent commit to
generate a go gettable branch of the repository.

This commit also adds a tools/go_branch.sh script, which given an existing go
branch in the repository, will add an additional synthetic change to the branch
bringing it up-to-date with HEAD.

As a final step, a cloudbuild script is included, which can be used to automate
the process for every change pushed to the repository. This may be used after
an initial go branch is pushed, but this is manual process.

PiperOrigin-RevId: 251095016
2019-06-01 23:10:43 -07:00
Nicolas Lacasse 114bb3a234 Bump rules_go to 0.18.5 and go tool chain to 1.12.5.
PiperOrigin-RevId: 248719758
Change-Id: I0a87d8befd56c5a791585818e9b84ac0c443b0df
2019-05-17 07:57:23 -07:00
Tamir Duberstein 59442238d4 Remove syscall tests' dependency on glog
PiperOrigin-RevId: 245469859
Change-Id: I0610e477cc3a884275852e83028ecfb501f2c039
2019-04-26 12:47:46 -07:00
Nicolas Lacasse fbe7ba4661 Bump rules_go to v0.18.2 and go toolchain to v1.12.2.
PiperOrigin-RevId: 242493066
Change-Id: I2b2b590799d208895c5c16606e4f854dfd112dba
2019-04-08 10:51:18 -07:00
Nicolas Lacasse f44f2f73b0 Make it easier for humans to use RBE, and maintain our bazelrc.
This CL merges all RBE-specific configuration from .bazelrc_rbe into .bazelrc
so that it will be picked up by default by users running bazel.

It also checks in a bazelrc from the upstream bazel-toolchains repository, and
imports that into our repo-specific .bazelrc. This makes it easier to maintain
and update the bazelrc going forward.

Documentation was added to the README.

PiperOrigin-RevId: 242208733
Change-Id: Iea32de9be85b024bd74f88909b56b2a8ab34851a
2019-04-05 15:48:32 -07:00
Adin Scannell e9508967b0 Format workspace
Change-Id: Ibb77656c46942eb123cd6cff8b471a526468d2dd
PiperOrigin-RevId: 242007583
2019-04-04 14:23:32 -07:00