Skip to content

Commit

Permalink
Fix scheduler_suspend test when schedulers online isn't equal to the …
Browse files Browse the repository at this point in the history
…amount of schedulers
  • Loading branch information
rickard-green authored and Erlang/OTP committed Jun 4, 2010
1 parent 47c90a1 commit 5c1f9b3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion erts/emulator/test/scheduler_SUITE.erl
Expand Up @@ -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]),
Expand All @@ -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),
Expand Down

0 comments on commit 5c1f9b3

Please sign in to comment.