aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/process_SUITE.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2019-07-11 17:18:51 +0200
committerErlang/OTP <[email protected]>2019-07-11 17:18:51 +0200
commitb4d3bd3f798f3be182f2d1195269cc761b7a27ad (patch)
tree4fea2a2e2588ee22ef54aab1ec34ea1f283d07e7 /erts/emulator/test/process_SUITE.erl
parentefddea245dae866b80c98a069cdeb4266d5ee4ab (diff)
parentf9648e8f4aab57411c6002815b1fde43185b29c2 (diff)
downloadotp-b4d3bd3f798f3be182f2d1195269cc761b7a27ad.tar.gz
otp-b4d3bd3f798f3be182f2d1195269cc761b7a27ad.tar.bz2
otp-b4d3bd3f798f3be182f2d1195269cc761b7a27ad.zip
Merge branch 'rickard/test-fixes-21' into maint-21
* rickard/test-fixes-21: Fix unstable test dump_SUITE:signal_abort 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 cef1b79035..4ed120e7a2 100644
--- a/erts/emulator/test/process_SUITE.erl
+++ b/erts/emulator/test/process_SUITE.erl
@@ -2589,14 +2589,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,
@@ -2618,14 +2624,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,