aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/process_SUITE.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2019-07-08 11:10:02 +0200
committerRickard Green <[email protected]>2019-07-08 11:10:02 +0200
commit2c49062e00375e90b3076bf707412303ed73e457 (patch)
tree1a6e1eb3bd9ae848b7fabc45e5da306e5498e611 /erts/emulator/test/process_SUITE.erl
parent7fe7fa3dde556b5b92522f8279d465bb52baf1f6 (diff)
parent18a5032e06eebbb6870489bd6d89d495175297ec (diff)
downloadotp-2c49062e00375e90b3076bf707412303ed73e457.tar.gz
otp-2c49062e00375e90b3076bf707412303ed73e457.tar.bz2
otp-2c49062e00375e90b3076bf707412303ed73e457.zip
Merge branch 'rickard/test-fixes-20' into rickard/test-fixes-21
* rickard/test-fixes-20: Fix unstable node_container_SUITE:magic_ref test Fix unstable node_container_SUITE:node_controller_refc test Fix unstable tests process_SUITE:no_priority_inversion{,2}
Diffstat (limited to 'erts/emulator/test/process_SUITE.erl')
-rw-r--r--erts/emulator/test/process_SUITE.erl27
1 files changed, 19 insertions, 8 deletions
diff --git a/erts/emulator/test/process_SUITE.erl b/erts/emulator/test/process_SUITE.erl
index 0cb0d6c1e2..82844551c0 100644
--- a/erts/emulator/test/process_SUITE.erl
+++ b/erts/emulator/test/process_SUITE.erl
@@ -2545,14 +2545,20 @@ garb_other_running(Config) when is_list(Config) ->
no_priority_inversion(Config) when is_list(Config) ->
Prio = process_flag(priority, max),
- HTLs = lists:map(fun (_) ->
+ Master = self(),
+ Executing = make_ref(),
+ HTLs = lists:map(fun (Sched) ->
spawn_opt(fun () ->
+ Master ! {self(), Executing},
tok_loop()
end,
- [{priority, high}, monitor, link])
+ [{priority, high},
+ {scheduler, Sched},
+ monitor,
+ link])
end,
- lists:seq(1, 2*erlang:system_info(schedulers))),
- receive after 500 -> ok end,
+ lists:seq(1, erlang:system_info(schedulers_online))),
+ lists:foreach(fun ({P, _}) -> receive {P,Executing} -> ok end end, HTLs),
LTL = spawn_opt(fun () ->
tok_loop()
end,
@@ -2574,14 +2580,19 @@ no_priority_inversion(Config) when is_list(Config) ->
no_priority_inversion2(Config) when is_list(Config) ->
Prio = process_flag(priority, max),
- MTLs = lists:map(fun (_) ->
+ Master = self(),
+ Executing = make_ref(),
+ MTLs = lists:map(fun (Sched) ->
spawn_opt(fun () ->
+ Master ! {self(), Executing},
tok_loop()
end,
- [{priority, max}, monitor, link])
+ [{priority, max},
+ {scheduler, Sched},
+ monitor, link])
end,
- lists:seq(1, 2*erlang:system_info(schedulers))),
- receive after 2000 -> ok end,
+ lists:seq(1, erlang:system_info(schedulers_online))),
+ lists:foreach(fun ({P, _}) -> receive {P,Executing} -> ok end end, MTLs),
{PL, ML} = spawn_opt(fun () ->
tok_loop()
end,