summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact/runner/defs.bzl
diff options
context:
space:
mode:
authorSam Balana <sbalana@google.com>2021-05-27 16:16:29 -0700
committergVisor bot <gvisor-bot@google.com>2021-05-27 16:19:00 -0700
commit121af37738525a629ecc11863b7454b67c0f4117 (patch)
tree16ab7bc5c0d2528482264f15f3daf524a38af866 /test/packetimpact/runner/defs.bzl
parent17df2df75ca092342a29694739d6fbe3bf95b770 (diff)
Support SO_BINDTODEVICE in ICMP sockets
Adds support for the SO_BINDTODEVICE socket option in ICMP sockets with an accompanying packetimpact test to exercise use of this socket option. Adds a unit test to exercise the NIC selection logic introduced by this change. The remaining unit tests for ICMP sockets need to be added in a subsequent CL. See https://gvisor.dev/issues/5623 for the list of remaining unit tests. Adds a "timeout" field to PacketimpactTestInfo, necessary due to the long runtime of the newly added packetimpact test. Fixes #5678 Fixes #4896 Updates #5623 Updates #5681 Updates #5763 Updates #5956 Updates #5966 Updates #5967 PiperOrigin-RevId: 376271581
Diffstat (limited to 'test/packetimpact/runner/defs.bzl')
-rw-r--r--test/packetimpact/runner/defs.bzl13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/packetimpact/runner/defs.bzl b/test/packetimpact/runner/defs.bzl
index afe73a69a..19f6cc0e0 100644
--- a/test/packetimpact/runner/defs.bzl
+++ b/test/packetimpact/runner/defs.bzl
@@ -115,7 +115,7 @@ def packetimpact_netstack_test(
**kwargs
)
-def packetimpact_go_test(name, expect_native_failure = False, expect_netstack_failure = False, num_duts = 1):
+def packetimpact_go_test(name, expect_native_failure = False, expect_netstack_failure = False, num_duts = 1, **kwargs):
"""Add packetimpact tests written in go.
Args:
@@ -123,6 +123,7 @@ def packetimpact_go_test(name, expect_native_failure = False, expect_netstack_fa
expect_native_failure: the test must fail natively
expect_netstack_failure: the test must fail for Netstack
num_duts: how many DUTs are needed for the test
+ **kwargs: all the other args, forwarded to packetimpact_native_test and packetimpact_netstack_test
"""
testbench_binary = name + "_test"
packetimpact_native_test(
@@ -130,12 +131,14 @@ def packetimpact_go_test(name, expect_native_failure = False, expect_netstack_fa
expect_failure = expect_native_failure,
num_duts = num_duts,
testbench_binary = testbench_binary,
+ **kwargs
)
packetimpact_netstack_test(
name = name,
expect_failure = expect_netstack_failure,
num_duts = num_duts,
testbench_binary = testbench_binary,
+ **kwargs
)
def packetimpact_testbench(name, size = "small", pure = True, **kwargs):
@@ -163,6 +166,7 @@ PacketimpactTestInfo = provider(
doc = "Provide information for packetimpact tests",
fields = [
"name",
+ "timeout",
"expect_netstack_failure",
"num_duts",
],
@@ -271,9 +275,6 @@ ALL_TESTS = [
num_duts = 3,
),
PacketimpactTestInfo(
- name = "udp_send_recv_dgram",
- ),
- PacketimpactTestInfo(
name = "tcp_linger",
),
PacketimpactTestInfo(
@@ -289,6 +290,10 @@ ALL_TESTS = [
PacketimpactTestInfo(
name = "tcp_fin_retransmission",
),
+ PacketimpactTestInfo(
+ name = "generic_dgram_socket_send_recv",
+ timeout = "long",
+ ),
]
def validate_all_tests():