diff options
author | Rickard Green <[email protected]> | 2017-01-12 14:25:30 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-01-17 12:23:19 +0100 |
commit | fd1fb9070333fe5b91f4528841a4b0fe71bbf096 (patch) | |
tree | a747557f91df495d9f63657da62f3a666777ea14 /erts/emulator/test/scheduler_SUITE.erl | |
parent | bc2dd09390cb6876470093f1754db22ceb53d370 (diff) | |
download | otp-fd1fb9070333fe5b91f4528841a4b0fe71bbf096.tar.gz otp-fd1fb9070333fe5b91f4528841a4b0fe71bbf096.tar.bz2 otp-fd1fb9070333fe5b91f4528841a4b0fe71bbf096.zip |
Always return info from system_info(dirty_[cpu|io]_schedulers*)
Diffstat (limited to 'erts/emulator/test/scheduler_SUITE.erl')
-rw-r--r-- | erts/emulator/test/scheduler_SUITE.erl | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/erts/emulator/test/scheduler_SUITE.erl b/erts/emulator/test/scheduler_SUITE.erl index 3aee15a8fc..b178dede5b 100644 --- a/erts/emulator/test/scheduler_SUITE.erl +++ b/erts/emulator/test/scheduler_SUITE.erl @@ -1095,16 +1095,13 @@ scheduler_threads(Config) when is_list(Config) -> end. dirty_scheduler_threads(Config) when is_list(Config) -> - SmpSupport = erlang:system_info(smp_support), - try - erlang:system_info(dirty_cpu_schedulers), - dirty_scheduler_threads_test(Config, SmpSupport) - catch - error:badarg -> - {skipped, "No dirty scheduler support"} + case erlang:system_info(dirty_cpu_schedulers) of + 0 -> {skipped, "No dirty scheduler support"}; + _ -> dirty_scheduler_threads_test(Config) end. -dirty_scheduler_threads_test(Config, SmpSupport) -> +dirty_scheduler_threads_test(Config) -> + SmpSupport = erlang:system_info(smp_support), {Sched, SchedOnln, _} = get_dsstate(Config, ""), {HalfSched, HalfSchedOnln} = case SmpSupport of false -> {1,1}; @@ -1374,12 +1371,9 @@ sst2_loop(N) -> sst2_loop(N-1). sst3_loop(S, N) -> - try erlang:system_info(dirty_cpu_schedulers) of - DS -> - sst3_loop_with_dirty_schedulers(S, DS, N) - catch - error:badarg -> - sst3_loop_normal_schedulers_only(S, N) + case erlang:system_info(dirty_cpu_schedulers) of + 0 -> sst3_loop_normal_schedulers_only(S, N); + DS -> sst3_loop_with_dirty_schedulers(S, DS, N) end. sst3_loop_normal_schedulers_only(_S, 0) -> |