aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/call_trace_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-05-11 15:57:50 +0200
committerBjörn Gustavsson <[email protected]>2012-06-28 11:29:47 +0200
commit00d769bf3d35df706dbbb9155052183db3631475 (patch)
tree55ab277fe23474eb084307fbe8b86de6d3b7f31d /erts/emulator/test/call_trace_SUITE.erl
parentbf5bf8b93dccca86c4775b21ee0db49eb6a3b133 (diff)
downloadotp-00d769bf3d35df706dbbb9155052183db3631475.tar.gz
otp-00d769bf3d35df706dbbb9155052183db3631475.tar.bz2
otp-00d769bf3d35df706dbbb9155052183db3631475.zip
Strengthen trace test cases
Diffstat (limited to 'erts/emulator/test/call_trace_SUITE.erl')
-rw-r--r--erts/emulator/test/call_trace_SUITE.erl13
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/emulator/test/call_trace_SUITE.erl b/erts/emulator/test/call_trace_SUITE.erl
index a642c3a63a..eaecd32f95 100644
--- a/erts/emulator/test/call_trace_SUITE.erl
+++ b/erts/emulator/test/call_trace_SUITE.erl
@@ -78,7 +78,13 @@ init_per_testcase(Func, Config) when is_atom(Func), is_list(Config) ->
end_per_testcase(_Func, Config) ->
Dog = ?config(watchdog, Config),
- ?t:timetrap_cancel(Dog).
+ ?t:timetrap_cancel(Dog),
+
+ %% Reloading the module will clear all trace patterns, and
+ %% in a debug-compiled emulator run assertions of the counters
+ %% for the number of traced exported functions in this module.
+
+ c:l(?MODULE).
hipe(Config) when is_list(Config) ->
?line 0 = erlang:trace_pattern({?MODULE,worker_foo,1}, true),
@@ -187,7 +193,12 @@ basic() ->
%% Trace some functions...
?line trace_func({lists,'_','_'}, []),
+
+ %% Make sure that tracing the same functions more than once
+ %% does not cause any problems.
?line 3 = trace_func({?MODULE,foo,'_'}, true),
+ ?line 3 = trace_func({?MODULE,foo,'_'}, true),
+ ?line 1 = trace_func({?MODULE,bar,0}, true),
?line 1 = trace_func({?MODULE,bar,0}, true),
?line {traced,global} = trace_info({?MODULE,bar,0}, traced),
?line 1 = trace_func({erlang,list_to_integer,1}, true),