aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/process_SUITE.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-12-20 18:31:32 +0100
committerSverker Eriksson <[email protected]>2016-12-20 18:31:32 +0100
commit44138faf5c7047af63f49390282358de2e3c3b3d (patch)
tree5e1d05920e01aca513a1701ced135ed6f847be0f /erts/emulator/test/process_SUITE.erl
parenta3b58a857a9d1a4d4bec051bf7814580e4254f02 (diff)
parent420aa50e766560c3316a16695c8c3c1c46138aff (diff)
downloadotp-44138faf5c7047af63f49390282358de2e3c3b3d.tar.gz
otp-44138faf5c7047af63f49390282358de2e3c3b3d.tar.bz2
otp-44138faf5c7047af63f49390282358de2e3c3b3d.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/test/process_SUITE.erl')
-rw-r--r--erts/emulator/test/process_SUITE.erl11
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/test/process_SUITE.erl b/erts/emulator/test/process_SUITE.erl
index e035fc64fe..3b8f0072f2 100644
--- a/erts/emulator/test/process_SUITE.erl
+++ b/erts/emulator/test/process_SUITE.erl
@@ -437,11 +437,22 @@ t_process_info(Config) when is_list(Config) ->
verify_loc(Line2, Res2),
pi_stacktrace([{?MODULE,t_process_info,1,?LINE}]),
+ verify_stacktrace_depth(),
+
Gleader = group_leader(),
{group_leader, Gleader} = process_info(self(), group_leader),
{'EXIT',{badarg,_Info}} = (catch process_info('not_a_pid')),
ok.
+verify_stacktrace_depth() ->
+ CS = current_stacktrace,
+ OldDepth = erlang:system_flag(backtrace_depth, 0),
+ {CS,[]} = erlang:process_info(self(), CS),
+ _ = erlang:system_flag(backtrace_depth, 8),
+ {CS,[{?MODULE,verify_stacktrace_depth,0,_},_|_]} =
+ erlang:process_info(self(), CS),
+ _ = erlang:system_flag(backtrace_depth, OldDepth).
+
pi_stacktrace(Expected0) ->
{Line,Res} = {?LINE,erlang:process_info(self(), current_stacktrace)},
{current_stacktrace,Stack} = Res,