diff options
author | Lukas Larsson <[email protected]> | 2018-08-03 09:49:24 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2018-08-03 09:49:24 +0200 |
commit | 0ae934aa008f9ff2a929eafc52811fcde619631a (patch) | |
tree | 938462b708ac6442bb0dda7b99815505503a4d2a /lib | |
parent | c33d4c7539a1681cfbc024d8637e204c0a05fd1a (diff) | |
parent | d383549b6e9d9b5e06f23226a61564264204db51 (diff) | |
download | otp-0ae934aa008f9ff2a929eafc52811fcde619631a.tar.gz otp-0ae934aa008f9ff2a929eafc52811fcde619631a.tar.bz2 otp-0ae934aa008f9ff2a929eafc52811fcde619631a.zip |
Merge branch 'lukas/erts/seq_trace_fix_token_clear/ERL-602/OTP-15038' into maint
* lukas/erts/seq_trace_fix_token_clear/ERL-602/OTP-15038:
erts: Fix seq_trace to not clear token for system messages
Diffstat (limited to 'lib')
-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. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |