aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib/test')
-rw-r--r--lib/stdlib/test/error_logger_h_SUITE.erl19
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/stdlib/test/error_logger_h_SUITE.erl b/lib/stdlib/test/error_logger_h_SUITE.erl
index 30811f3fb4..9828a075cc 100644
--- a/lib/stdlib/test/error_logger_h_SUITE.erl
+++ b/lib/stdlib/test/error_logger_h_SUITE.erl
@@ -65,11 +65,18 @@ logfile(Config) ->
error_logger:logfile(close),
analyse_events(Log, Ev, [AtNode], unlimited),
- [] = [{X, file:pid2name(X)} || X <- processes(), Data <- [process_info(X, [current_function])],
- Data =/= undefined,
- element(1, element(2, lists:keyfind(current_function, 1, Data)))
- =:= file_io_server,
- file:pid2name(X) =:= {ok, Log}],
+ %% Make sure that the file_io_server process has been stopped
+ [] = lists:filtermap(
+ fun(X) ->
+ case {process_info(X, [current_function]),
+ file:pid2name(X)} of
+ {[{current_function, {file_io_server, _, _}}],
+ {ok,P2N = Log}} ->
+ {true, {X, P2N}};
+ _ ->
+ false
+ end
+ end, processes()),
test_server:stop_node(Node),
@@ -112,7 +119,7 @@ tty(Config) ->
do_one_tty(Log, Ev, unlimited),
Pa = "-pa " ++ filename:dirname(code:which(?MODULE)),
- {ok,Node} = start_node(logfile, Pa),
+ {ok,Node} = start_node(tty, Pa),
tty_log_open(Log),
ok = rpc:call(Node, erlang, apply, [fun gen_events/1,[Ev]]),
tty_log_close(),