diff options
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/bs_construct_SUITE.erl | 20 | ||||
-rw-r--r-- | erts/emulator/test/distribution_SUITE.erl | 20 | ||||
-rw-r--r-- | erts/emulator/test/process_SUITE.erl | 5 | ||||
-rw-r--r-- | erts/emulator/test/trace_call_time_SUITE.erl | 4 |
4 files changed, 38 insertions, 11 deletions
diff --git a/erts/emulator/test/bs_construct_SUITE.erl b/erts/emulator/test/bs_construct_SUITE.erl index 22a1c0b765..95042ac802 100644 --- a/erts/emulator/test/bs_construct_SUITE.erl +++ b/erts/emulator/test/bs_construct_SUITE.erl @@ -23,6 +23,7 @@ -module(bs_construct_SUITE). -export([all/0, suite/0, + init_per_suite/1, end_per_suite/1, test1/1, test2/1, test3/1, test4/1, test5/1, testf/1, not_used/1, in_guard/1, mem_leak/1, coerce_to_float/1, bjorn/1, @@ -43,6 +44,12 @@ all() -> copy_writable_binary, kostis, dynamic, bs_add, otp_7422, zero_width, bad_append, bs_add_overflow]. +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + application:stop(os_mon). + big(1) -> 57285702734876389752897683. @@ -882,10 +889,14 @@ append_unit_16(Bin) -> %% Produce a large result of bs_add that, if cast to signed int, would overflow %% into a negative number that fits a smallnum. -bs_add_overflow(Config) -> +bs_add_overflow(_Config) -> + Memsize = memsize(), + io:format("Memsize = ~w Bytes~n", [Memsize]), case erlang:system_info(wordsize) of 8 -> {skip, "64-bit architecture"}; + _ when Memsize < (2 bsl 30) -> + {skip, "Less then 2 GB of memory"}; 4 -> Large = <<0:((1 bsl 30)-1)>>, {'EXIT',{system_limit,_}} = @@ -894,5 +905,10 @@ bs_add_overflow(Config) -> Large/bits>>), ok end. - + id(I) -> I. + +memsize() -> + application:ensure_all_started(os_mon), + {Tot,_Used,_} = memsup:get_memory_data(), + Tot. diff --git a/erts/emulator/test/distribution_SUITE.erl b/erts/emulator/test/distribution_SUITE.erl index 26780f6017..c6939a695d 100644 --- a/erts/emulator/test/distribution_SUITE.erl +++ b/erts/emulator/test/distribution_SUITE.erl @@ -187,8 +187,13 @@ bulk_sendsend2(Terms, BinSize, BusyBufSize) -> {ok, NodeSend} = start_node(bulk_sender, "+zdbbl " ++ integer_to_list(BusyBufSize)), _Send = spawn(NodeSend, erlang, apply, [fun sendersender/4, [self(), Recv, Bin, Terms]]), {Elapsed, {_TermsN, SizeN}, MonitorCount} = - receive {sendersender, BigRes} -> - BigRes + receive + %% On some platforms (windows), the time taken is 0 so we + %% simulate that some little time has passed. + {sendersender, {0.0,T,MC}} -> + {0.0015, T, MC}; + {sendersender, BigRes} -> + BigRes end, stop_node(NodeRecv), stop_node(NodeSend), @@ -1042,10 +1047,13 @@ atom_roundtrip_r15b(Config) when is_list(Config) -> ct:timetrap({minutes, 6}), AtomData = atom_data(), verify_atom_data(AtomData), - {ok, Node} = start_node(Config, [], "r15b"), - do_atom_roundtrip(Node, AtomData), - stop_node(Node), - ok; + case start_node(Config, [], "r15b") of + {ok, Node} -> + do_atom_roundtrip(Node, AtomData), + stop_node(Node); + {error, timeout} -> + {skip,"Unable to start OTP R15B release"} + end; false -> {skip,"No OTP R15B available"} end. diff --git a/erts/emulator/test/process_SUITE.erl b/erts/emulator/test/process_SUITE.erl index 4ebc1f5782..dae8990f56 100644 --- a/erts/emulator/test/process_SUITE.erl +++ b/erts/emulator/test/process_SUITE.erl @@ -2581,7 +2581,10 @@ enable_internal_state() -> _ -> erts_debug:set_internal_state(available_internal_state, true) end. -sys_mem_cond_run(ReqSizeMB, TestFun) when is_integer(ReqSizeMB) -> +sys_mem_cond_run(OrigReqSizeMB, TestFun) when is_integer(OrigReqSizeMB) -> + %% Debug normally needs more memory, so double the requirement + Debug = erlang:system_info(debug_compiled), + ReqSizeMB = if Debug -> OrigReqSizeMB * 2; true -> OrigReqSizeMB end, case total_memory() of TotMem when is_integer(TotMem), TotMem >= ReqSizeMB -> TestFun(); diff --git a/erts/emulator/test/trace_call_time_SUITE.erl b/erts/emulator/test/trace_call_time_SUITE.erl index 40c8bc4340..6582ad134b 100644 --- a/erts/emulator/test/trace_call_time_SUITE.erl +++ b/erts/emulator/test/trace_call_time_SUITE.erl @@ -351,7 +351,7 @@ combo(Config) when is_list(Config) -> %% Tests tracing of bifs bif(Config) when is_list(Config) -> P = erlang:trace_pattern({'_','_','_'}, false, [call_time]), - M = 1000000, + M = 5000000, %% 2 = erlang:trace_pattern({erlang, binary_to_term, '_'}, true, [call_time]), 2 = erlang:trace_pattern({erlang, term_to_binary, '_'}, true, [call_time]), @@ -381,7 +381,7 @@ bif(Config) when is_list(Config) -> nif(Config) when is_list(Config) -> load_nif(Config), P = erlang:trace_pattern({'_','_','_'}, false, [call_time]), - M = 1000000, + M = 5000000, %% 1 = erlang:trace_pattern({?MODULE, nif_dec, '_'}, true, [call_time]), 1 = erlang:trace_pattern({?MODULE, with_nif, '_'}, true, [call_time]), |