diff options
author | Micael Karlberg <[email protected]> | 2019-05-13 18:50:44 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-05-29 13:47:40 +0200 |
commit | b82fc1300ac999a56556ba75d8c28271bd10c1f2 (patch) | |
tree | 66ec5eed8900d1ca04e373a937bf53a458fc939d | |
parent | 3a5a0c972ef5843d6de226c39484ec0d3692462d (diff) | |
download | otp-b82fc1300ac999a56556ba75d8c28271bd10c1f2.tar.gz otp-b82fc1300ac999a56556ba75d8c28271bd10c1f2.tar.bz2 otp-b82fc1300ac999a56556ba75d8c28271bd10c1f2.zip |
[esock|test] Add local close recvmsg test case for local (dgram)
Add local close recvmsg response test case for Unix Domain
(dgram) socket.
OTP-15822
-rw-r--r-- | erts/emulator/test/socket_SUITE.erl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/erts/emulator/test/socket_SUITE.erl b/erts/emulator/test/socket_SUITE.erl index 1a8243db38..b8c3620224 100644 --- a/erts/emulator/test/socket_SUITE.erl +++ b/erts/emulator/test/socket_SUITE.erl @@ -129,6 +129,7 @@ sc_lc_recvmsg_response_tcpL/1, sc_lc_recvmsg_response_udp4/1, sc_lc_recvmsg_response_udp6/1, + sc_lc_recvmsg_response_udpL/1, sc_lc_acceptor_response_tcp4/1, sc_lc_acceptor_response_tcp6/1, @@ -682,6 +683,7 @@ sc_lc_cases() -> sc_lc_recvmsg_response_tcpL, sc_lc_recvmsg_response_udp4, sc_lc_recvmsg_response_udp6, + sc_lc_recvmsg_response_udpL, sc_lc_acceptor_response_tcp4, sc_lc_acceptor_response_tcp6 @@ -6949,6 +6951,29 @@ sc_lc_recvmsg_response_udp6(_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 (dgram) socket. + +sc_lc_recvmsg_response_udpL(suite) -> + []; +sc_lc_recvmsg_response_udpL(doc) -> + []; +sc_lc_recvmsg_response_udpL(_Config) when is_list(_Config) -> + ?TT(?SECS(10)), + tc_try(sc_recvmsg_response_udpL, + fun() -> has_support_unix_domain_socket() end, + fun() -> + Recv = fun(Sock, To) -> socket:recvmsg(Sock, To) end, + InitState = #{domain => local, + protocol => default, + recv => Recv}, + ok = sc_lc_receive_response_udp(InitState) + end). + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This test case is intended to test what happens when a socket is %% locally closed while the process is calling the accept function. %% We test what happens with a non-controlling_process also, since we %% git the setup anyway. |