diff options
author | Kiko Fernandez-Reyes <kiko@erlang.org> | 2023-02-20 16:03:45 +0100 |
---|---|---|
committer | Kiko Fernandez-Reyes <kiko@erlang.org> | 2023-04-19 14:29:56 +0200 |
commit | 861be72c5a1261ee1694ee468540256f6db11e87 (patch) | |
tree | 7bfb57f3ba724a4b94c0e5f8e63f6c14aee2ac44 /lib/kernel/test | |
parent | 0f6032a1ccf54d47e665ff14acce9a22fafe64a1 (diff) | |
download | erlang-861be72c5a1261ee1694ee468540256f6db11e87.tar.gz |
dbg: deprecates function dbg:stop_clear/1
function `dbg:stop_clear/1` is not documented in the API but was kept
for compatibility reasons. in this commit we make a step forward to
deprecating its use such that it will be eventually removed.
closes GH-6903.
Diffstat (limited to 'lib/kernel/test')
-rw-r--r-- | lib/kernel/test/logger_disk_log_h_SUITE.erl | 22 | ||||
-rw-r--r-- | lib/kernel/test/logger_std_h_SUITE.erl | 2 | ||||
-rw-r--r-- | lib/kernel/test/logger_stress_SUITE.erl | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/lib/kernel/test/logger_disk_log_h_SUITE.erl b/lib/kernel/test/logger_disk_log_h_SUITE.erl index 08908b8b7a..fab125e5ae 100644 --- a/lib/kernel/test/logger_disk_log_h_SUITE.erl +++ b/lib/kernel/test/logger_disk_log_h_SUITE.erl @@ -674,7 +674,7 @@ sync(Config) -> check_tracer(100), ok. sync(cleanup,_Config) -> - dbg:stop_clear(), + dbg:stop(), logger:remove_handler(?MODULE). disk_log_wrap(Config) -> @@ -720,7 +720,7 @@ disk_log_wrap(Config) -> %% wait for trace messages timer:sleep(1000), - dbg:stop_clear(), + dbg:stop(), Received = lists:flatmap(fun({trace,_M,handle_info, [_,{disk_log,_Node,_Name,What},_]}) -> [{trace,What}]; @@ -732,7 +732,7 @@ disk_log_wrap(Config) -> ok. disk_log_wrap(cleanup,_Config) -> - dbg:stop_clear(), + dbg:stop(), logger:remove_handler(?MODULE). disk_log_full(Config) -> @@ -766,7 +766,7 @@ disk_log_full(Config) -> %% wait for trace messages timer:sleep(2000), - dbg:stop_clear(), + dbg:stop(), Received = lists:flatmap(fun({trace,_M,handle_info, [_,{disk_log,_Node,_Name,What},_]}) -> [{trace,What}]; @@ -782,7 +782,7 @@ disk_log_full(Config) -> %% {trace,{error_status,{error,{full,_}}}}] = Received, ok. disk_log_full(cleanup, _Config) -> - dbg:stop_clear(), + dbg:stop(), logger:remove_handler(?MODULE). disk_log_events(_Config) -> @@ -816,7 +816,7 @@ disk_log_events(_Config) -> [whereis(h_proc_name()) ! E || E <- Events], %% wait for trace messages timer:sleep(2000), - dbg:stop_clear(), + dbg:stop(), Received = lists:map(fun({trace,_M,handle_info, [_,Got,_]}) -> Got end, test_server:messages_get()), @@ -828,7 +828,7 @@ disk_log_events(_Config) -> end, Received), ok. disk_log_events(cleanup, _Config) -> - dbg:stop_clear(), + dbg:stop(), logger:remove_handler(?MODULE). write_failure(Config) -> @@ -1603,7 +1603,7 @@ tpl([{{M,F,A},MS}|Trace]) -> {_,_,1} -> ok; _ -> - dbg:stop_clear(), + dbg:stop(), throw({skip,"Can't trace "++atom_to_list(M)++":"++ atom_to_list(F)++"/"++integer_to_list(A)}) end, @@ -1636,13 +1636,13 @@ maybe_tracer_done(Pid,Expected,Got,Caller) -> check_tracer(T) -> receive tracer_done -> - dbg:stop_clear(), + dbg:stop(), ok; {tracer_got_unexpected,Got,Expected} -> - dbg:stop_clear(), + dbg:stop(), ct:fail({tracer_got_unexpected,Got,Expected}) after T -> - dbg:stop_clear(), + dbg:stop(), ct:fail({timeout,tracer}) end. diff --git a/lib/kernel/test/logger_std_h_SUITE.erl b/lib/kernel/test/logger_std_h_SUITE.erl index ead4418d0d..88aac32f6f 100644 --- a/lib/kernel/test/logger_std_h_SUITE.erl +++ b/lib/kernel/test/logger_std_h_SUITE.erl @@ -2219,7 +2219,7 @@ tpl([]) -> ok. stop_clear() -> - dbg:stop_clear(), + dbg:stop(), %% Remove tracer from all processes in order to eliminate %% race conditions. erlang:trace(all,false,[all]). diff --git a/lib/kernel/test/logger_stress_SUITE.erl b/lib/kernel/test/logger_stress_SUITE.erl index 7fe12ca823..9209026322 100644 --- a/lib/kernel/test/logger_stress_SUITE.erl +++ b/lib/kernel/test/logger_stress_SUITE.erl @@ -343,7 +343,7 @@ cascade({PNode,PMFA,_PStatProcs},{CNode,CMFA,_CStatProcs},TestFun) -> after TO -> All = ets:lookup_element(Tab,producer,2), Written = ets:lookup_element(Tab,consumer,2), - dbg:stop_clear(), + dbg:stop(), ?COLLECT_STATS(All, [{PNode,P,Id} || {Id,P} <- _PStatProcs] ++ [{CNode,P,Id} || {Id,P} <- _CStatProcs]), |