diff options
author | Rickard Green <[email protected]> | 2010-06-04 08:21:16 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-06-04 08:21:16 +0000 |
commit | 5c1f9b342c3569b37b674b8671fb243782af4aa0 (patch) | |
tree | 08d3bf427d21aa6327ee3a3ddf9b45c813f83515 /erts/emulator | |
parent | 47c90a12f5410a9d07c3fd1d545d9d5e50644bfb (diff) | |
download | otp-5c1f9b342c3569b37b674b8671fb243782af4aa0.tar.gz otp-5c1f9b342c3569b37b674b8671fb243782af4aa0.tar.bz2 otp-5c1f9b342c3569b37b674b8671fb243782af4aa0.zip |
Fix scheduler_suspend test when schedulers online isn't equal to the amount of schedulers
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/test/scheduler_SUITE.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/erts/emulator/test/scheduler_SUITE.erl b/erts/emulator/test/scheduler_SUITE.erl index c9101b77c2..ab727b7cb1 100644 --- a/erts/emulator/test/scheduler_SUITE.erl +++ b/erts/emulator/test/scheduler_SUITE.erl @@ -902,7 +902,8 @@ scheduler_suspend_test(Config, Schedulers) -> ?line [SState] = mcall(Node, [fun () -> erlang:system_info(schedulers_state) end]), - ?line {Sched, _, _} = SState, + ?line ?t:format("SState=~p~n", [SState]), + ?line {Sched, SchedOnln, _SchedAvail} = SState, ?line true = is_integer(Sched), ?line [ok] = mcall(Node, [fun () -> sst0_loop(300) end]), ?line [ok] = mcall(Node, [fun () -> sst1_loop(300) end]), @@ -914,6 +915,14 @@ scheduler_suspend_test(Config, Schedulers) -> fun () -> sst2_loop(200) end, fun () -> sst3_loop(Sched, 200) end]), ?line [SState] = mcall(Node, [fun () -> + case Sched == SchedOnln of + false -> + Sched = erlang:system_flag( + schedulers_online, + SchedOnln); + true -> + ok + end, erlang:system_info(schedulers_state) end]), ?line stop_node(Node), |