diff options
author | Micael Karlberg <[email protected]> | 2019-05-13 18:19:19 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-05-29 13:47:40 +0200 |
commit | 1b64482fb7900101de032fe319524ff1d6fd1b0f (patch) | |
tree | 572dba3fb9e445c3feb40e0bcd06300ea703a21e | |
parent | b73f63138bb4ea8c92148cb09f8569f9dcf63e9a (diff) | |
download | otp-1b64482fb7900101de032fe319524ff1d6fd1b0f.tar.gz otp-1b64482fb7900101de032fe319524ff1d6fd1b0f.tar.bz2 otp-1b64482fb7900101de032fe319524ff1d6fd1b0f.zip |
[esock|test] Add local close recvmsg test case for local (stream)
Add local close recvmsg response test case for Unix Domain
(stream) socket.
OTP-15822
-rw-r--r-- | erts/emulator/test/socket_SUITE.erl | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/erts/emulator/test/socket_SUITE.erl b/erts/emulator/test/socket_SUITE.erl index 12481d7043..becb50fc18 100644 --- a/erts/emulator/test/socket_SUITE.erl +++ b/erts/emulator/test/socket_SUITE.erl @@ -125,6 +125,7 @@ sc_lc_recvfrom_response_udp6/1, sc_lc_recvmsg_response_tcp4/1, sc_lc_recvmsg_response_tcp6/1, + sc_lc_recvmsg_response_tcpL/1, sc_lc_recvmsg_response_udp4/1, sc_lc_recvmsg_response_udp6/1, sc_lc_acceptor_response_tcp4/1, @@ -676,6 +677,7 @@ sc_lc_cases() -> sc_lc_recvmsg_response_tcp4, sc_lc_recvmsg_response_tcp6, + sc_lc_recvmsg_response_tcpL, sc_lc_recvmsg_response_udp4, sc_lc_recvmsg_response_udp6, @@ -5731,7 +5733,7 @@ sc_lc_recv_response_tcp6(_Config) when is_list(_Config) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% This test case is intended to test what happens when a socket is %% locally closed while the process is calling the recv function. -%% Socket is IPv6. +%% Socket is Unix Domain (stream) socket. sc_lc_recv_response_tcpL(suite) -> []; @@ -6814,7 +6816,6 @@ sc_lc_recvmsg_response_tcp4(_Config) when is_list(_Config) -> fun() -> Recv = fun(Sock) -> socket:recvmsg(Sock) end, InitState = #{domain => inet, - type => stream, protocol => tcp, recv => Recv}, ok = sc_lc_receive_response_tcp(InitState) @@ -6837,7 +6838,6 @@ sc_lc_recvmsg_response_tcp6(_Config) when is_list(_Config) -> fun() -> Recv = fun(Sock) -> socket:recvmsg(Sock) end, InitState = #{domain => inet6, - type => stream, protocol => tcp, recv => Recv}, ok = sc_lc_receive_response_tcp(InitState) @@ -6847,6 +6847,28 @@ sc_lc_recvmsg_response_tcp6(_Config) when is_list(_Config) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% This test case is intended to test what happens when a socket is %% locally closed while the process is calling the recvmsg function. +%% Socket is Unix Domain (stream) socket. + +sc_lc_recvmsg_response_tcpL(suite) -> + []; +sc_lc_recvmsg_response_tcpL(doc) -> + []; +sc_lc_recvmsg_response_tcpL(_Config) when is_list(_Config) -> + ?TT(?SECS(10)), + tc_try(sc_recvmsg_response_tcpL, + fun() -> has_support_unix_domain_socket() end, + fun() -> + Recv = fun(Sock) -> socket:recvmsg(Sock) end, + InitState = #{domain => local, + protocol => default, + recv => Recv}, + ok = sc_lc_receive_response_tcp(InitState) + end). + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This test case is intended to test what happens when a socket is +%% locally closed while the process is calling the recvmsg function. %% Socket is IPv4. sc_lc_recvmsg_response_udp4(suite) -> |