Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:27
erlang
1140-kernel-socket-test-Add-a-couple-of-traffic...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 1140-kernel-socket-test-Add-a-couple-of-traffic-sctp-test.patch of Package erlang
From b1aa49eff90a13c661c3d4ad7e0d580d8ff86bb6 Mon Sep 17 00:00:00 2001 From: Micael Karlberg <bmk@erlang.org> Date: Tue, 28 May 2024 15:25:10 +0200 Subject: [PATCH 10/10] [kernel|socket|test] Add a couple of traffic sctp test case(s) --- lib/kernel/test/socket_SUITE.erl | 245 ++++++++++++++++++++++++++++--- 1 file changed, 225 insertions(+), 20 deletions(-) diff --git a/lib/kernel/test/socket_SUITE.erl b/lib/kernel/test/socket_SUITE.erl index 712820fe0d..995cd50f37 100644 --- a/lib/kernel/test/socket_SUITE.erl +++ b/lib/kernel/test/socket_SUITE.erl @@ -424,12 +424,18 @@ traffic_ping_pong_small_sendmsg_and_recvmsg_tcp4/1, traffic_ping_pong_small_sendmsg_and_recvmsg_tcp6/1, traffic_ping_pong_small_sendmsg_and_recvmsg_tcpL/1, + traffic_ping_pong_small_sendmsg_and_recvmsg_sctp4/1, + traffic_ping_pong_small_sendmsg_and_recvmsg_sctp6/1, traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp4/1, traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp6/1, traffic_ping_pong_medium_sendmsg_and_recvmsg_tcpL/1, + traffic_ping_pong_medium_sendmsg_and_recvmsg_sctp4/1, + traffic_ping_pong_medium_sendmsg_and_recvmsg_sctp6/1, traffic_ping_pong_large_sendmsg_and_recvmsg_tcp4/1, traffic_ping_pong_large_sendmsg_and_recvmsg_tcp6/1, traffic_ping_pong_large_sendmsg_and_recvmsg_tcpL/1, + traffic_ping_pong_large_sendmsg_and_recvmsg_sctp4/1, + traffic_ping_pong_large_sendmsg_and_recvmsg_sctp6/1, traffic_ping_pong_small_sendmsg_and_recvmsg_udp4/1, traffic_ping_pong_small_sendmsg_and_recvmsg_udp6/1, @@ -1496,16 +1502,22 @@ traffic_pp_sendto_recvfrom_cases() -> ]. traffic_pp_sendmsg_recvmsg_cases() -> - [ + [ traffic_ping_pong_small_sendmsg_and_recvmsg_tcp4, traffic_ping_pong_small_sendmsg_and_recvmsg_tcp6, traffic_ping_pong_small_sendmsg_and_recvmsg_tcpL, + traffic_ping_pong_small_sendmsg_and_recvmsg_sctp4, + traffic_ping_pong_small_sendmsg_and_recvmsg_sctp6, traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp4, traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp6, traffic_ping_pong_medium_sendmsg_and_recvmsg_tcpL, + traffic_ping_pong_medium_sendmsg_and_recvmsg_sctp4, + traffic_ping_pong_medium_sendmsg_and_recvmsg_sctp6, traffic_ping_pong_large_sendmsg_and_recvmsg_tcp4, traffic_ping_pong_large_sendmsg_and_recvmsg_tcp6, traffic_ping_pong_large_sendmsg_and_recvmsg_tcpL, + traffic_ping_pong_large_sendmsg_and_recvmsg_sctp4, + traffic_ping_pong_large_sendmsg_and_recvmsg_sctp6, traffic_ping_pong_small_sendmsg_and_recvmsg_udp4, traffic_ping_pong_small_sendmsg_and_recvmsg_udp6, @@ -43500,7 +43512,8 @@ traffic_ping_pong_medium_sendto_and_recvfrom_udpL(Config) when is_list(Config) - %% small (8 bytes), medium (8K) and large (8M). %% 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 IPv4. +%% This is the 'small' message test case, +%% for TCP and IPv4. traffic_ping_pong_small_sendmsg_and_recvmsg_tcp4(Config) when is_list(Config) -> Msg = l2b(?TPP_SMALL), @@ -43527,12 +43540,13 @@ traffic_ping_pong_small_sendmsg_and_recvmsg_tcp4(Config) when is_list(Config) -> %% small (8 bytes), medium (8K) and large (8M). %% 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 IPv6. +%% This is the 'small' message test case, +%% for TCP and IPv6. traffic_ping_pong_small_sendmsg_and_recvmsg_tcp6(Config) when is_list(Config) -> Msg = l2b(?TPP_SMALL), Num = ?TPP_NUM(Config, ?TPP_SMALL_NUM), - tc_try(traffic_ping_pong_small_sendmsg_and_recvmsg_tcp6, + tc_try(?FUNCTION_NAME, fun() -> is_not_windows(), has_support_ipv6() @@ -43554,12 +43568,13 @@ traffic_ping_pong_small_sendmsg_and_recvmsg_tcp6(Config) when is_list(Config) -> %% small (8 bytes), medium (8K) and large (8M). %% 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 (stream) socket. +%% This is the 'small' message test case, +%% for TCP (default) and Unix Domain (stream) socket. traffic_ping_pong_small_sendmsg_and_recvmsg_tcpL(Config) when is_list(Config) -> Msg = l2b(?TPP_SMALL), Num = ?TPP_NUM(Config, ?TPP_SMALL_NUM), - tc_try(traffic_ping_pong_small_sendmsg_and_recvmsg_tcpL, + tc_try(?FUNCTION_NAME, fun() -> is_not_windows(), has_support_unix_domain_socket() @@ -43581,12 +43596,73 @@ traffic_ping_pong_small_sendmsg_and_recvmsg_tcpL(Config) when is_list(Config) -> %% small (8 bytes), medium (8K) and large (8M). %% 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 'medium' message test case, for IPv4. +%% This is the 'small' message test case, +%% for SCTP and IPv4. + +traffic_ping_pong_small_sendmsg_and_recvmsg_sctp4(Config) + when is_list(Config) -> + Msg = l2b(?TPP_SMALL), + Num = ?TPP_NUM(Config, ?TPP_SMALL_NUM), + tc_try(?FUNCTION_NAME, + fun() -> + is_not_windows(), + has_support_ipv4(), + has_support_sctp() + end, + fun() -> + ?TT(?SECS(20)), + InitState = #{domain => inet, + proto => sctp, + msg => Msg, + num => Num}, + ok = traffic_ping_pong_sendmsg_and_recvmsg_stream(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; +%% small (8 bytes), medium (8K) and large (8M). +%% 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 SCTP and IPv6. + +traffic_ping_pong_small_sendmsg_and_recvmsg_sctp6(Config) + when is_list(Config) -> + Msg = l2b(?TPP_SMALL), + Num = ?TPP_NUM(Config, ?TPP_SMALL_NUM), + tc_try(?FUNCTION_NAME, + fun() -> + is_not_windows(), + has_support_ipv6(), + has_support_sctp() + end, + fun() -> + ?TT(?SECS(20)), + InitState = #{domain => inet6, + proto => sctp, + msg => Msg, + num => Num}, + ok = traffic_ping_pong_sendmsg_and_recvmsg_stream(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; +%% small (8 bytes), medium (8K) and large (8M). +%% 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 'medium' message test case, +%% for TCP and IPv4. traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp4(Config) when is_list(Config) -> Msg = l2b(?TPP_MEDIUM), Num = ?TPP_NUM(Config, ?TPP_MEDIUM_NUM), - tc_try(traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp4, + tc_try(?FUNCTION_NAME, fun() -> is_not_windows(), has_support_ipv4() @@ -43608,12 +43684,14 @@ traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp4(Config) when is_list(Config) - %% small (8 bytes), medium (8K) and large (8M). %% 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 'medium' message test case, for IPv6. +%% This is the 'medium' message test case, +%% for TCP and IPv6. -traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp6(Config) when is_list(Config) -> +traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp6(Config) + when is_list(Config) -> Msg = l2b(?TPP_MEDIUM), Num = ?TPP_NUM(Config, ?TPP_MEDIUM_NUM), - tc_try(traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp6, + tc_try(?FUNCTION_NAME, fun() -> is_not_windows(), has_support_ipv6() @@ -43635,12 +43713,14 @@ traffic_ping_pong_medium_sendmsg_and_recvmsg_tcp6(Config) when is_list(Config) - %% small (8 bytes), medium (8K) and large (8M). %% 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 'medium' message test case, for Unix Domain (stream) socket. +%% This is the 'medium' message test case, +%% for TCP (default) and Unix Domain (stream) socket. -traffic_ping_pong_medium_sendmsg_and_recvmsg_tcpL(Config) when is_list(Config) -> +traffic_ping_pong_medium_sendmsg_and_recvmsg_tcpL(Config) + when is_list(Config) -> Msg = l2b(?TPP_MEDIUM), Num = ?TPP_NUM(Config, ?TPP_MEDIUM_NUM), - tc_try(traffic_ping_pong_medium_sendmsg_and_recvmsg_tcpL, + tc_try(?FUNCTION_NAME, fun() -> is_not_windows(), has_support_unix_domain_socket() @@ -43662,12 +43742,73 @@ traffic_ping_pong_medium_sendmsg_and_recvmsg_tcpL(Config) when is_list(Config) - %% small (8 bytes), medium (8K) and large (8M). %% 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 'large' message test case, for IPv4. +%% This is the 'medium' message test case, +%% for SCTP and IPv4. + +traffic_ping_pong_medium_sendmsg_and_recvmsg_sctp4(Config) + when is_list(Config) -> + Msg = l2b(?TPP_MEDIUM), + Num = ?TPP_NUM(Config, ?TPP_MEDIUM_NUM), + tc_try(?FUNCTION_NAME, + fun() -> + is_not_windows(), + has_support_ipv4(), + has_support_sctp() + end, + fun() -> + ?TT(?SECS(30)), + InitState = #{domain => inet, + proto => sctp, + msg => Msg, + num => Num}, + ok = traffic_ping_pong_sendmsg_and_recvmsg_stream(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; +%% small (8 bytes), medium (8K) and large (8M). +%% 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 'medium' message test case, +%% for SCTP and IPv4. + +traffic_ping_pong_medium_sendmsg_and_recvmsg_sctp6(Config) + when is_list(Config) -> + Msg = l2b(?TPP_MEDIUM), + Num = ?TPP_NUM(Config, ?TPP_MEDIUM_NUM), + tc_try(?FUNCTION_NAME, + fun() -> + is_not_windows(), + has_support_ipv6(), + has_support_sctp() + end, + fun() -> + ?TT(?SECS(30)), + InitState = #{domain => inet6, + proto => sctp, + msg => Msg, + num => Num}, + ok = traffic_ping_pong_sendmsg_and_recvmsg_stream(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; +%% small (8 bytes), medium (8K) and large (8M). +%% 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 'large' message test case, +%% for TCP and IPv4. traffic_ping_pong_large_sendmsg_and_recvmsg_tcp4(Config) when is_list(Config) -> Msg = l2b(?TPP_LARGE), Num = ?TPP_NUM(Config, ?TPP_LARGE_NUM), - tc_try(traffic_ping_pong_large_sendmsg_and_recvmsg_tcp4, + tc_try(?FUNCTION_NAME, fun() -> is_not_windows(), has_support_ipv4(), @@ -43700,12 +43841,13 @@ traffic_ping_pong_large_sendmsg_and_recvmsg_cond(_, _) -> %% small (8 bytes), medium (8K) and large (8M). %% 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 'large' message test case, for IPv6. +%% This is the 'large' message test case, +%% for TCP and IPv6. traffic_ping_pong_large_sendmsg_and_recvmsg_tcp6(Config) when is_list(Config) -> Msg = l2b(?TPP_LARGE), Num = ?TPP_NUM(Config, ?TPP_LARGE_NUM), - tc_try(traffic_ping_pong_large_sendmsg_and_recvmsg_tcp6, + tc_try(?FUNCTION_NAME, fun() -> is_not_windows(), has_support_ipv6(), @@ -43729,12 +43871,13 @@ traffic_ping_pong_large_sendmsg_and_recvmsg_tcp6(Config) when is_list(Config) -> %% small (8 bytes), medium (8K) and large (8M). %% 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 'large' message test case, for Unix Domain (stream) socket. +%% This is the 'large' message test case, +%% for TCP (default) and Unix Domain (stream) socket. traffic_ping_pong_large_sendmsg_and_recvmsg_tcpL(Config) when is_list(Config) -> Msg = l2b(?TPP_LARGE), Num = ?TPP_NUM(Config, ?TPP_LARGE_NUM), - tc_try(traffic_ping_pong_large_sendmsg_and_recvmsg_tcpL, + tc_try(?FUNCTION_NAME, fun() -> is_not_windows(), has_support_unix_domain_socket() @@ -43750,6 +43893,68 @@ traffic_ping_pong_large_sendmsg_and_recvmsg_tcpL(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), medium (8K) and large (8M). +%% 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 'large' message test case, +%% for SCTP and IPv4. + +traffic_ping_pong_large_sendmsg_and_recvmsg_sctp4(Config) + when is_list(Config) -> + Msg = l2b(?TPP_LARGE), + Num = ?TPP_NUM(Config, ?TPP_LARGE_NUM), + tc_try(?FUNCTION_NAME, + fun() -> + is_not_windows(), + has_support_ipv4(), + has_support_sctp(), + traffic_ping_pong_large_sendmsg_and_recvmsg_cond() + end, + fun() -> + ?TT(?SECS(60)), + InitState = #{domain => inet, + proto => sctp, + msg => Msg, + num => Num}, + ok = traffic_ping_pong_sendmsg_and_recvmsg_stream(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; +%% small (8 bytes), medium (8K) and large (8M). +%% 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 'large' message test case, +%% for SCTP and IPv6. + +traffic_ping_pong_large_sendmsg_and_recvmsg_sctp6(Config) + when is_list(Config) -> + Msg = l2b(?TPP_LARGE), + Num = ?TPP_NUM(Config, ?TPP_LARGE_NUM), + tc_try(?FUNCTION_NAME, + fun() -> + is_not_windows(), + has_support_ipv6(), + has_support_sctp(), + traffic_ping_pong_large_sendmsg_and_recvmsg_cond() + end, + fun() -> + ?TT(?SECS(60)), + InitState = #{domain => inet6, + proto => sctp, + msg => Msg, + num => Num}, + ok = traffic_ping_pong_sendmsg_and_recvmsg_stream(InitState) + end). + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% This test case is intended to test that the sendmsg and recvmsg %% functions by repeatedly sending a meassage between two entities. -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor