summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2021-02-25 10:20:30 +0100
committerBjörn Gustavsson <bjorn@erlang.org>2021-03-01 06:31:19 +0100
commitcb406f4ae248e8f2164cf53486b163295ee53485 (patch)
treeac25f183f41b304797505fede3052706e82b833d /lib
parent4124d78d531c2b5a0b2a6227a27adc78bee16c45 (diff)
downloaderlang-cb406f4ae248e8f2164cf53486b163295ee53485.tar.gz
Remove redundant tests for native code
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/test/bs_match_SUITE.erl3
-rw-r--r--lib/kernel/test/code_SUITE.erl9
-rw-r--r--lib/kernel/test/erl_prim_loader_SUITE.erl72
-rw-r--r--lib/kernel/test/multi_load_SUITE.erl11
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE.erl7
-rw-r--r--lib/observer/test/etop_SUITE.erl6
-rw-r--r--lib/stdlib/test/dets_SUITE.erl4
-rw-r--r--lib/stdlib/test/epp_SUITE.erl8
-rw-r--r--lib/stdlib/test/ets_SUITE.erl4
-rw-r--r--lib/stdlib/test/gen_server_SUITE.erl10
-rw-r--r--lib/stdlib/test/io_SUITE.erl10
-rw-r--r--lib/stdlib/test/re_SUITE.erl53
-rw-r--r--lib/stdlib/test/shell_SUITE.erl33
-rw-r--r--lib/tools/test/cprof_SUITE.erl15
-rw-r--r--lib/tools/test/eprof_SUITE.erl7
-rw-r--r--lib/tools/test/fprof_SUITE.erl27
-rw-r--r--lib/tools/test/prof_bench_SUITE.erl6
17 files changed, 90 insertions, 195 deletions
diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl
index c3d391f757..5bb116752a 100644
--- a/lib/compiler/test/bs_match_SUITE.erl
+++ b/lib/compiler/test/bs_match_SUITE.erl
@@ -1469,9 +1469,6 @@ fc({'EXIT',{function_clause,_}}) -> ok;
fc({'EXIT',{{case_clause,_},_}}) when ?MODULE =:= bs_match_inline_SUITE -> ok.
fc(Name, Args, {'EXIT',{function_clause,[{?MODULE,Name,Args,_}|_]}}) -> ok;
-fc(Name, Args, {'EXIT',{function_clause,[{?MODULE,Name,Arity,_}|_]}})
- when length(Args) =:= Arity ->
- true = test_server:is_native(?MODULE);
fc(_, Args, {'EXIT',{{case_clause,ActualArgs},_}})
when ?MODULE =:= bs_match_inline_SUITE ->
Args = tuple_to_list(ActualArgs).
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index 855a2276ba..740f05ac94 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -1925,9 +1925,6 @@ module_status() ->
compile_beam(Sleep) ->
compile(Sleep, []).
-compile_native(Sleep) ->
- compile(Sleep, [native]).
-
compile(Sleep, Opts) ->
timer:sleep(Sleep), % increment compilation timestamp
{ok,?TESTMOD} = compile:file(?TESTMODSRC, Opts).
@@ -1939,12 +1936,6 @@ load_code() ->
remove_code() ->
ok = file:delete(?TESTMODOBJ).
-has_native(Module) ->
- case erlang:get_module_info(Module, native_addresses) of
- [] -> false;
- [_|_] -> true
- end.
-
make_source_file(Body) ->
ok = file:write_file(?TESTMODSRC, dummy_source(Body)).
diff --git a/lib/kernel/test/erl_prim_loader_SUITE.erl b/lib/kernel/test/erl_prim_loader_SUITE.erl
index 16a127aa3e..0e21cfc926 100644
--- a/lib/kernel/test/erl_prim_loader_SUITE.erl
+++ b/lib/kernel/test/erl_prim_loader_SUITE.erl
@@ -227,44 +227,40 @@ wait_really_started(Node, N) ->
%% Start a node using the 'inet' loading method,
%% then lose the connection.
inet_disconnects(Config) when is_list(Config) ->
- case test_server:is_native(erl_boot_server) of
- true ->
- {skip,"erl_boot_server is native"};
- false ->
- Name = erl_prim_test_inet_disconnects,
-
- BootPid = start_boot_server(),
- unlink(BootPid),
- Self = self(),
- %% This process shuts down the boot server during loading.
- Stopper = spawn_link(fun() -> stop_boot(BootPid, Self) end),
- receive
- {Stopper,ready} -> ok
- end,
-
- %% Let the loading begin...
- Node = start_node_using_inet(Name, [{wait,false}]),
-
- %% When the stopper is ready, the slave node should be
- %% looking for a boot server again.
- receive
- {Stopper,ok} ->
- ok;
- {Stopper,{error,Reason}} ->
- ct:fail(Reason)
- after 60000 ->
- ct:fail(stopper_died)
- end,
-
- %% Start new boot server to see that loading is continued.
- BootPid2 = start_boot_server(),
- wait_really_started(Node, 25),
- {ok,[["inet"]]} = rpc:call(Node, init, get_argument, [loader]),
- stop_node(Node),
- unlink(BootPid2),
- exit(BootPid2, kill),
- ok
- end.
+ Name = erl_prim_test_inet_disconnects,
+
+ BootPid = start_boot_server(),
+ unlink(BootPid),
+ Self = self(),
+
+ %% This process shuts down the boot server during loading.
+ Stopper = spawn_link(fun() -> stop_boot(BootPid, Self) end),
+ receive
+ {Stopper,ready} -> ok
+ end,
+
+ %% Let the loading begin...
+ Node = start_node_using_inet(Name, [{wait,false}]),
+
+ %% When the stopper is ready, the slave node should be
+ %% looking for a boot server again.
+ receive
+ {Stopper,ok} ->
+ ok;
+ {Stopper,{error,Reason}} ->
+ ct:fail(Reason)
+ after 60000 ->
+ ct:fail(stopper_died)
+ end,
+
+ %% Start new boot server to see that loading is continued.
+ BootPid2 = start_boot_server(),
+ wait_really_started(Node, 25),
+ {ok,[["inet"]]} = rpc:call(Node, init, get_argument, [loader]),
+ stop_node(Node),
+ unlink(BootPid2),
+ exit(BootPid2, kill),
+ ok.
%% Trace boot server calls and stop the server before loading is finished.
stop_boot(BootPid, Super) ->
diff --git a/lib/kernel/test/multi_load_SUITE.erl b/lib/kernel/test/multi_load_SUITE.erl
index 199c6586a7..4c336a5d81 100644
--- a/lib/kernel/test/multi_load_SUITE.erl
+++ b/lib/kernel/test/multi_load_SUITE.erl
@@ -258,13 +258,7 @@ do_ensure_modules_loaded(Dir) ->
ok = file:write_file(filename:absname(BadFile, Dir), <<"bad_code">>),
BadOLMod = make_module_file(Dir, fun failing_on_load_module/1),
BadEgg = bad__egg,
- NativeMod = a_native_module,
- NativeModFile = atom_to_list(NativeMod) ++ ".beam",
- {NativeMod,_,NativeCode} = make_module(NativeMod, NativeModFile,
- fun basic_module/1, [native]),
- ok = file:write_file(filename:absname(NativeModFile, Dir), NativeCode),
- ModulesToLoad = [OLMod,?MODULE,Mod,BadOLMod,NativeMod,
- BadEgg,BadMod,lists],
+ ModulesToLoad = [OLMod,?MODULE,Mod,BadOLMod,BadEgg,BadMod,lists],
{error,Error0} = code:ensure_modules_loaded(ModulesToLoad),
Error = lists:sort([{BadEgg,nofile},
{BadMod,badfile},
@@ -272,9 +266,6 @@ do_ensure_modules_loaded(Dir) ->
Error = lists:sort(Error0),
true = is_loaded(Mod),
true = is_loaded(OLMod),
- true = is_loaded(NativeMod),
-
- false = NativeMod:module_info(native),
ok.
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl
index 098c649b87..2a223a33f6 100644
--- a/lib/observer/test/crashdump_viewer_SUITE.erl
+++ b/lib/observer/test/crashdump_viewer_SUITE.erl
@@ -369,11 +369,10 @@ is_truncated(File) ->
end.
incomplete_allowed(File) ->
- %% Incomplete heap is allowed for native libs, since some literals
- %% are not dumped - and for pre OTP-20 (really pre 20.2) releases,
- %% since literals were not dumped at all then.
+ %% Incomplete heap is allowed for pre OTP-20 (really pre 20.2)
+ %% releases, since literals were not dumped at all then.
Rel = get_rel_from_dump_name(File),
- Rel < 20 orelse test_server:is_native(lists).
+ Rel < 20.
special(File,Procs) ->
case filename:extension(File) of
diff --git a/lib/observer/test/etop_SUITE.erl b/lib/observer/test/etop_SUITE.erl
index 7614989f1f..54c7e1d999 100644
--- a/lib/observer/test/etop_SUITE.erl
+++ b/lib/observer/test/etop_SUITE.erl
@@ -64,12 +64,6 @@ end_per_group(_GroupName, Config) ->
%% Start etop with text presentation
text(_) ->
- case test_server:is_native(lists) of
- true -> {skip,"Native libs -- tracing does not work"};
- false -> text()
- end.
-
-text() ->
?line {ok,Node} = ?t:start_node(node2,peer,[]),
%% Must spawn this process, else the test case will never end.
diff --git a/lib/stdlib/test/dets_SUITE.erl b/lib/stdlib/test/dets_SUITE.erl
index 65977a764a..e77ee36eb1 100644
--- a/lib/stdlib/test/dets_SUITE.erl
+++ b/lib/stdlib/test/dets_SUITE.erl
@@ -3880,9 +3880,7 @@ bad_object({error,{{{bad_object,_,_},_,_,_}, FileName}}, FileName) ->
ok. % Debug.
check_badarg({'EXIT', {badarg, [{M,F,Args,_} | _]}}, M, F, Args) ->
- true;
-check_badarg({'EXIT', {badarg, [{M,F,A,_} | _]}}, M, F, Args) ->
- true = test_server:is_native(M) andalso length(Args) =:= A.
+ true.
check_pps({Ports0,Procs0} = P0) ->
ok = check_dets_tables(),
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl
index 572c719417..11f3bb4adb 100644
--- a/lib/stdlib/test/epp_SUITE.erl
+++ b/lib/stdlib/test/epp_SUITE.erl
@@ -246,12 +246,8 @@ otp_4871(Config) when is_list(Config) ->
ok.
current_module(Pid, Mod) ->
- case process_info(Pid, current_function) of
- {current_function, undefined} ->
- true = test_server:is_native(Mod);
- {current_function, {Mod, _, _}} ->
- true
- end.
+ {current_function, {Mod, _, _}} = process_info(Pid, current_function),
+ true.
otp_4871_parse_file(Epp) ->
case epp:parse_erl_form(Epp) of
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index a7dd2341cc..c2e337e760 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -935,9 +935,7 @@ t_ets_dets(Config, Opts) ->
ok.
check_badarg({'EXIT', {badarg, [{M,F,Args,_} | _]}}, M, F, Args) ->
- true;
-check_badarg({'EXIT', {badarg, [{M,F,A,_} | _]}}, M, F, Args) ->
- true = test_server:is_native(M) andalso length(Args) =:= A.
+ true.
%% Test ets:delete_all_objects/1.
t_delete_all_objects(Config) when is_list(Config) ->
diff --git a/lib/stdlib/test/gen_server_SUITE.erl b/lib/stdlib/test/gen_server_SUITE.erl
index d5569586aa..831d4f2537 100644
--- a/lib/stdlib/test/gen_server_SUITE.erl
+++ b/lib/stdlib/test/gen_server_SUITE.erl
@@ -1471,16 +1471,6 @@ replace_state(Config) when is_list(Config) ->
%% Test that the time for a huge message queue is not
%% significantly slower than with an empty message queue.
call_with_huge_message_queue(Config) when is_list(Config) ->
- case test_server:is_native(gen) of
- true ->
- {skip,
- "gen is native - huge message queue optimization "
- "is not implemented"};
- false ->
- do_call_with_huge_message_queue()
- end.
-
-do_call_with_huge_message_queue() ->
Pid = spawn_link(fun echo_loop/0),
{Time,ok} = tc(fun() -> calls(10000, Pid) end),
diff --git a/lib/stdlib/test/io_SUITE.erl b/lib/stdlib/test/io_SUITE.erl
index 22b598c3c0..c5da15e73a 100644
--- a/lib/stdlib/test/io_SUITE.erl
+++ b/lib/stdlib/test/io_SUITE.erl
@@ -2214,14 +2214,10 @@ io_lib_width_too_small(_Config) ->
%% Test that the time for a huge message queue is not
%% significantly slower than with an empty message queue.
io_with_huge_message_queue(Config) when is_list(Config) ->
- case {test_server:is_native(gen),test_server:is_cover()} of
- {true,_} ->
- {skip,
- "gen is native - huge message queue optimization "
- "is not implemented"};
- {_,true} ->
+ case test_server:is_cover() of
+ true ->
{skip,"Running under cover"};
- {false,false} ->
+ false ->
do_io_with_huge_message_queue(Config)
end.
diff --git a/lib/stdlib/test/re_SUITE.erl b/lib/stdlib/test/re_SUITE.erl
index 4effa9dbfa..3d5761aa40 100644
--- a/lib/stdlib/test/re_SUITE.erl
+++ b/lib/stdlib/test/re_SUITE.erl
@@ -501,15 +501,6 @@ split_specials(Config) when is_list(Config) ->
%% Test that errors are handled correctly by the erlang code.
error_handling(_Config) ->
- case test_server:is_native(re) of
- true ->
- %% Exceptions from native code look too different.
- {skip,"re is native"};
- false ->
- error_handling()
- end.
-
-error_handling() ->
%% This test checks the exception tuples manufactured in the erlang
%% code to hide the trapping from the user at least when it comes to errors
@@ -517,14 +508,14 @@ error_handling() ->
%% the trap to re:grun from grun, in the grun function clause
%% that handles precompiled expressions
{'EXIT',{badarg,[{re,run,["apa",{1,2,3,4},[global]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:run("apa",{1,2,3,4},[global])),
%% An invalid capture list will also cause a badarg late,
%% but with a non pre compiled RE, the exception should be thrown by the
%% grun function clause that handles RE's compiled implicitly by
%% the run/3 BIF before trapping.
{'EXIT',{badarg,[{re,run,["apa","p",[{capture,[1,{a}]},global]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:run("apa","p",[{capture,[1,{a}]},global])),
%% And so the case of a precompiled expression together with
%% a compile-option (binary and list subject):
@@ -535,13 +526,13 @@ error_handling() ->
[<<"apa">>,
{re_pattern,1,0,_,_},
[global,unicode]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:run(<<"apa">>,RE,[global,unicode])),
{'EXIT',{badarg,[{re,run,
["apa",
{re_pattern,1,0,_,_},
[global,unicode]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:run("apa",RE,[global,unicode])),
{'EXIT',{badarg,_}} = (catch re:run("apa","(p",[])),
{error, {compile, {_,_}}} = re:run("apa","(p",[report_errors]),
@@ -576,84 +567,84 @@ error_handling() ->
{match,[{1,1},{1,1}]} = re:run(Temp,<<"(p)">>,[]), % Unaligned works
%% The replace errors:
{'EXIT',{badarg,[{re,replace,["apa",{1,2,3,4},"X",[]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:replace("apa",{1,2,3,4},"X",[])),
{'EXIT',{badarg,[{re,replace,["apa",{1,2,3,4},"X",[global]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:replace("apa",{1,2,3,4},"X",[global])),
{'EXIT',{badarg,[{re,replace,
["apa",
{re_pattern,1,0,_,_},
"X",
[unicode]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:replace("apa",RE,"X",[unicode])),
<<"aXa">> = iolist_to_binary(re:replace("apa","p","X",[])),
{'EXIT',{badarg,[{re,replace,
["apa","p","X",[report_errors]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch iolist_to_binary(re:replace("apa","p","X",
[report_errors]))),
{'EXIT',{badarg,[{re,replace,
["apa","p","X",[{capture,all,binary}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch iolist_to_binary(re:replace("apa","p","X",
[{capture,all,binary}]))),
{'EXIT',{badarg,[{re,replace,
["apa","p","X",[{capture,all}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch iolist_to_binary(re:replace("apa","p","X",
[{capture,all}]))),
{'EXIT',{badarg,[{re,replace,
["apa","p","X",[{return,banana}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch iolist_to_binary(re:replace("apa","p","X",
[{return,banana}]))),
{'EXIT',{badarg,_}} = (catch re:replace("apa","(p","X",[])),
%% Badarg, not compile error.
{'EXIT',{badarg,[{re,replace,
["apa","(p","X",[{return,banana}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch iolist_to_binary(re:replace("apa","(p","X",
[{return,banana}]))),
%% And the split errors:
[<<"a">>,<<"a">>] = (catch re:split("apa","p",[])),
[<<"a">>,<<"p">>,<<"a">>] = (catch re:split("apa",RE,[])),
{'EXIT',{badarg,[{re,split,["apa","p",[report_errors]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa","p",[report_errors])),
{'EXIT',{badarg,[{re,split,["apa","p",[global]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa","p",[global])),
{'EXIT',{badarg,[{re,split,["apa","p",[{capture,all}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa","p",[{capture,all}])),
{'EXIT',{badarg,[{re,split,["apa","p",[{capture,all,binary}]],_},
- {?MODULE, error_handling,0,_} | _]}} =
+ {?MODULE, ?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa","p",[{capture,all,binary}])),
{'EXIT',{badarg,[{re,split,["apa",{1,2,3,4}],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa",{1,2,3,4})),
{'EXIT',{badarg,[{re,split,["apa",{1,2,3,4},[]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa",{1,2,3,4},[])),
{'EXIT',{badarg,[{re,split,
["apa",
RE,
[unicode]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa",RE,[unicode])),
{'EXIT',{badarg,[{re,split,
["apa",
RE,
[{return,banana}]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa",RE,[{return,banana}])),
{'EXIT',{badarg,[{re,split,
["apa",
RE,
[banana]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa",RE,[banana])),
{'EXIT',{badarg,_}} = (catch re:split("apa","(p")),
%%Exception on bad argument, not compilation error
@@ -661,7 +652,7 @@ error_handling() ->
["apa",
"(p",
[banana]],_},
- {?MODULE,error_handling,0,_} | _]}} =
+ {?MODULE,?FUNCTION_NAME,?FUNCTION_ARITY,_} | _]}} =
(catch re:split("apa","(p",[banana])),
ok.
diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl
index 55d1712e35..494c3e68ef 100644
--- a/lib/stdlib/test/shell_SUITE.erl
+++ b/lib/stdlib/test/shell_SUITE.erl
@@ -2401,26 +2401,19 @@ otp_6554(Config) when is_list(Config) ->
comm_err(<<"V = lists:seq(1, 20), case V of a -> ok end.">>),
"exception error: no function clause matching" =
comm_err(<<"fun(P) when is_pid(P) -> true end(a).">>),
- case test_server:is_native(erl_eval) of
- true ->
- %% Native code has different exit reason. Don't bother
- %% testing them.
- ok;
- false ->
- "exception error: {function_clause," =
- comm_err(<<"erlang:error(function_clause, "
- "[unproper | list]).">>),
- %% Cheating:
- "exception error: no function clause matching "
- "shell:apply_fun(4)" ++ _ =
- comm_err(<<"erlang:error(function_clause, [4]).">>),
- "exception error: no function clause matching "
- "lists:reverse(" ++ _ =
- comm_err(<<"F=fun() -> hello end, lists:reverse(F).">>),
- "exception error: no function clause matching "
- "lists:reverse(34) (lists.erl, line " ++ _ =
- comm_err(<<"lists:reverse(34).">>)
- end,
+ "exception error: {function_clause," =
+ comm_err(<<"erlang:error(function_clause, "
+ "[unproper | list]).">>),
+ %% Cheating:
+ "exception error: no function clause matching "
+ "shell:apply_fun(4)" ++ _ =
+ comm_err(<<"erlang:error(function_clause, [4]).">>),
+ "exception error: no function clause matching "
+ "lists:reverse(" ++ _ =
+ comm_err(<<"F=fun() -> hello end, lists:reverse(F).">>),
+ "exception error: no function clause matching "
+ "lists:reverse(34) (lists.erl, line " ++ _ =
+ comm_err(<<"lists:reverse(34).">>),
"exception error: function_clause" =
comm_err(<<"erlang:error(function_clause, 4).">>),
"exception error: no function clause matching" ++ _ =
diff --git a/lib/tools/test/cprof_SUITE.erl b/lib/tools/test/cprof_SUITE.erl
index 39239a66a9..51057a514e 100644
--- a/lib/tools/test/cprof_SUITE.erl
+++ b/lib/tools/test/cprof_SUITE.erl
@@ -64,9 +64,7 @@ config(data_dir, _) ->
"cprof_SUITE_data".
-else.
%% When run in test server.
--export([all/0, suite/0,
- init_per_testcase/2, end_per_testcase/2,
- not_run/1]).
+-export([all/0, suite/0, init_per_testcase/2, end_per_testcase/2]).
-export([basic/1, on_load/1, modules/1]).
init_per_testcase(_Case, Config) ->
@@ -82,15 +80,8 @@ suite() ->
[{ct_hooks,[ts_install_cth]},
{timetrap,{seconds,30}}].
-all() ->
- case test_server:is_native(cprof_SUITE) of
- true -> [not_run];
- false -> [basic, on_load, modules]
- end.
-
-
-not_run(Config) when is_list(Config) ->
- {skipped,"Native code"}.
+all() ->
+ [basic, on_load, modules].
%% Tests basic profiling
basic(Config) when is_list(Config) ->
diff --git a/lib/tools/test/eprof_SUITE.erl b/lib/tools/test/eprof_SUITE.erl
index 4578b15cdb..7a4c503ec2 100644
--- a/lib/tools/test/eprof_SUITE.erl
+++ b/lib/tools/test/eprof_SUITE.erl
@@ -108,13 +108,6 @@ basic(Config) when is_list(Config) ->
ok.
basic_option(Config) when is_list(Config) ->
- %% Eprof is not supported on native-compile code.
- case lists:module_info(native_addresses) of
- [] -> basic_option_1(Config);
- [_|_] -> {skip,"lists is native-compiled"}
- end.
-
-basic_option_1(Config) ->
%% load eprof_test and change directory
diff --git a/lib/tools/test/fprof_SUITE.erl b/lib/tools/test/fprof_SUITE.erl
index f5d68c20f0..df4c6d8b0f 100644
--- a/lib/tools/test/fprof_SUITE.erl
+++ b/lib/tools/test/fprof_SUITE.erl
@@ -22,7 +22,7 @@
-include_lib("common_test/include/ct.hrl").
%% Test server framework exports
--export([all/0, suite/0, not_run/1]).
+-export([all/0, suite/0]).
%% Test suites
-export([stack_seq/1, tail_seq/1, create_file_slow/1, spawn_simple/1,
@@ -53,18 +53,10 @@ suite() ->
[{ct_hooks,[ts_install_cth]},
{timetrap,{seconds,240}}].
-all() ->
- case test_server:is_native(fprof_SUITE) of
- true -> [not_run];
- false ->
- [stack_seq, tail_seq, create_file_slow, spawn_simple,
- imm_tail_seq, imm_create_file_slow, imm_compile,
- cpu_create_file_slow, unicode, parsify_maps]
- end.
-
-
-not_run(Config) when is_list(Config) ->
- {skipped, "Native code"}.
+all() ->
+ [stack_seq, tail_seq, create_file_slow, spawn_simple,
+ imm_tail_seq, imm_create_file_slow, imm_compile,
+ cpu_create_file_slow, unicode, parsify_maps].
%%%---------------------------------------------------------------------
@@ -164,15 +156,6 @@ tail_seq(Config) when is_list(Config) ->
%% Tests the create_file_slow benchmark.
create_file_slow(Config) ->
- case test_server:is_native(lists) orelse
- test_server:is_native(file) of
- true ->
- {skip,"Native libs -- tracing does not work"};
- false ->
- do_create_file_slow(Config)
- end.
-
-do_create_file_slow(Config) ->
PrivDir = proplists:get_value(priv_dir, Config),
TraceFile = filename:join(PrivDir,
?MODULE_STRING"_create_file_slow.trace"),
diff --git a/lib/tools/test/prof_bench_SUITE.erl b/lib/tools/test/prof_bench_SUITE.erl
index c0b9a7913c..b1463e084d 100644
--- a/lib/tools/test/prof_bench_SUITE.erl
+++ b/lib/tools/test/prof_bench_SUITE.erl
@@ -38,12 +38,10 @@ all() ->
[overhead].
init_per_suite(Config) ->
- case {test_server:is_native(fprof_SUITE) or
- (lists:any(fun(M) -> test_server:is_native(M) end, modules())) or
- (whereis(cover_server) =/= undefined),
+ case {whereis(cover_server) =/= undefined,
erlang:system_info(wordsize)}
of
- {true, _} -> {skip, "Native or cover code"};
+ {true, _} -> {skip, "Cover is running"};
{_, 4} -> {skip, "Can't run on 32-bit as files will be large"};
{false, 8} -> Config
end.