summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/BUILD
diff options
context:
space:
mode:
authorEtienne Perot <eperot@google.com>2021-06-22 17:51:10 -0700
committergVisor bot <gvisor-bot@google.com>2021-06-22 17:53:37 -0700
commit62efdf29d8231324b4004ded1ec8b978284f6f90 (patch)
tree2a7c0e902f0cca257737e4afd2600b5aff19c00b /test/syscalls/linux/BUILD
parente1dc1c78e7a523fc64ca28bed60a9a40ea1de46a (diff)
`socket_inet_loopback`: Split off tests that need isolation in their own file.
This allows these tests, which can cause flakiness when run in the same network namespace as the other `socket_inet_loopback` tests, to run as separate tests in their own environment. It also means that all of the shards of those tests can be more isolated from each other as well. PiperOrigin-RevId: 380930198
Diffstat (limited to 'test/syscalls/linux/BUILD')
-rw-r--r--test/syscalls/linux/BUILD30
1 files changed, 28 insertions, 2 deletions
diff --git a/test/syscalls/linux/BUILD b/test/syscalls/linux/BUILD
index d8b562e9d..112390569 100644
--- a/test/syscalls/linux/BUILD
+++ b/test/syscalls/linux/BUILD
@@ -9,6 +9,8 @@ exports_files(
[
"socket.cc",
"socket_inet_loopback.cc",
+ "socket_inet_loopback_isolated.cc",
+ "socket_inet_loopback_test_params.h",
"socket_ip_loopback_blocking.cc",
"socket_ip_tcp_generic_loopback.cc",
"socket_ip_tcp_loopback.cc",
@@ -3135,6 +3137,16 @@ cc_binary(
],
)
+cc_library(
+ name = "socket_inet_loopback_test_params",
+ testonly = 1,
+ hdrs = ["socket_inet_loopback_test_params.h"],
+ deps = [
+ ":socket_test_util",
+ gtest,
+ ],
+)
+
cc_binary(
name = "socket_inet_loopback_test",
testonly = 1,
@@ -3142,6 +3154,7 @@ cc_binary(
linkstatic = 1,
deps = [
":ip_socket_test_util",
+ ":socket_inet_loopback_test_params",
":socket_test_util",
"//test/util:file_descriptor",
"@com_google_absl//absl/memory",
@@ -3163,16 +3176,29 @@ cc_binary(
linkstatic = 1,
deps = [
":ip_socket_test_util",
+ ":socket_inet_loopback_test_params",
":socket_test_util",
"//test/util:file_descriptor",
- "@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
gtest,
"//test/util:posix_error",
"//test/util:save_util",
"//test/util:test_main",
"//test/util:test_util",
- "//test/util:thread_util",
+ ],
+)
+
+cc_binary(
+ name = "socket_inet_loopback_isolated_test",
+ testonly = 1,
+ srcs = ["socket_inet_loopback_isolated.cc"],
+ linkstatic = 1,
+ deps = [
+ ":socket_inet_loopback_test_params",
+ ":socket_test_util",
+ gtest,
+ "//test/util:test_main",
+ "@com_google_absl//absl/time",
],
)