diff options
Diffstat (limited to 'lib/kernel/test/global_SUITE.erl')
-rw-r--r-- | lib/kernel/test/global_SUITE.erl | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/lib/kernel/test/global_SUITE.erl b/lib/kernel/test/global_SUITE.erl index 5bff9cc292..22db756d97 100644 --- a/lib/kernel/test/global_SUITE.erl +++ b/lib/kernel/test/global_SUITE.erl @@ -43,7 +43,7 @@ -export([global_load/3, lock_global/2, lock_global2/2]). -export([]). --export([mass_spawn/1]). +-export([init_mass_spawn/1]). -export([start_tracer/0, stop_tracer/0, get_trace/0]). @@ -3738,13 +3738,17 @@ start_node(Name, How, Config) -> start_node(Name0, How, Args, Config) -> Name = node_name(Name0, Config), Pa = filename:dirname(code:which(?MODULE)), - R = test_server:start_node(Name, How, [{args, - Args ++ " " ++ - "-kernel net_setuptime 100 " - %% "-noshell " - "-pa " ++ Pa}, - {linked, false} - ]), + R = test_server:start_node( + Name, How, [{args, + Args ++ + " -kernel net_setuptime 100 " ++ + %% Limit the amount of threads so that we + %% don't run into the maximum allowed + " +S 1 +SDio 1 " ++ + %% "-noshell " + "-pa " ++ Pa}, + {linked, false} + ]), %% {linked,false} only seems to work for slave nodes. %% ct:sleep(1000), record_started_node(R). @@ -3761,12 +3765,16 @@ start_node_rel(Name0, Rel, Config) -> end, Env = [], Pa = filename:dirname(code:which(?MODULE)), - Res = test_server:start_node(Name, peer, - [{args, - Compat ++ - " -kernel net_setuptime 100 " - " -pa " ++ Pa}, - {erl, Release}] ++ Env), + Res = test_server:start_node( + Name, peer, + [{args, + Compat ++ + " -kernel net_setuptime 100 " ++ + %% Limit the amount of threads so that we + %% don't run into the maximum allowed + " +S 1 +SDio 1 " ++ + "-pa " ++ Pa}, + {erl, Release}] ++ Env), record_started_node(Res). record_started_node({ok, Node}) -> @@ -3887,7 +3895,7 @@ mass_death(Config) when is_list(Config) -> io:format("Nodes: ~p~n", [Nodes]), Ns = lists:seq(1, 40), %% Start processes with globally registered names on the nodes - {Pids,[]} = rpc:multicall(Nodes, ?MODULE, mass_spawn, [Ns]), + {Pids,[]} = rpc:multicall(Nodes, ?MODULE, init_mass_spawn, [Ns]), io:format("Pids: ~p~n", [Pids]), %% Wait... ct:sleep(10000), @@ -3924,6 +3932,11 @@ wait_mass_death(Nodes, OrigNames, Then, Config) -> wait_mass_death(Nodes, OrigNames, Then, Config) end. +init_mass_spawn(N) -> + Pid = mass_spawn(N), + unlink(Pid), + Pid. + mass_spawn([]) -> ok; mass_spawn([N|T]) -> @@ -3937,7 +3950,10 @@ mass_spawn([N|T]) -> Parent ! self(), loop() end), - receive Pid -> Pid end. + receive + Pid -> + Pid + end. mass_names([], _) -> []; |