diff options
author | Lukas Larsson <[email protected]> | 2019-06-28 10:48:43 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2019-06-28 10:48:43 +0200 |
commit | c29006892cdddd95f32a7b6fc41eb3d8065c0f39 (patch) | |
tree | 5795e9d5f0bec9333b6c8d458149420efdae4834 /erts/emulator/test/dump_SUITE.erl | |
parent | 42ab20bfe6cfaf7e08b97ba0fbfffa86da6dc821 (diff) | |
parent | b942df8593b6295e61eb767008d6e93a2cc34665 (diff) | |
download | otp-c29006892cdddd95f32a7b6fc41eb3d8065c0f39.tar.gz otp-c29006892cdddd95f32a7b6fc41eb3d8065c0f39.tar.bz2 otp-c29006892cdddd95f32a7b6fc41eb3d8065c0f39.zip |
Merge branch 'lukas/erts/cleanup_scheduler_start' into maint
* lukas/erts/cleanup_scheduler_start:
erts: Reduce test time for multi_load in valgrind
erts: Randomize valgrind taskset CPU
erts: Make dump_SUITE:free_dump tc more robust to different systems
erts: Fix distr SUITE latency testcases
erts: Fix gc disable when terminating process
erts: Cleanup start of all erts threads to ABORT when failing
Diffstat (limited to 'erts/emulator/test/dump_SUITE.erl')
-rw-r--r-- | erts/emulator/test/dump_SUITE.erl | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/erts/emulator/test/dump_SUITE.erl b/erts/emulator/test/dump_SUITE.erl index 9f8ac42fa9..b7da69e556 100644 --- a/erts/emulator/test/dump_SUITE.erl +++ b/erts/emulator/test/dump_SUITE.erl @@ -140,13 +140,13 @@ free_dump(Config) when is_list(Config) -> {ok, NodeA} = start_node(Config), {ok, NodeB} = start_node(Config), - Self = self(), PidA = spawn_link( NodeA, fun() -> Self ! ready, + Reason = lists:duplicate(1000000,100), receive ok -> spawn(fun() -> @@ -154,24 +154,29 @@ free_dump(Config) when is_list(Config) -> timer:sleep(5), receive M -> - io:format("~p",[M]), - erlang:halt("dump") - end + io:format("~p",[M]) +%% We may want to add this timeout here in-case no busy condition is triggered +%% after 60 * 1000 -> +%% io:format("Timeout") + end, + erlang:halt("dump") end), - exit(lists:duplicate(1000000,100)) + exit(Reason) end end), - spawn_link(NodeB, - fun() -> - [erlang:monitor(process, PidA) || _ <- lists:seq(1,10000)], - Self ! done, - receive _ -> ok end - end), + PidB = spawn_link(NodeB, + fun() -> + [erlang:monitor(process, PidA) || _ <- lists:seq(1,10000)], + Self ! done, + receive _ -> ok end + end), receive done -> ok end, true = rpc:call(NodeA, os, putenv, ["ERL_CRASH_DUMP",Dump]), - ct:pal("~p",[rpc:call(NodeA, distribution_SUITE, make_busy, [NodeB, 1000])]), + %% Make the node busy towards NodeB for 10 seconds. + BusyPid = rpc:call(NodeA, distribution_SUITE, make_busy, [NodeB,10000]), + ct:pal("~p",[BusyPid]), receive ready -> unlink(PidA), PidA ! ok end, @@ -185,6 +190,10 @@ free_dump(Config) when is_list(Config) -> file:delete(Dump), + unlink(PidB), + + rpc:call(NodeB, erlang, halt, [0]), + ok. |