summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Larsson <lukas@erlang.org>2020-05-08 14:13:27 +0200
committerLukas Larsson <lukas@erlang.org>2020-05-08 14:13:27 +0200
commit7f6de9057abb6004cd93f51ec4d8a006dacba8b3 (patch)
tree7102a484a5438f9c30f0fbfe436c70eda04b88db
parentf11b138786252dfbe48072852074bd5fd20ad0fa (diff)
parentb4d2bfffdac00812dc31540e33afa8728fff3f46 (diff)
downloaderlang-7f6de9057abb6004cd93f51ec4d8a006dacba8b3.tar.gz
Merge branch 'lukas/23/fixes'
* lukas/23/fixes: Use schedulers_online when creating bound processes kernel: Fix boot srv test on ubuntu
-rw-r--r--erts/emulator/test/alloc_SUITE.erl2
-rw-r--r--erts/emulator/test/counters_SUITE.erl6
-rw-r--r--erts/emulator/test/process_SUITE.erl2
-rw-r--r--erts/emulator/test/receive_SUITE.erl2
-rw-r--r--lib/kernel/test/erl_boot_server_SUITE.erl14
5 files changed, 13 insertions, 13 deletions
diff --git a/erts/emulator/test/alloc_SUITE.erl b/erts/emulator/test/alloc_SUITE.erl
index 24677247a7..8288da9f61 100644
--- a/erts/emulator/test/alloc_SUITE.erl
+++ b/erts/emulator/test/alloc_SUITE.erl
@@ -370,7 +370,7 @@ many_shot(CaseName, I, Mem) ->
Result1.
concurrent(CaseName) ->
- NSched = erlang:system_info(schedulers),
+ NSched = erlang:system_info(schedulers_online),
Mem = (free_memory() * 3) div 4,
PRs = lists:map(fun(I) -> spawn_opt(fun() ->
many_shot(CaseName, I,
diff --git a/erts/emulator/test/counters_SUITE.erl b/erts/emulator/test/counters_SUITE.erl
index b3f0358c1e..7ddb574b36 100644
--- a/erts/emulator/test/counters_SUITE.erl
+++ b/erts/emulator/test/counters_SUITE.erl
@@ -66,7 +66,7 @@ check_memory(atomics, Memory, Size) ->
{_,true} = {Memory, Memory > Size*8},
{_,true} = {Memory, Memory < Size*max_atomic_sz() + 100};
check_memory(write_concurrency, Memory, Size) ->
- NWords = erlang:system_info(schedulers) + 1,
+ NWords = erlang:system_info(schedulers_online) + 1,
{_,true} = {Memory, Memory > NWords*Size*8},
{_,true} = {Memory, Memory < NWords*(Size+7)*max_atomic_sz() + 100}.
@@ -130,7 +130,7 @@ limits_do(Ref) ->
%% Verify that independent workers, using different counters
%% within the same array, do not interfere with each other.
indep(Config) when is_list(Config) ->
- NScheds = erlang:system_info(schedulers),
+ NScheds = erlang:system_info(schedulers_online),
Ref = counters:new(NScheds,[write_concurrency]),
Rounds = 100,
Papa = self(),
@@ -182,7 +182,7 @@ indep_subber(_Ref, _I, Val) ->
write_concurrency(Config) when is_list(Config) ->
rand:seed(exs1024s),
io:format("*** SEED: ~p ***\n", [rand:export_seed()]),
- NScheds = erlang:system_info(schedulers),
+ NScheds = erlang:system_info(schedulers_online),
Size = 100,
Ref = counters:new(Size,[write_concurrency]),
Rounds = 1000,
diff --git a/erts/emulator/test/process_SUITE.erl b/erts/emulator/test/process_SUITE.erl
index 7b83857311..e8d5845df6 100644
--- a/erts/emulator/test/process_SUITE.erl
+++ b/erts/emulator/test/process_SUITE.erl
@@ -1128,7 +1128,7 @@ process_info_status_handled_signal(Config) when is_list(Config) ->
%% And a bug where process_info(reductions) on a process which was releasing its
%% main lock during execution could result in negative reduction diffs.
process_info_reductions(Config) when is_list(Config) ->
- {S1, S2} = case erlang:system_info(schedulers) of
+ {S1, S2} = case erlang:system_info(schedulers_online) of
1 -> {1,1};
_ -> {1,2}
end,
diff --git a/erts/emulator/test/receive_SUITE.erl b/erts/emulator/test/receive_SUITE.erl
index 339507c9d8..333ca6a02a 100644
--- a/erts/emulator/test/receive_SUITE.erl
+++ b/erts/emulator/test/receive_SUITE.erl
@@ -43,7 +43,7 @@ all() ->
erl_1199].
init_per_testcase(receive_opt_deferred_save, Config) ->
- case erlang:system_info(schedulers) of
+ case erlang:system_info(schedulers_online) of
1 ->
{skip, "Needs more schedulers to run"};
_ ->
diff --git a/lib/kernel/test/erl_boot_server_SUITE.erl b/lib/kernel/test/erl_boot_server_SUITE.erl
index 1eaa2cf500..491176678a 100644
--- a/lib/kernel/test/erl_boot_server_SUITE.erl
+++ b/lib/kernel/test/erl_boot_server_SUITE.erl
@@ -238,7 +238,7 @@ responses(Config) when is_list(Config) ->
{ok,BootPid} = erl_boot_server:start_link([Host]),
%% Send junk
- S1 = open_udp(),
+ S1 = open_udp(Ip),
prim_inet:sendto(S1, Ip, EBOOT_PORT, ["0"]),
receive
What ->
@@ -249,10 +249,10 @@ responses(Config) when is_list(Config) ->
end,
%% Req from a slave with same erlang vsn.
- S2 = open_udp(),
+ S2 = open_udp(Ip),
prim_inet:sendto(S2, Ip, EBOOT_PORT, [EBOOT_REQUEST,ThisVer]),
receive
- {udp,S2,Ip,_Port1,Resp1} ->
+ {udp,S2,_Ip,_Port1,Resp1} ->
close_udp(S2),
EBOOT_REPLY = string:substr(Resp1, 1, length(EBOOT_REPLY)),
Rest1 = string:substr(Resp1, length(EBOOT_REPLY)+1, length(Resp1)),
@@ -263,7 +263,7 @@ responses(Config) when is_list(Config) ->
end,
%% Req from a slave with other erlang vsn.
- S3 = open_udp(),
+ S3 = open_udp(Ip),
prim_inet:sendto(S3, Ip, EBOOT_PORT, [EBOOT_REQUEST,"1.0"]),
receive
Anything ->
@@ -284,7 +284,7 @@ responses(Config) when is_list(Config) ->
{ok,BootPid2} = erl_boot_server:start_link(["127.0.0.1"]),
%% Req from slave with invalid ip address.
- S4 = open_udp(),
+ S4 = open_udp(Ip),
Ret =
case Ip of
{127,0,0,1} ->
@@ -336,11 +336,11 @@ good_hosts(_Config) ->
GoodHost3 = "sauron",
[GoodHost1, GoodHost2, GoodHost3].
-open_udp() ->
+open_udp(Ip) ->
{ok, S} = prim_inet:open(udp, inet, dgram),
ok = prim_inet:setopts(S, [{mode,list},{active,true},
{deliver,term},{broadcast,true}]),
- {ok,_} = prim_inet:bind(S, {0,0,0,0}, 0),
+ {ok,_} = prim_inet:bind(S, Ip, 0),
S.
close_udp(S) ->