summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/BUILD
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2020-02-04 15:20:30 -0800
committergVisor bot <gvisor-bot@google.com>2020-02-04 15:54:49 -0800
commita26a954946ad2e7910d3ad7578960a93b73a1f9b (patch)
treef87bd8ac57807d09cb0d2d861c09966bcb202820 /test/syscalls/linux/BUILD
parent3f5642c5afdb8e633287ba10c2cb6b00f1849570 (diff)
Add socket connection stress test.
Tests 65k connection attempts on common types of sockets to check for port leaks. Also fixes a bug where dual-stack sockets wouldn't properly re-queue segments received while closing. PiperOrigin-RevId: 293241166
Diffstat (limited to 'test/syscalls/linux/BUILD')
-rw-r--r--test/syscalls/linux/BUILD17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/syscalls/linux/BUILD b/test/syscalls/linux/BUILD
index 737e2329f..273b014d6 100644
--- a/test/syscalls/linux/BUILD
+++ b/test/syscalls/linux/BUILD
@@ -136,6 +136,7 @@ cc_library(
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/time",
+ "@com_google_absl//absl/types:optional",
"//test/util:file_descriptor",
"//test/util:posix_error",
"//test/util:temp_path",
@@ -2151,6 +2152,22 @@ cc_library(
alwayslink = 1,
)
+cc_binary(
+ name = "socket_stress_test",
+ testonly = 1,
+ srcs = [
+ "socket_generic_stress.cc",
+ ],
+ linkstatic = 1,
+ deps = [
+ ":ip_socket_test_util",
+ ":socket_test_util",
+ gtest,
+ "//test/util:test_main",
+ "//test/util:test_util",
+ ],
+)
+
cc_library(
name = "socket_unix_dgram_test_cases",
testonly = 1,