summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicael Karlberg <bmk@erlang.org>2023-02-27 15:10:29 +0100
committerMicael Karlberg <bmk@erlang.org>2023-02-27 15:10:29 +0100
commit31d5f6c07d9a36796ad0d7eb094255adba7ba809 (patch)
tree2bd7ef9d3f59873c198d324e924f30b26b573989
parent4fd557c5f7bef4d4f733fd4ed178465c623ecb4d (diff)
parentd290c06b1580cb22181cd6dda7b647599f705b2b (diff)
downloaderlang-31d5f6c07d9a36796ad0d7eb094255adba7ba809.tar.gz
Merge branch 'bmk/kernel/20221208/test_tweaking' into maint
-rw-r--r--lib/kernel/test/gen_tcp_misc_SUITE.erl22
-rw-r--r--lib/kernel/test/socket_SUITE.erl11
2 files changed, 21 insertions, 12 deletions
diff --git a/lib/kernel/test/gen_tcp_misc_SUITE.erl b/lib/kernel/test/gen_tcp_misc_SUITE.erl
index c34a65616f..113e8175e6 100644
--- a/lib/kernel/test/gen_tcp_misc_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_misc_SUITE.erl
@@ -6057,6 +6057,21 @@ timeout_sink_loop(Action, To, N) ->
send_timeout_resume(Config) when is_list(Config) ->
ct:timetrap(?SECS(16)),
+ Cond = fun() ->
+ case ?IS_SOCKET_BACKEND(Config) of
+ true ->
+ {skip, "Unstable with 'socket' backend"};
+ false ->
+ Key = kernel_factor,
+ case lists:keysearch(Key, 1, Config) of
+ {value, {Key, Factor}} when (Factor > 6) ->
+ {skip,
+ ?F("Too slow (factor = ~w)", [Factor])};
+ _ ->
+ ok
+ end
+ end
+ end,
Pre = fun() ->
Dir = filename:dirname(code:which(?MODULE)),
?P("create node"),
@@ -6068,7 +6083,7 @@ send_timeout_resume(Config) when is_list(Config) ->
?P("stop node ~p", [Node]),
?STOP_NODE(Node)
end,
- ?TC_TRY(?FUNCTION_NAME, Pre, Case, Post).
+ ?TC_TRY(?FUNCTION_NAME, Cond, Pre, Case, Post).
do_send_timeout_resume(Config, RNode, BlockPow) ->
BlockSize = 1 bsl BlockPow,
@@ -6143,10 +6158,7 @@ do_send_timeout_resume(Config, RNode, BlockPow) ->
?P("count checked out"),
ok;
{Tag, ok, Count} when Count =:= N * BlockSize ->
- ?P("Unexpected number of timeouts, ~w, when"
- "~n Expected count: ~p"
- "~n Got count: ~p"
- "~n ", [Timeouts, N*BlockSize, Count]),
+ ?P("Unexpected number of timeouts: ~w", [Timeouts]),
ct:fail(Result);
{Tag, ok, Count} ->
?P("Unexpected counts: "
diff --git a/lib/kernel/test/socket_SUITE.erl b/lib/kernel/test/socket_SUITE.erl
index 3f4678c21b..673c905ddf 100644
--- a/lib/kernel/test/socket_SUITE.erl
+++ b/lib/kernel/test/socket_SUITE.erl
@@ -753,9 +753,6 @@
-define(START_NODE(NamePre, Timeout),
start_node(?CT_PEER_NAME(NamePre), Timeout)).
-%% -define(START_NODE(), ?CT_PEER(#{wait_boot => 5000})).
-%% -define(START_NODE(O), ?CT_PEER(O#{wait_boot => 5000})).
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -48837,8 +48834,8 @@ tc_which_name() ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-start_node(Name) ->
- start_node(Name, 5000).
+%% start_node(Name) ->
+%% start_node(Name, 5000).
start_node(Name, Timeout) when is_integer(Timeout) andalso (Timeout > 0) ->
try ?CT_PEER(#{name => Name, wait_boot => Timeout}) of
@@ -48848,7 +48845,7 @@ start_node(Name, Timeout) when is_integer(Timeout) andalso (Timeout > 0) ->
{error, Reason} ->
?SEV_EPRINT("failed starting node ~p (=> SKIP):"
"~n ~p", [Name, Reason]),
- throw({skip, Reason})
+ skip(Reason)
catch
Class:Reason:Stack ->
?SEV_EPRINT("Failed starting node: "
@@ -48856,7 +48853,7 @@ start_node(Name, Timeout) when is_integer(Timeout) andalso (Timeout > 0) ->
"~n Reason: ~p"
"~n Stack: ~p",
[Class, Reason, Stack]),
- throw({skip, {node_start, Class, Reason}})
+ skip({node_start, Class, Reason})
end.