diff options
author | Kevin Krakauer <krakauer@google.com> | 2020-02-10 11:08:24 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-10 11:09:19 -0800 |
commit | 31f2182cd3fc2a6fdb1aecf1c56f1302f16f6453 (patch) | |
tree | 1cf62dab4df23187bf6ab186673a0104b021c7a9 /test/iptables | |
parent | a03b40ca17f7c84ab11b1c47c054d28fdfcea4ce (diff) |
iptables: add instructions for runsc building.
The readme didn't mention that users need to:
- `bazel build` when working on iptables tests
- enable raw sockets in /etc/docker/daemon.json.
PiperOrigin-RevId: 294260169
Diffstat (limited to 'test/iptables')
-rw-r--r-- | test/iptables/README.md | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/iptables/README.md b/test/iptables/README.md index c2b934e1f..cc8a2fcac 100644 --- a/test/iptables/README.md +++ b/test/iptables/README.md @@ -2,6 +2,9 @@ iptables tests are run via `scripts/iptables_test.sh`. +iptables requires raw socket support, so you must add the `--net-raw=true` flag +to `/etc/docker/daemon.json` in order to use it. + ## Test Structure Each test implements `TestCase`, providing (1) a function to run inside the @@ -25,7 +28,14 @@ Your test is now runnable with bazel! ## Run individual tests -Build the testing Docker container: +Build and install `runsc`. Re-run this when you modify gVisor: + +```bash +$ bazel build //runsc && sudo cp bazel-bin/runsc/linux_amd64_pure_stripped/runsc $(which runsc) +``` + +Build the testing Docker container. Re-run this when you modify the test code in +this directory: ```bash $ bazel run //test/iptables/runner:runner-image -- --norun |