diff options
author | Lukas Larsson <[email protected]> | 2018-08-03 09:49:30 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-08-03 09:49:30 +0200 |
commit | 6eb0ac82908ebd9b6aa2b14b96cc699c97f0576f (patch) | |
tree | ee5b1c528bed10a01be84777ed4114b433cf60f5 /lib/kernel | |
parent | baf4d126ba0622e35eb881d199ce99f42b60e31b (diff) | |
parent | 0ae934aa008f9ff2a929eafc52811fcde619631a (diff) | |
download | otp-6eb0ac82908ebd9b6aa2b14b96cc699c97f0576f.tar.gz otp-6eb0ac82908ebd9b6aa2b14b96cc699c97f0576f.tar.bz2 otp-6eb0ac82908ebd9b6aa2b14b96cc699c97f0576f.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/kernel')
-rw-r--r-- | lib/kernel/test/seq_trace_SUITE.erl | 18 |
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. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |