diff options
author | Micael Karlberg <[email protected]> | 2019-05-14 17:26:54 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-05-29 13:47:40 +0200 |
commit | 0d551df1a44c3497d5d2ccf32a5d85ec06d9d088 (patch) | |
tree | 53f17b8130b67c1bb26f2f5d43e01ed08b745a9c /erts/emulator/test/socket_SUITE.erl | |
parent | 0c0566e88953f35f844439b5f86e7e7d330559cb (diff) | |
download | otp-0d551df1a44c3497d5d2ccf32a5d85ec06d9d088.tar.gz otp-0d551df1a44c3497d5d2ccf32a5d85ec06d9d088.tar.bz2 otp-0d551df1a44c3497d5d2ccf32a5d85ec06d9d088.zip |
[esock|test] Add sendmsg/recvmsg small ping-pong test case for local (dgram)
Add a sendmsg and recvmsg small ping-pong test case for
Unix Domain (dgram) socket.
OTP-15822
Diffstat (limited to 'erts/emulator/test/socket_SUITE.erl')
-rw-r--r-- | erts/emulator/test/socket_SUITE.erl | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/erts/emulator/test/socket_SUITE.erl b/erts/emulator/test/socket_SUITE.erl index b2159af5af..d08833017c 100644 --- a/erts/emulator/test/socket_SUITE.erl +++ b/erts/emulator/test/socket_SUITE.erl @@ -182,6 +182,7 @@ traffic_ping_pong_small_sendmsg_and_recvmsg_udp4/1, traffic_ping_pong_small_sendmsg_and_recvmsg_udp6/1, + traffic_ping_pong_small_sendmsg_and_recvmsg_udpL/1, traffic_ping_pong_medium_sendmsg_and_recvmsg_udp4/1, traffic_ping_pong_medium_sendmsg_and_recvmsg_udp6/1, @@ -765,6 +766,7 @@ traffic_cases() -> traffic_ping_pong_small_sendmsg_and_recvmsg_udp4, traffic_ping_pong_small_sendmsg_and_recvmsg_udp6, + traffic_ping_pong_small_sendmsg_and_recvmsg_udpL, traffic_ping_pong_medium_sendmsg_and_recvmsg_udp4, traffic_ping_pong_medium_sendmsg_and_recvmsg_udp6 ]. @@ -11331,7 +11333,7 @@ traffic_ping_pong_small_sendmsg_and_recvmsg_udp6(_Config) when is_list(_Config) fun() -> has_support_ipv6() end, fun() -> ?TT(?SECS(30)), - InitState = #{domain => inet, + InitState = #{domain => inet6, proto => udp, msg => Msg, num => Num}, @@ -11340,6 +11342,34 @@ traffic_ping_pong_small_sendmsg_and_recvmsg_udp6(_Config) when is_list(_Config) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% This test case is intended to test that the sendmsg and recvmsg functions +%% by repeatedly sending a meassage between two entities. +%% The same basic test case is used for three different message sizes; +%% small (8 bytes) and medium (8K). +%% The message is sent from A to B and then back again. This is +%% repeated a set number of times (more times the small the message). +%% This is the 'small' message test case, for Unix Domain (dgram) socket. + +traffic_ping_pong_small_sendmsg_and_recvmsg_udpL(suite) -> + []; +traffic_ping_pong_small_sendmsg_and_recvmsg_udpL(doc) -> + []; +traffic_ping_pong_small_sendmsg_and_recvmsg_udpL(_Config) when is_list(_Config) -> + Msg = l2b(?TPP_SMALL), + Num = ?TPP_SMALL_NUM, + tc_try(traffic_ping_pong_small_sendmsg_and_recvmsg_udpL, + fun() -> has_support_unix_domain_socket() end, + fun() -> + ?TT(?SECS(30)), + InitState = #{domain => local, + proto => default, + msg => Msg, + num => Num}, + ok = traffic_ping_pong_sendmsg_and_recvmsg_udp(InitState) + end). + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% This test case is intended to test that the sendmsg and recvmsg %% functions by repeatedly sending a meassage between two entities. %% The same basic test case is used for three different message sizes; |