diff options
author | Sverker Eriksson <[email protected]> | 2017-04-03 15:51:13 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-04-03 17:02:41 +0200 |
commit | be959b91c655a5f7ab89034e285d17465f0912b1 (patch) | |
tree | b8a17c133c6d55f0829ee1a1ed0c81111f8fb0e6 /lib/stdlib/test/ets_SUITE.erl | |
parent | 5bc68d09c8eea8cdb1375e303a4b7132860254e4 (diff) | |
download | otp-be959b91c655a5f7ab89034e285d17465f0912b1.tar.gz otp-be959b91c655a5f7ab89034e285d17465f0912b1.tar.bz2 otp-be959b91c655a5f7ab89034e285d17465f0912b1.zip |
stdlib: Skip ets_SUITE:otp_9423 for single sched smp
Diffstat (limited to 'lib/stdlib/test/ets_SUITE.erl')
-rw-r--r-- | lib/stdlib/test/ets_SUITE.erl | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl index a7fe213f40..f11ad01c16 100644 --- a/lib/stdlib/test/ets_SUITE.erl +++ b/lib/stdlib/test/ets_SUITE.erl @@ -5891,17 +5891,21 @@ run_smp_workers(InitF,ExecF,FiniF,Laps) -> run_smp_workers(InitF,ExecF,FiniF,Laps, Exclude) -> case erlang:system_info(smp_support) of true -> - run_workers_do(InitF,ExecF,FiniF,Laps, Exclude); + case erlang:system_info(schedulers_online) of + N when N > Exclude -> + run_workers_do(InitF,ExecF,FiniF,Laps, N - Exclude); + _ -> + {skipped, "Too few schedulers online"} + end; false -> {skipped,"No smp support"} end. run_sched_workers(InitF,ExecF,FiniF,Laps) -> - run_workers_do(InitF,ExecF,FiniF,Laps, 0). -run_workers_do(InitF,ExecF,FiniF,Laps, Exclude) -> - NumOfProcs = case erlang:system_info(schedulers) of - N when (N > Exclude) -> N - Exclude - end, + run_workers_do(InitF,ExecF,FiniF,Laps, + erlang:system_info(schedulers)). + +run_workers_do(InitF,ExecF,FiniF,Laps, NumOfProcs) -> io:format("smp starting ~p workers\n",[NumOfProcs]), Seeds = [{ProcN,rand:uniform(9999)} || ProcN <- lists:seq(1,NumOfProcs)], Parent = self(), |