aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/Makefile2
-rw-r--r--erts/emulator/test/bif_SUITE.erl27
-rw-r--r--erts/emulator/test/estone_SUITE.erl2
-rw-r--r--erts/emulator/test/exception_SUITE.erl14
4 files changed, 42 insertions, 3 deletions
diff --git a/erts/emulator/test/Makefile b/erts/emulator/test/Makefile
index 3afcae494d..4d0c87bf12 100644
--- a/erts/emulator/test/Makefile
+++ b/erts/emulator/test/Makefile
@@ -200,7 +200,7 @@ release_tests_spec: make_emakefile
$(ERL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) $(NO_OPT_ERL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) $(NATIVE_ERL_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/erts/emulator/test/bif_SUITE.erl b/erts/emulator/test/bif_SUITE.erl
index 509586826b..c7617d3b90 100644
--- a/erts/emulator/test/bif_SUITE.erl
+++ b/erts/emulator/test/bif_SUITE.erl
@@ -24,6 +24,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
init_per_testcase/2,end_per_testcase/2,
+ display/1, display_huge/0,
types/1,
t_list_to_existing_atom/1,os_env/1,otp_7526/1,
binary_to_atom/1,binary_to_existing_atom/1,
@@ -33,6 +34,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[types, t_list_to_existing_atom, os_env, otp_7526,
+ display,
atom_to_binary, binary_to_atom, binary_to_existing_atom,
min_max].
@@ -60,6 +62,31 @@ end_per_testcase(_Func, Config) ->
Dog=?config(watchdog, Config),
?t:timetrap_cancel(Dog).
+
+display(suite) ->
+ [];
+display(doc) ->
+ ["Uses erlang:display to test that erts_printf does not do deep recursion"];
+display(Config) when is_list(Config) ->
+ Pa = filename:dirname(code:which(?MODULE)),
+ {ok, Node} = test_server:start_node(display_huge_term,peer,
+ [{args, "-pa "++Pa}]),
+ true = rpc:call(Node,?MODULE,display_huge,[]),
+ test_server:stop_node(Node),
+ ok.
+
+display_huge() ->
+ erlang:display(deeep(100000)).
+
+deeep(0,Acc) ->
+ Acc;
+deeep(N,Acc) ->
+ deeep(N-1,[Acc|[]]).
+
+deeep(N) ->
+ deeep(N,[hello]).
+
+
types(Config) when is_list(Config) ->
c:l(erl_bif_types),
case erlang:function_exported(erl_bif_types, module_info, 0) of
diff --git a/erts/emulator/test/estone_SUITE.erl b/erts/emulator/test/estone_SUITE.erl
index 2ba9375a41..2417d4bcfe 100644
--- a/erts/emulator/test/estone_SUITE.erl
+++ b/erts/emulator/test/estone_SUITE.erl
@@ -31,7 +31,7 @@
trav/1,
port_io/1,
large_dataset_work/1,
- large_local_dataset_work/1,mk_big_procs/1,big_proc/0,
+ large_local_dataset_work/1,mk_big_procs/1,big_proc/0, very_big/1,
alloc/1,
bif_dispatch/1,
binary_h/1,echo/1,
diff --git a/erts/emulator/test/exception_SUITE.erl b/erts/emulator/test/exception_SUITE.erl
index d44dc117d2..9d6fc9521d 100644
--- a/erts/emulator/test/exception_SUITE.erl
+++ b/erts/emulator/test/exception_SUITE.erl
@@ -275,7 +275,16 @@ stacktrace(Conf) when is_list(Conf) ->
?line [{?MODULE,stacktrace_1,3}|_] = erase(stacktrace1),
?line St4 = erase(stacktrace2),
?line St4 = erlang:get_stacktrace(),
- ok.
+
+ try
+ ?line stacktrace_2()
+ catch
+ error:{badmatch,_} ->
+ [{?MODULE,stacktrace_2,0},
+ {?MODULE,stacktrace,1}|_] =
+ erlang:get_stacktrace(),
+ ok
+ end.
stacktrace_1(X, C1, Y) ->
erase(stacktrace1),
@@ -295,6 +304,9 @@ stacktrace_1(X, C1, Y) ->
put(stacktrace2, erlang:get_stacktrace())
end.
+stacktrace_2() ->
+ ok = erlang:process_info(self(), current_function),
+ ok.
nested_stacktrace(Conf) when is_list(Conf) ->