aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-05-12 12:08:02 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-05-12 12:08:02 +0200
commit996380765561b1a0e3d215437d4560d2e7a72cfb (patch)
tree9fdf6fbf8f74014e1142183c0f5c7bad68893ac9 /lib
parent3d894779f950a6ce2a97f3678e1492d1926836b1 (diff)
parent5917fd5468a952fce7ebda8b57a6218fbb7bb878 (diff)
downloadotp-996380765561b1a0e3d215437d4560d2e7a72cfb.tar.gz
otp-996380765561b1a0e3d215437d4560d2e7a72cfb.tar.bz2
otp-996380765561b1a0e3d215437d4560d2e7a72cfb.zip
Merge branch 'jv/18/emulator-send-to-error_logger/OTP-12735'
* jv/18/emulator-send-to-error_logger/OTP-12735: erts: Fix erts_send_error_term_to_logger memory leak Send format and args on process exit to error_logger Add erts_send_error_term_to_logger
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/error_logger_SUITE.erl22
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/kernel/test/error_logger_SUITE.erl b/lib/kernel/test/error_logger_SUITE.erl
index 05bf5aae18..1c2e56f083 100644
--- a/lib/kernel/test/error_logger_SUITE.erl
+++ b/lib/kernel/test/error_logger_SUITE.erl
@@ -32,7 +32,7 @@
error_report/1, info_report/1, error/1, info/1,
emulator/1, tty/1, logfile/1, add/1, delete/1]).
--export([generate_error/0]).
+-export([generate_error/2]).
-export([init/1,
handle_event/2, handle_call/2, handle_info/2,
@@ -210,13 +210,16 @@ emulator(suite) -> [];
emulator(doc) -> [];
emulator(Config) when is_list(Config) ->
?line error_logger:add_report_handler(?MODULE, self()),
- spawn(?MODULE, generate_error, []),
- reported(emulator),
+ Msg = "Error in process ~p on node ~p with exit value:~n~p~n",
+ Error = {badmatch,4},
+ Stack = [{module, function, 2, []}],
+ Pid = spawn(?MODULE, generate_error, [Error, Stack]),
+ reported(error, Msg, [Pid, node(), {Error, Stack}]),
?line my_yes = error_logger:delete_report_handler(?MODULE),
ok.
-generate_error() ->
- erlang:error({badmatch,4}).
+generate_error(Error, Stack) ->
+ erlang:raise(error, Error, Stack).
%%-----------------------------------------------------------------
%% We don't enables or disables tty error logging here. We do not
@@ -283,15 +286,6 @@ reported(Tag, Type, Report) ->
test_server:fail(no_report_received)
end.
-reported(emulator) ->
- receive
- {error, "~s~n", String} when is_list(String) ->
- test_server:messages_get(),
- ok
- after 1000 ->
- test_server:fail(no_report_received)
- end.
-
%%-----------------------------------------------------------------
%% The error_logger handler (gen_event behaviour).
%% Sends a notification to the Tester process about the events