diff options
author | Sverker Eriksson <[email protected]> | 2016-12-20 18:30:12 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2016-12-20 18:30:12 +0100 |
commit | 420aa50e766560c3316a16695c8c3c1c46138aff (patch) | |
tree | 083586ea689839c088d1529d305093101b3b971c /erts/emulator/test/process_SUITE.erl | |
parent | ac2de409f9379544234f3356974feb2ac15d4818 (diff) | |
parent | 2f8d59aa9e8a96d094172db339fd94aae45a90b5 (diff) | |
download | otp-420aa50e766560c3316a16695c8c3c1c46138aff.tar.gz otp-420aa50e766560c3316a16695c8c3c1c46138aff.tar.bz2 otp-420aa50e766560c3316a16695c8c3c1c46138aff.zip |
Merge pull request #1263 from hawk/hm/stacktrace-depth/OTP-14119
Make depth of current_stacktrace configurable
Diffstat (limited to 'erts/emulator/test/process_SUITE.erl')
-rw-r--r-- | erts/emulator/test/process_SUITE.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/test/process_SUITE.erl b/erts/emulator/test/process_SUITE.erl index 0f999e0efe..2289cbabc7 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, |