diff options
author | Siri Hansen <[email protected]> | 2018-05-31 15:22:45 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-06-08 14:39:51 +0200 |
commit | 577d903af9eb5b028611a957b8f07b06fbbd741e (patch) | |
tree | 421845fc63900b8231fc031df4cd35a02b1ca070 /lib/kernel/test/error_logger_SUITE.erl | |
parent | ba4b23c2d1cd07d754518201a5686f09cb1332d2 (diff) | |
download | otp-577d903af9eb5b028611a957b8f07b06fbbd741e.tar.gz otp-577d903af9eb5b028611a957b8f07b06fbbd741e.tar.bz2 otp-577d903af9eb5b028611a957b8f07b06fbbd741e.zip |
Allow 'unlimited' as value to Kernel parameter error_logger_format_depth
Diffstat (limited to 'lib/kernel/test/error_logger_SUITE.erl')
-rw-r--r-- | lib/kernel/test/error_logger_SUITE.erl | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/kernel/test/error_logger_SUITE.erl b/lib/kernel/test/error_logger_SUITE.erl index 6c4526d0cf..895478f170 100644 --- a/lib/kernel/test/error_logger_SUITE.erl +++ b/lib/kernel/test/error_logger_SUITE.erl @@ -33,7 +33,7 @@ off_heap/1, error_report/1, info_report/1, error/1, info/1, emulator/1, via_logger_process/1, other_node/1, - tty/1, logfile/1, add/1, delete/1]). + tty/1, logfile/1, add/1, delete/1, format_depth/1]). -export([generate_error/2]). @@ -48,7 +48,8 @@ suite() -> all() -> [off_heap, error_report, info_report, error, info, emulator, - via_logger_process, other_node, tty, logfile, add, delete]. + via_logger_process, other_node, tty, logfile, add, delete, + format_depth]. groups() -> []. @@ -309,6 +310,21 @@ delete(Config) when is_list(Config) -> ok. %%----------------------------------------------------------------- + +format_depth(_Config) -> + ok = application:set_env(kernel,error_logger_format_depth,30), + 30 = error_logger:get_format_depth(), + ok = application:set_env(kernel,error_logger_format_depth,3), + 10 = error_logger:get_format_depth(), + ok = application:set_env(kernel,error_logger_format_depth,11), + 11 = error_logger:get_format_depth(), + ok = application:set_env(kernel,error_logger_format_depth,unlimited), + unlimited = error_logger:get_format_depth(), + ok = application:unset_env(kernel,error_logger_format_depth), + unlimited = error_logger:get_format_depth(), + ok. + +%%----------------------------------------------------------------- %% Check that the report has been received. %%----------------------------------------------------------------- reported(Tag, Type, Report) -> |