diff options
author | Fabricio Voznika <fvoznika@google.com> | 2020-06-17 18:41:55 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-17 18:43:26 -0700 |
commit | 97f6b20e89d99c4d92d6491ef3fad0933c9ba53d (patch) | |
tree | 882af70a9f52ae1eefef23ed48014e09f160abd3 /test/packetimpact | |
parent | 57286eb642b9becc566f8e9c1dcbe24619f7772b (diff) |
Move mount configutation to RunOpts
Separate mount configuration from links and move it to
RunOpts, like the other options.
PiperOrigin-RevId: 317010158
Diffstat (limited to 'test/packetimpact')
-rw-r--r-- | test/packetimpact/runner/packetimpact_test.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/packetimpact/runner/packetimpact_test.go b/test/packetimpact/runner/packetimpact_test.go index 75617f6de..3cac5915f 100644 --- a/test/packetimpact/runner/packetimpact_test.go +++ b/test/packetimpact/runner/packetimpact_test.go @@ -142,7 +142,7 @@ func TestOne(t *testing.T) { } const containerPosixServerBinary = "/packetimpact/posix_server" - dut.CopyFiles("/packetimpact", "/test/packetimpact/dut/posix_server") + dut.CopyFiles(&runOpts, "/packetimpact", "/test/packetimpact/dut/posix_server") if err := dut.Create(runOpts, containerPosixServerBinary, "--ip=0.0.0.0", "--port="+ctrlPort); err != nil { t.Fatalf("unable to create container %s: %s", dut.Name, err) @@ -193,7 +193,13 @@ func TestOne(t *testing.T) { tbb := path.Base(*testbenchBinary) containerTestbenchBinary := "/packetimpact/" + tbb - testbench.CopyFiles("/packetimpact", "/test/packetimpact/tests/"+tbb) + runOpts = dockerutil.RunOpts{ + Image: "packetimpact", + CapAdd: []string{"NET_ADMIN"}, + Extra: []string{"--sysctl", "net.ipv6.conf.all.disable_ipv6=0", "--rm", "-v", tmpDir + ":" + testOutputDir}, + Foreground: true, + } + testbench.CopyFiles(&runOpts, "/packetimpact", "/test/packetimpact/tests/"+tbb) // Run tcpdump in the test bench unbuffered, without DNS resolution, just on // the interface with the test packets. |