aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2018-08-03 09:49:30 +0200
committerLukas Larsson <[email protected]>2018-08-03 09:49:30 +0200
commit6eb0ac82908ebd9b6aa2b14b96cc699c97f0576f (patch)
treeee5b1c528bed10a01be84777ed4114b433cf60f5 /lib
parentbaf4d126ba0622e35eb881d199ce99f42b60e31b (diff)
parent0ae934aa008f9ff2a929eafc52811fcde619631a (diff)
downloadotp-6eb0ac82908ebd9b6aa2b14b96cc699c97f0576f.tar.gz
otp-6eb0ac82908ebd9b6aa2b14b96cc699c97f0576f.tar.bz2
otp-6eb0ac82908ebd9b6aa2b14b96cc699c97f0576f.zip
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/seq_trace_SUITE.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/kernel/test/seq_trace_SUITE.erl b/lib/kernel/test/seq_trace_SUITE.erl
index ceb4e9cc49..cf4bf11328 100644
--- a/lib/kernel/test/seq_trace_SUITE.erl
+++ b/lib/kernel/test/seq_trace_SUITE.erl
@@ -783,6 +783,24 @@ do_shrink(N) ->
erlang:garbage_collect(),
do_shrink(N-1).
+%% Test that messages from a port does not clear the token
+port_clean_token(Config) when is_list(Config) ->
+ seq_trace:reset_trace(),
+ Label = make_ref(),
+ seq_trace:set_token(label, Label),
+ {label,Label} = seq_trace:get_token(label),
+
+ %% Create a port and get messages from it
+ %% We use os:cmd as a convenience as it does
+ %% open_port, port_command, port_close and receives replies.
+ %% Maybe it is not ideal to rely on the internal implementation
+ %% of os:cmd but it will have to do.
+ os:cmd("ls"),
+
+ %% Make sure that the seq_trace token is still there
+ {label,Label} = seq_trace:get_token(label),
+
+ ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%