diff options
Diffstat (limited to 'lib/runtime_tools')
-rw-r--r-- | lib/runtime_tools/c_src/trace_file_drv.c | 4 | ||||
-rw-r--r-- | lib/runtime_tools/doc/src/dbg.xml | 12 | ||||
-rw-r--r-- | lib/runtime_tools/doc/src/erts_alloc_config.xml | 8 | ||||
-rw-r--r-- | lib/runtime_tools/doc/src/notes.xml | 72 | ||||
-rw-r--r-- | lib/runtime_tools/doc/src/notes_history.xml | 2 | ||||
-rw-r--r-- | lib/runtime_tools/doc/src/part_notes_history.xml | 2 | ||||
-rw-r--r-- | lib/runtime_tools/doc/src/runtime_tools_app.xml | 2 | ||||
-rw-r--r-- | lib/runtime_tools/src/dbg.erl | 71 | ||||
-rw-r--r-- | lib/runtime_tools/src/inviso_autostart.erl | 11 | ||||
-rw-r--r-- | lib/runtime_tools/src/inviso_autostart_server.erl | 12 | ||||
-rw-r--r-- | lib/runtime_tools/src/inviso_rt.erl | 70 | ||||
-rw-r--r-- | lib/runtime_tools/test/Makefile | 4 | ||||
-rw-r--r-- | lib/runtime_tools/test/dbg_SUITE.erl | 39 | ||||
-rw-r--r-- | lib/runtime_tools/test/erts_alloc_config_SUITE.erl | 32 | ||||
-rw-r--r-- | lib/runtime_tools/test/inviso_SUITE.erl | 77 | ||||
-rw-r--r-- | lib/runtime_tools/test/runtime_tools.cover | 4 | ||||
-rw-r--r-- | lib/runtime_tools/test/runtime_tools.spec | 2 | ||||
-rw-r--r-- | lib/runtime_tools/test/runtime_tools_SUITE.erl | 27 | ||||
-rw-r--r-- | lib/runtime_tools/vsn.mk | 2 |
19 files changed, 299 insertions, 154 deletions
diff --git a/lib/runtime_tools/c_src/trace_file_drv.c b/lib/runtime_tools/c_src/trace_file_drv.c index 482fcc0288..668f6f4af3 100644 --- a/lib/runtime_tools/c_src/trace_file_drv.c +++ b/lib/runtime_tools/c_src/trace_file_drv.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 1999-2009. All Rights Reserved. + * Copyright Ericsson AB 1999-2011. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -520,7 +520,7 @@ static int do_write(FILETYPE fd, unsigned char *buff, int siz) { */ static int my_write(TraceFileData *data, unsigned char *buff, int siz) { - int wrote, w; + int wrote; if (data->buff_siz - data->buff_pos >= siz) { memcpy(data->buff + data->buff_pos, buff, siz); diff --git a/lib/runtime_tools/doc/src/dbg.xml b/lib/runtime_tools/doc/src/dbg.xml index 0e63649c09..f26789fa21 100644 --- a/lib/runtime_tools/doc/src/dbg.xml +++ b/lib/runtime_tools/doc/src/dbg.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -706,7 +706,7 @@ Error: fun containing local erlang function calls ('is_atomm' called in guard) c value from the last invocation of the fun. The initial value of the second parameter is specified in the <c>InitialData</c> part of the <c>HandlerSpec</c>. The <c>HandlerFun</c> may - chose any appropriate action to take when invoked, and can + choose any appropriate action to take when invoked, and can save a state for the next invocation by returning it. </p> <p>If <c>Type</c> is a port, then the second parameter should @@ -766,7 +766,7 @@ Error: fun containing local erlang function calls ('is_atomm' called in guard) c <p>This function creates a trace port generating <em>fun</em>. The <em>fun</em> takes no arguments and returns a newly opened trace port. The return value from this function is suitable as - a second parameter to tracer/2, i. e. <c>dbg:tracer(port, dbg:trace_port(ip, 4711))</c>. </p> + a second parameter to tracer/2, i.e. <c>dbg:tracer(port, dbg:trace_port(ip, 4711))</c>. </p> <p>A trace port is an Erlang port to a dynamically linked in driver that handles trace messages directly, without the overhead of sending them @@ -852,9 +852,9 @@ Error: fun containing local erlang function calls ('is_atomm' called in guard) c <desc> <p>This function is used to do a control operation on the active trace port driver on the given node - (<c>Nodename</c>). Which operations that are allowed as well - as their return values are depending on which trace driver - that is used.</p> + (<c>Nodename</c>). Which operations are allowed as well + as their return values depend on which trace driver + is used.</p> <p>Returns either <c>ok</c> or <c>{ok, Result}</c> if the operation was successful, or <c>{error, Reason}</c> if the current tracer is a process diff --git a/lib/runtime_tools/doc/src/erts_alloc_config.xml b/lib/runtime_tools/doc/src/erts_alloc_config.xml index 5e7cbe4172..6acf498411 100644 --- a/lib/runtime_tools/doc/src/erts_alloc_config.xml +++ b/lib/runtime_tools/doc/src/erts_alloc_config.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>2007</year><year>2009</year> + <year>2007</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>erts_alloc_config</title> @@ -68,7 +68,7 @@ command-line flag to the Erlang runtime system you are going to use for creation of the allocator configuration. It will disable features that prevent <c>erts_alloc_config</c> from - doing it's job. Note, you should <em>not</em> use this flag + doing its job. Note, you should <em>not</em> use this flag when using the created configuration. Also note that it is important that you use the same <seealso marker="erts:erl#+S">amount of schedulers</seealso> diff --git a/lib/runtime_tools/doc/src/notes.xml b/lib/runtime_tools/doc/src/notes.xml index 9eb13727c7..0bb76e1ea4 100644 --- a/lib/runtime_tools/doc/src/notes.xml +++ b/lib/runtime_tools/doc/src/notes.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2004</year><year>2010</year> + <year>2004</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -31,6 +31,76 @@ <p>This document describes the changes made to the Runtime_Tools application.</p> +<section><title>Runtime_Tools 1.8.6</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Two new built-in trace pattern aliases have been added: + caller_trace (c) and caller_exception_trace (cx). See the + dbg:ltp/0 documentation for more info.</p> + <p> + Own Id: OTP-9458</p> + </item> + </list> + </section> + +</section> + +<section><title>Runtime_Tools 1.8.5</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + When a big number of trace patterns are set by inviso the + Erlang VM could get unresponsive for several seconds. + This is now corrected.</p> + <p> + Own Id: OTP-9048 Aux Id: seq11480 </p> + </item> + </list> + </section> + +</section> + +<section><title>Runtime_Tools 1.8.4.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Minor corrections and removal of a temporary workaround.</p> + <p> + Own Id: OTP-8755 Aux Id: seq-11628, seq-11639 </p> + </item> + <item> + <p> + Small fix in inviso_autostart_server.</p> + <p> + Own Id: OTP-8783 Aux Id: seq11628 </p> + </item> + </list> + </section> + +</section> + +<section><title>Runtime_Tools 1.8.4</title> + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Miscellaneous updates.</p> + <p> + Own Id: OTP-8705</p> + </item> + </list> + </section> + +</section> + <section><title>Runtime_Tools 1.8.3</title> <section><title>Improvements and New Features</title> diff --git a/lib/runtime_tools/doc/src/notes_history.xml b/lib/runtime_tools/doc/src/notes_history.xml index 587d935e0a..8fe27f619c 100644 --- a/lib/runtime_tools/doc/src/notes_history.xml +++ b/lib/runtime_tools/doc/src/notes_history.xml @@ -5,7 +5,7 @@ <header> <copyright> <year>2006</year> - <year>2007</year> + <year>2011</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/runtime_tools/doc/src/part_notes_history.xml b/lib/runtime_tools/doc/src/part_notes_history.xml index cdd727780c..2ce1a5de05 100644 --- a/lib/runtime_tools/doc/src/part_notes_history.xml +++ b/lib/runtime_tools/doc/src/part_notes_history.xml @@ -5,7 +5,7 @@ <header> <copyright> <year>2006</year> - <year>2007</year> + <year>2011</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/runtime_tools/doc/src/runtime_tools_app.xml b/lib/runtime_tools/doc/src/runtime_tools_app.xml index e31c8cb5f7..1fd61b84d8 100644 --- a/lib/runtime_tools/doc/src/runtime_tools_app.xml +++ b/lib/runtime_tools/doc/src/runtime_tools_app.xml @@ -5,7 +5,7 @@ <header> <copyright> <year>1999</year> - <year>2007</year> + <year>2011</year> <holder>Ericsson AB, All Rights Reserved</holder> </copyright> <legalnotice> diff --git a/lib/runtime_tools/src/dbg.erl b/lib/runtime_tools/src/dbg.erl index 66ac0422eb..56283f4d3d 100644 --- a/lib/runtime_tools/src/dbg.erl +++ b/lib/runtime_tools/src/dbg.erl @@ -1,19 +1,19 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1996-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 1996-2010. All Rights Reserved. +%% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this software. If not, it can be %% retrieved online at http://www.erlang.org/. -%% +%% %% Software distributed under the License is distributed on an "AS IS" %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See %% the License for the specific language governing rights and limitations %% under the License. -%% +%% %% %CopyrightEnd% %% -module(dbg). @@ -945,7 +945,7 @@ dhandler(end_of_trace, Out) -> dhandler(Trace, Out) when element(1, Trace) == trace, tuple_size(Trace) >= 3 -> dhandler1(Trace, tuple_size(Trace), Out); dhandler(Trace, Out) when element(1, Trace) == trace_ts, tuple_size(Trace) >= 4 -> - dhandler1(Trace, tuple_size(Trace)-1, Out); + dhandler1(Trace, tuple_size(Trace)-1, element(tuple_size(Trace),Trace), Out); dhandler(Trace, Out) when element(1, Trace) == drop, tuple_size(Trace) =:= 2 -> io:format(Out, "*** Dropped ~p messages.~n", [element(2,Trace)]), Out; @@ -978,24 +978,18 @@ dhandler(_Trace, Out) -> Out. dhandler1(Trace, Size, Out) -> -%%%! Self = self(), From = element(2, Trace), case element(3, Trace) of 'receive' -> case element(4, Trace) of {dbg,ok} -> ok; - Message -> io:format(Out, "(~p) << ~p~n", [From,Message]) + Message -> + io:format(Out, "(~p) << ~p~n", [From,Message]) end; 'send' -> Message = element(4, Trace), - case element(5, Trace) of -%%%! This causes messages to disappear when used by ttb (observer). Tests -%%%! so far show that there is no difference in results with dbg even if I -%%%! comment it out, so I hope this is only some old code which isn't -%%%! needed anymore... /siri -%%%! Self -> ok; - To -> io:format(Out, "(~p) ~p ! ~p~n", [From,To,Message]) - end; + To = element(5, Trace), + io:format(Out, "(~p) ~p ! ~p~n", [From,To,Message]); call -> case element(4, Trace) of MFA when Size == 5 -> @@ -1028,6 +1022,51 @@ dhandler1(Trace, Size, Out) -> end, Out. +dhandler1(Trace, Size, TS, Out) -> + From = element(2, Trace), + case element(3, Trace) of + 'receive' -> + case element(4, Trace) of + {dbg,ok} -> ok; + Message -> + io:format(Out, "(~p) << ~p (Timestamp: ~p)~n", [From,Message,TS]) + end; + 'send' -> + Message = element(4, Trace), + To = element(5, Trace), + io:format(Out, "(~p) ~p ! ~p (Timestamp: ~p)~n", [From,To,Message,TS]); + call -> + case element(4, Trace) of + MFA when Size == 5 -> + Message = element(5, Trace), + io:format(Out, "(~p) call ~s (~p) (Timestamp: ~p)~n", [From,ffunc(MFA),Message,TS]); + MFA -> + io:format(Out, "(~p) call ~s (Timestamp: ~p)~n", [From,ffunc(MFA),TS]) + end; + return -> %% To be deleted... + case element(4, Trace) of + MFA when Size == 5 -> + Ret = element(5, Trace), + io:format(Out, "(~p) old_ret ~s -> ~p (Timestamp: ~p)~n", [From,ffunc(MFA),Ret,TS]); + MFA -> + io:format(Out, "(~p) old_ret ~s (Timestamp: ~p)~n", [From,ffunc(MFA),TS]) + end; + return_from -> + MFA = element(4, Trace), + Ret = element(5, Trace), + io:format(Out, "(~p) returned from ~s -> ~p (Timestamp: ~p)~n", [From,ffunc(MFA),Ret,TS]); + return_to -> + MFA = element(4, Trace), + io:format(Out, "(~p) returning to ~s (Timestamp: ~p)~n", [From,ffunc(MFA),TS]); + spawn when Size == 5 -> + Pid = element(4, Trace), + MFA = element(5, Trace), + io:format(Out, "(~p) spawn ~p as ~s (Timestamp: ~p)~n", [From,Pid,ffunc(MFA),TS]); + Op -> + io:format(Out, "(~p) ~p ~s (Timestamp: ~p)~n", [From,Op,ftup(Trace,4,Size),TS]) + end, + Out. + %%% These f* functions returns non-flat strings diff --git a/lib/runtime_tools/src/inviso_autostart.erl b/lib/runtime_tools/src/inviso_autostart.erl index 134133ad1f..787292e244 100644 --- a/lib/runtime_tools/src/inviso_autostart.erl +++ b/lib/runtime_tools/src/inviso_autostart.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2006-2009. All Rights Reserved. +%% Copyright Ericsson AB 2006-2010. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -59,17 +59,10 @@ autostart(_AutoModArgs) -> case try_load_module(FileNames) of ok -> autostart_apply(M,F); + false -> % No such module available "inviso_autostart.config" end; - {ok,{gettia_asc,asc_file}} -> % Uggly hack to not have to change in GSN-CPS. - case try_load_module(["/tmp/DPE_COMMONLOG/gettia_asc", - "/tmp/DPE_COMMONLOG/gettia_overload"]) of - ok -> - autostart_apply(gettia_asc,asc_file); - false -> % No such module available - false - end; {ok,{M,F}} -> % Use M:F(node()) autostart_apply(M,F); {ok,no_autostart} -> diff --git a/lib/runtime_tools/src/inviso_autostart_server.erl b/lib/runtime_tools/src/inviso_autostart_server.erl index 5af96e4e39..1e352822f4 100644 --- a/lib/runtime_tools/src/inviso_autostart_server.erl +++ b/lib/runtime_tools/src/inviso_autostart_server.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2006-2009. All Rights Reserved. +%% Copyright Ericsson AB 2006-2010. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -84,7 +84,7 @@ init(ArgsFromConfig) -> case get_tracerdata_opts(ArgsFromConfig) of {ok,TracerData} -> % Otherwise we can not start a trace! case inviso_rt:init_tracing(TracerData) of - {ok,_} -> % Ok, tracing has been initiated. + {ok,_Response} -> % Ok, tracing has been initiated. case get_cmdfiles_opts(ArgsFromConfig) of {ok,CmdFiles} -> % List of cmd-files. Bindings=get_initialbindings_opts(ArgsFromConfig), @@ -164,11 +164,11 @@ interpret_cmd_files([{FileName,LocalBindings}|Rest],GlobalBindings,Translations, Bindings=join_local_and_global_vars(LocalBindings,GlobalBindings), interpret_cmd_files_1(FileName,Bindings,Translations,Dbg), interpret_cmd_files(Rest,GlobalBindings,Translations,Dbg); -interpret_cmd_files([FileName|Rest],GlobalBindings,Translations,Dbg) -> - interpret_cmd_files_1(FileName,GlobalBindings,Translations,Dbg), - interpret_cmd_files(Rest,GlobalBindings,Translations,Dbg); interpret_cmd_files([],_,_,_) -> % Done, return nothing significant! - true. + true; +interpret_cmd_files(FileName,GlobalBindings,Translations,Dbg) -> + interpret_cmd_files_1(FileName,GlobalBindings,Translations,Dbg). +% interpret_cmd_files(Rest,GlobalBindings,Translations,Dbg). %% This is "inline" inviso calls. interpret_cmd_files_1({inviso,F,Args},Bindings,Translations,Dbg) -> diff --git a/lib/runtime_tools/src/inviso_rt.erl b/lib/runtime_tools/src/inviso_rt.erl index dfab70b42e..ac7ac2a584 100644 --- a/lib/runtime_tools/src/inviso_rt.erl +++ b/lib/runtime_tools/src/inviso_rt.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -1422,7 +1422,17 @@ do_set_trace_patterns(Args,Flags) -> do_set_trace_patterns_2([{M,F,Arity,MS}|Rest],Flags,Replies) -> % Option-less. do_set_trace_patterns_2([{M,F,Arity,MS,[]}|Rest],Flags,Replies); -do_set_trace_patterns_2([{M,F,Arity,MS,Opts}|Rest],Flags,Replies) when is_atom(M) -> +do_set_trace_patterns_2(Mlist = [{M,F,Arity,MS,Opts}|Rest],Flags,Replies) when is_atom(M) -> + case length(Mlist) rem 10 of + 0 -> + timer:sleep(100); + _ -> + ok + end, + %% sleep 100 ms for every 10:th element in the list to let other + %% processes run since this is a potentially + %% heavy operation that might result in an unresponsive Erlang VM for + %% several seconds otherwise case load_module_on_option(M,Opts) of true -> % Already present, loaded or no option! case catch erlang:trace_pattern({M,F,Arity},MS,Flags) of @@ -1438,30 +1448,11 @@ do_set_trace_patterns_2([{M,F,Arity,MS,Opts}|Rest],Flags,Replies) when is_atom(M do_set_trace_patterns_2(Rest,Flags,[0|Replies]) end; do_set_trace_patterns_2([{M,F,Arity,MS,Opts}|Rest],Flags,Replies) when is_list(M) -> - case check_pattern_parameters(void,F,Arity,MS) of % We don't want to repeat bad params. - ok -> - case inviso_rt_lib:expand_regexp(M,Opts) of % Get a list of real modulnames. - Mods when is_list(Mods) -> - MoreReplies= - do_set_trace_patterns_2(lists:map(fun(Mod)-> - {Mod,F,Arity,MS,Opts} - end, - Mods), - Flags, - Replies), - do_set_trace_patterns_2(Rest,Flags,MoreReplies); - {error,Reason} -> - do_set_trace_patterns_2(Rest,Flags,[{error,Reason}|Replies]) - end; - error -> % Bad pattern parameters. - do_set_trace_patterns_2(Rest, - Flags, - [{error,{bad_trace_args,{M,F,Arity,MS}}}|Replies]) - end; + do_set_trace_patterns_2([{{void,M},F,Arity,MS,Opts}|Rest],Flags,Replies); do_set_trace_patterns_2([{{Dir,M},F,Arity,MS,Opts}|Rest],Flags,Replies) when is_list(Dir),is_list(M) -> - case check_pattern_parameters(void,F,Arity,MS) of % We don't want to repeat bad params. - ok -> + case check_pattern_parameters('_',F,Arity,MS) of % We don't want to repeat bad params. + true -> case inviso_rt_lib:expand_regexp(Dir,M,Opts) of % Get a list of real modulnames. Mods when is_list(Mods) -> MoreReplies= @@ -1475,7 +1466,7 @@ do_set_trace_patterns_2([{{Dir,M},F,Arity,MS,Opts}|Rest],Flags,Replies) {error,Reason} -> do_set_trace_patterns_2(Rest,Flags,[{error,Reason}|Replies]) end; - error -> % Bad pattern parameters. + false -> % Bad pattern parameters. do_set_trace_patterns_2(Rest, Flags, [{error,{bad_trace_args,{M,F,Arity,MS}}}|Replies]) @@ -2174,21 +2165,20 @@ check_flags_2([Faulty|_],_Flags) -> {error,{bad_flag,Faulty}}. %% the function is to avoid to get multiple error return values in the return %% list for a pattern used together with a regexp expanded module name. check_pattern_parameters(Mod,Func,Arity,MS) -> - if - (Mod=='_') and (Func=='_') and (Arity=='_') and - (is_list(MS) or (MS==true) or (MS==false)) -> - ok; - (is_atom(Mod) and (Mod/='_')) and (Func=='_') and (Arity=='_') and - (is_list(MS) or (MS==true) or (MS==false)) -> - ok; - (is_atom(Mod) and (Mod/='_')) and - (is_atom(Func) and (Func/='_')) and - ((Arity=='_') or is_integer(Arity)) and - (is_list(MS) or (MS==true) or (MS==false)) -> - ok; - true -> - error - end. + MSresult = check_MS(MS), + MFAresult = check_MFA(Mod,Func,Arity), + MFAresult and MSresult. + +check_MS(MS) when is_list(MS) -> true; +check_MS(true) -> true; +check_MS(false) -> true. + +check_MFA('_','_','_') -> true; +check_MFA(Mod,'_','_') when is_atom(Mod) -> true; +check_MFA(Mod,'_',A) when is_atom(Mod), is_integer(A) -> false; +check_MFA(Mod,F,'_') when is_atom(Mod), is_atom(F) -> true; +check_MFA(Mod,F,A) when is_atom(Mod), is_atom(F), is_integer(A) -> true. + %% ----------------------------------------------------------------------------- %% Help function finding out if Mod is loaded, and if not, if it can successfully diff --git a/lib/runtime_tools/test/Makefile b/lib/runtime_tools/test/Makefile index 873d395277..cfaf420d65 100644 --- a/lib/runtime_tools/test/Makefile +++ b/lib/runtime_tools/test/Makefile @@ -57,9 +57,9 @@ release_spec: opt release_tests_spec: make_emakefile $(INSTALL_DIR) $(RELSYSDIR) - $(INSTALL_DATA) runtime_tools.spec $(ERL_FILES) $(RELSYSDIR) + $(INSTALL_DATA) runtime_tools.spec runtime_tools.cover $(ERL_FILES) $(RELSYSDIR) $(INSTALL_DATA) $(EMAKEFILE) runtime_tools.cover $(RELSYSDIR) - chmod -f -R u+w $(RELSYSDIR) + chmod -R u+w $(RELSYSDIR) @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -) release_docs_spec: diff --git a/lib/runtime_tools/test/dbg_SUITE.erl b/lib/runtime_tools/test/dbg_SUITE.erl index ff96af5e86..bd908c1f3a 100644 --- a/lib/runtime_tools/test/dbg_SUITE.erl +++ b/lib/runtime_tools/test/dbg_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010. All Rights Reserved. +%% Copyright Ericsson AB 2010-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -19,30 +19,51 @@ -module(dbg_SUITE). %% Test functions --export([all/1, big/1, tiny/1, simple/1, message/1, distributed/1, +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2, + big/1, tiny/1, simple/1, message/1, distributed/1, ip_port/1, file_port/1, file_port2/1, file_port_schedfix/1, ip_port_busy/1, wrap_port/1, wrap_port_time/1, with_seq_trace/1, dead_suspend/1, local_trace/1, saved_patterns/1]). --export([init_per_testcase/2, fin_per_testcase/2]). +-export([init_per_testcase/2, end_per_testcase/2]). -export([tracee1/1, tracee2/1]). -export([dummy/0, exported/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -define(default_timeout, ?t:minutes(1)). init_per_testcase(_Case, Config) -> ?line Dog=test_server:timetrap(?default_timeout), [{watchdog, Dog}|Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> Dog=?config(watchdog, Config), test_server:timetrap_cancel(Dog), ok. -all(suite) -> [big, tiny, simple, message, distributed, - ip_port, file_port, file_port2, file_port_schedfix, - ip_port_busy, wrap_port, wrap_port_time, - with_seq_trace, dead_suspend, local_trace, saved_patterns]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [big, tiny, simple, message, distributed, ip_port, + file_port, file_port2, file_port_schedfix, ip_port_busy, + wrap_port, wrap_port_time, with_seq_trace, dead_suspend, + local_trace, saved_patterns]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + big(suite) -> []; big(doc) -> ["Rudimentary interface test"]; diff --git a/lib/runtime_tools/test/erts_alloc_config_SUITE.erl b/lib/runtime_tools/test/erts_alloc_config_SUITE.erl index 32483dbe73..8ea04e1767 100644 --- a/lib/runtime_tools/test/erts_alloc_config_SUITE.erl +++ b/lib/runtime_tools/test/erts_alloc_config_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010. All Rights Reserved. +%% Copyright Ericsson AB 2010-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -21,10 +21,12 @@ %-define(line_trace, 1). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). %-compile(export_all). --export([all/1, init_per_testcase/2, fin_per_testcase/2]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2, + init_per_testcase/2, end_per_testcase/2]). %% Testcases -export([basic/1]). @@ -34,15 +36,33 @@ -define(DEFAULT_TIMEOUT, ?t:minutes(2)). -all(doc) -> []; -all(suite) -> [basic]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [basic]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + init_per_testcase(Case, Config) when is_list(Config) -> [{testcase, Case}, {watchdog, ?t:timetrap(?DEFAULT_TIMEOUT)}, {erl_flags_env, save_env()} | Config]. -fin_per_testcase(_Case, Config) when is_list(Config) -> +end_per_testcase(_Case, Config) when is_list(Config) -> ?t:timetrap_cancel(?config(watchdog, Config)), restore_env(?config(erl_flags_env, Config)), ok. diff --git a/lib/runtime_tools/test/inviso_SUITE.erl b/lib/runtime_tools/test/inviso_SUITE.erl index 1c5c887b62..3ae8d34dd6 100644 --- a/lib/runtime_tools/test/inviso_SUITE.erl +++ b/lib/runtime_tools/test/inviso_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010. All Rights Reserved. +%% Copyright Ericsson AB 2010-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -29,49 +29,40 @@ -module(inviso_SUITE). -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include_lib("kernel/include/file.hrl"). -define(l,?line). -all(suite) -> - [ - basic_dist_trace_1, - basic_dist_trace_2, - basic_dist_trace_3, - basic_dist_trace_ti_1, - basic_dist_trace_ti_2, - basic_dist_trace_ti_3, - suspend_dist_trace_ti_1, - suspend_dist_trace_ti_2, - meta_cleanfunc_dist_1, - basic_handlerfun_dist_1, - delete_log_dist_1, - autostart_dist_1, - autostart_dist_2, - autostart_dist_3, - running_alone_dist_1, - running_alone_dist_2, - running_alone_dist_3, - running_alone_dist_4, - running_alone_dist_5, - overload_dist_1, - overload_dist_2, - overload_dist_3, - overload_dist_4, - overload_dist_5, - subscribe_dist_1, - lfm_trace_dist_1, - lfm_trace_ti_dist_2, - handle_logfile_sort_wrapset, - fetch_log_dist_trace_1, - fetch_log_dist_trace_2, - fetch_log_dist_trace_3, - fetch_log_dist_error_1, - fetch_log_dist_error_2, - expand_regexp_dist_1, - only_loaded_dist_1 - ]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [basic_dist_trace_1, basic_dist_trace_2, + basic_dist_trace_3, basic_dist_trace_ti_1, + basic_dist_trace_ti_2, basic_dist_trace_ti_3, + suspend_dist_trace_ti_1, suspend_dist_trace_ti_2, + meta_cleanfunc_dist_1, basic_handlerfun_dist_1, + delete_log_dist_1, autostart_dist_1, autostart_dist_2, + autostart_dist_3, running_alone_dist_1, + running_alone_dist_2, running_alone_dist_3, + running_alone_dist_4, running_alone_dist_5, + overload_dist_1, overload_dist_2, overload_dist_3, + overload_dist_4, overload_dist_5, subscribe_dist_1, + lfm_trace_dist_1, lfm_trace_ti_dist_2, + handle_logfile_sort_wrapset, fetch_log_dist_trace_1, + fetch_log_dist_trace_2, fetch_log_dist_trace_3, + fetch_log_dist_error_1, fetch_log_dist_error_2, + expand_regexp_dist_1, only_loaded_dist_1]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + init_per_suite(Config) -> @@ -133,7 +124,7 @@ init_per_testcase(_Case,Config) -> insert_timetraphandle_config(TH,NewConfig2). %% ----------------------------------------------------------------------------- -fin_per_testcase(Case,Config) -> +end_per_testcase(Case,Config) -> ?l test_server:stop_node(get_remotenode_config(inviso1,Config)), ?l test_server:stop_node(get_remotenode_config(inviso2,Config)), @@ -142,14 +133,14 @@ fin_per_testcase(Case,Config) -> true; Pid when is_pid(Pid) -> % But if it exists... exit(Pid,kill), % Remove it! - io:format("Had to kill the control component in fin_per_testcase,~p.~n",[Case]) + io:format("Had to kill the control component in end_per_testcase,~p.~n",[Case]) end, case whereis(inviso_rt) of undefined -> % Should not exist. true; Pid2 when is_pid(Pid2) -> % But if it exists... exit(Pid2,kill), % Remove it! - io:format("Had to kill local runtime component in fin_per_testcase,~p.~n",[Case]) + io:format("Had to kill local runtime component in end_per_testcase,~p.~n",[Case]) end, ?l process_killer([inviso_test_proc, inviso_tab_proc, diff --git a/lib/runtime_tools/test/runtime_tools.cover b/lib/runtime_tools/test/runtime_tools.cover index 2d62ebe6ac..ef850bc377 100644 --- a/lib/runtime_tools/test/runtime_tools.cover +++ b/lib/runtime_tools/test/runtime_tools.cover @@ -1 +1,3 @@ -{exclude,[observer_backend]}. +{incl_app,runtime_tools,details}. + +{excl_mods, runtime_tools, [observer_backend]}. diff --git a/lib/runtime_tools/test/runtime_tools.spec b/lib/runtime_tools/test/runtime_tools.spec index a60a533ce2..0a24232be8 100644 --- a/lib/runtime_tools/test/runtime_tools.spec +++ b/lib/runtime_tools/test/runtime_tools.spec @@ -1 +1 @@ -{topcase, {dir, "../runtime_tools_test"}}. +{suites,"../runtime_tools_test",all}. diff --git a/lib/runtime_tools/test/runtime_tools_SUITE.erl b/lib/runtime_tools/test/runtime_tools_SUITE.erl index 84e255e126..b26f3dd881 100644 --- a/lib/runtime_tools/test/runtime_tools_SUITE.erl +++ b/lib/runtime_tools/test/runtime_tools_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2010. All Rights Reserved. +%% Copyright Ericsson AB 2010-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -17,10 +17,11 @@ %% %CopyrightEnd% %% -module(runtime_tools_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/1]). +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, + init_per_group/2,end_per_group/2]). -export([init_per_testcase/2, end_per_testcase/2]). %% Test cases @@ -38,9 +39,27 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -all(suite) -> +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> [app_file]. +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + app_file(suite) -> []; app_file(doc) -> diff --git a/lib/runtime_tools/vsn.mk b/lib/runtime_tools/vsn.mk index 4bbdef19de..0bcd261861 100644 --- a/lib/runtime_tools/vsn.mk +++ b/lib/runtime_tools/vsn.mk @@ -1 +1 @@ -RUNTIME_TOOLS_VSN = 1.8.3 +RUNTIME_TOOLS_VSN = 1.8.6 |