aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2019-05-27 20:44:54 +0200
committerSverker Eriksson <[email protected]>2019-05-28 17:34:52 +0200
commit240acb9617f54761c820bb9a296a2e0256ed83a9 (patch)
tree47c5b27de58684db5a06a5bcc3b67b9408072ca6 /lib/kernel/test
parent1b306c8a0755aca9de55fee2b02e38d17b696dfd (diff)
downloadotp-240acb9617f54761c820bb9a296a2e0256ed83a9.tar.gz
otp-240acb9617f54761c820bb9a296a2e0256ed83a9.tar.bz2
otp-240acb9617f54761c820bb9a296a2e0256ed83a9.zip
erts: Fix seq_trace:print/2 for arbitrary labels
Would raise badarg if Label was not atom or small integer.
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/seq_trace_SUITE.erl12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/kernel/test/seq_trace_SUITE.erl b/lib/kernel/test/seq_trace_SUITE.erl
index 7c1413287c..9d97254dc0 100644
--- a/lib/kernel/test/seq_trace_SUITE.erl
+++ b/lib/kernel/test/seq_trace_SUITE.erl
@@ -147,17 +147,19 @@ tracer_set_get(Config) when is_list(Config) ->
ok.
print(Config) when is_list(Config) ->
- lists:foreach(fun do_print/1, ?TIMESTAMP_MODES).
+ [do_print(TsType, Label) || TsType <- ?TIMESTAMP_MODES,
+ Label <- [17, "label"]].
-do_print(TsType) ->
+do_print(TsType, Label) ->
start_tracer(),
+ seq_trace:set_token(label, Label),
set_token_flags([print, TsType]),
- seq_trace:print(0,print1),
+ seq_trace:print(Label,print1),
seq_trace:print(1,print2),
seq_trace:print(print3),
seq_trace:reset_trace(),
- [{0,{print,_,_,[],print1}, Ts0},
- {0,{print,_,_,[],print3}, Ts1}] = stop_tracer(2),
+ [{Label,{print,_,_,[],print1}, Ts0},
+ {Label,{print,_,_,[],print3}, Ts1}] = stop_tracer(2),
check_ts(TsType, Ts0),
check_ts(TsType, Ts1).