Skip to content

Commit 31d5f6c

Browse files
committed
Merge branch 'bmk/kernel/20221208/test_tweaking' into maint
2 parents 4fd557c + d290c06 commit 31d5f6c

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

lib/kernel/test/gen_tcp_misc_SUITE.erl

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6057,6 +6057,21 @@ timeout_sink_loop(Action, To, N) ->
60576057

60586058
send_timeout_resume(Config) when is_list(Config) ->
60596059
ct:timetrap(?SECS(16)),
6060+
Cond = fun() ->
6061+
case ?IS_SOCKET_BACKEND(Config) of
6062+
true ->
6063+
{skip, "Unstable with 'socket' backend"};
6064+
false ->
6065+
Key = kernel_factor,
6066+
case lists:keysearch(Key, 1, Config) of
6067+
{value, {Key, Factor}} when (Factor > 6) ->
6068+
{skip,
6069+
?F("Too slow (factor = ~w)", [Factor])};
6070+
_ ->
6071+
ok
6072+
end
6073+
end
6074+
end,
60606075
Pre = fun() ->
60616076
Dir = filename:dirname(code:which(?MODULE)),
60626077
?P("create node"),
@@ -6068,7 +6083,7 @@ send_timeout_resume(Config) when is_list(Config) ->
60686083
?P("stop node ~p", [Node]),
60696084
?STOP_NODE(Node)
60706085
end,
6071-
?TC_TRY(?FUNCTION_NAME, Pre, Case, Post).
6086+
?TC_TRY(?FUNCTION_NAME, Cond, Pre, Case, Post).
60726087

60736088
do_send_timeout_resume(Config, RNode, BlockPow) ->
60746089
BlockSize = 1 bsl BlockPow,
@@ -6143,10 +6158,7 @@ do_send_timeout_resume(Config, RNode, BlockPow) ->
61436158
?P("count checked out"),
61446159
ok;
61456160
{Tag, ok, Count} when Count =:= N * BlockSize ->
6146-
?P("Unexpected number of timeouts, ~w, when"
6147-
"~n Expected count: ~p"
6148-
"~n Got count: ~p"
6149-
"~n ", [Timeouts, N*BlockSize, Count]),
6161+
?P("Unexpected number of timeouts: ~w", [Timeouts]),
61506162
ct:fail(Result);
61516163
{Tag, ok, Count} ->
61526164
?P("Unexpected counts: "

lib/kernel/test/socket_SUITE.erl

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -753,9 +753,6 @@
753753
-define(START_NODE(NamePre, Timeout),
754754
start_node(?CT_PEER_NAME(NamePre), Timeout)).
755755

756-
%% -define(START_NODE(), ?CT_PEER(#{wait_boot => 5000})).
757-
%% -define(START_NODE(O), ?CT_PEER(O#{wait_boot => 5000})).
758-
759756

760757
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
761758

@@ -48837,8 +48834,8 @@ tc_which_name() ->
4883748834

4883848835
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4883948836

48840-
start_node(Name) ->
48841-
start_node(Name, 5000).
48837+
%% start_node(Name) ->
48838+
%% start_node(Name, 5000).
4884248839

4884348840
start_node(Name, Timeout) when is_integer(Timeout) andalso (Timeout > 0) ->
4884448841
try ?CT_PEER(#{name => Name, wait_boot => Timeout}) of
@@ -48848,15 +48845,15 @@ start_node(Name, Timeout) when is_integer(Timeout) andalso (Timeout > 0) ->
4884848845
{error, Reason} ->
4884948846
?SEV_EPRINT("failed starting node ~p (=> SKIP):"
4885048847
"~n ~p", [Name, Reason]),
48851-
throw({skip, Reason})
48848+
skip(Reason)
4885248849
catch
4885348850
Class:Reason:Stack ->
4885448851
?SEV_EPRINT("Failed starting node: "
4885548852
"~n Class: ~p"
4885648853
"~n Reason: ~p"
4885748854
"~n Stack: ~p",
4885848855
[Class, Reason, Stack]),
48859-
throw({skip, {node_start, Class, Reason}})
48856+
skip({node_start, Class, Reason})
4886048857
end.
4886148858

4886248859

0 commit comments

Comments
 (0)