diff options
author | Ian Gudger <igudger@google.com> | 2020-02-04 15:20:30 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-04 15:54:49 -0800 |
commit | a26a954946ad2e7910d3ad7578960a93b73a1f9b (patch) | |
tree | f87bd8ac57807d09cb0d2d861c09966bcb202820 /test/syscalls/linux/socket_test_util.h | |
parent | 3f5642c5afdb8e633287ba10c2cb6b00f1849570 (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/socket_test_util.h')
-rw-r--r-- | test/syscalls/linux/socket_test_util.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/syscalls/linux/socket_test_util.h b/test/syscalls/linux/socket_test_util.h index 2dbb8bed3..bfaa6e397 100644 --- a/test/syscalls/linux/socket_test_util.h +++ b/test/syscalls/linux/socket_test_util.h @@ -273,6 +273,12 @@ Creator<SocketPair> TCPAcceptBindSocketPairCreator(int domain, int type, int protocol, bool dual_stack); +// TCPAcceptBindPersistentListenerSocketPairCreator is like +// TCPAcceptBindSocketPairCreator, except it uses the same listening socket to +// create all SocketPairs. +Creator<SocketPair> TCPAcceptBindPersistentListenerSocketPairCreator( + int domain, int type, int protocol, bool dual_stack); + // UDPBidirectionalBindSocketPairCreator returns a Creator<SocketPair> that // obtains file descriptors by invoking the bind() and connect() syscalls on UDP // sockets. |