diff options
author | John Högberg <john@erlang.org> | 2019-03-20 09:02:48 +0100 |
---|---|---|
committer | John Högberg <john@erlang.org> | 2019-03-20 09:02:48 +0100 |
commit | 3a7bc65f717b2b8609ee0c22218206205f62138f (patch) | |
tree | 938c7d02e50d6050b922b85dbab922fe0d243845 /lib | |
parent | 515c1d380dcf327ff92f9f727959620c96687be8 (diff) | |
parent | c6b5df425ec825c041e666351b1466e4d3feb859 (diff) | |
download | otp-3a7bc65f717b2b8609ee0c22218206205f62138f.tar.gz otp-3a7bc65f717b2b8609ee0c22218206205f62138f.tar.bz2 otp-3a7bc65f717b2b8609ee0c22218206205f62138f.zip |
Merge branch 'john/kernel/fix-code-suite-on_load_trace_on_load'
* john/kernel/fix-code-suite-on_load_trace_on_load:
code_SUITE: Always disable tracing after 'upgrade' test
code_SUITE: Fix on_load_trace_on_load test
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kernel/test/code_SUITE.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl index 64e0b9d8dd..99fecbe970 100644 --- a/lib/kernel/test/code_SUITE.erl +++ b/lib/kernel/test/code_SUITE.erl @@ -140,6 +140,11 @@ end_per_testcase(on_load_embedded, Config) -> LinkName = proplists:get_value(link_name, Config), _ = del_link(LinkName), end_per_testcase(Config); +end_per_testcase(upgrade, Config) -> + %% Make sure tracing is turned off even if the test times out. + erlang:trace_pattern({error_handler,undefined_function,3}, false, [global]), + erlang:trace(self(), false, [call]), + end_per_testcase(Config); end_per_testcase(_Func, Config) -> end_per_testcase(Config). @@ -1556,6 +1561,11 @@ on_load_update_code_1(3, Mod) -> %% Test -on_load while trace feature 'on_load' is enabled (OTP-14612) on_load_trace_on_load(Config) -> + %% 'on_load' enables tracing for all newly loaded modules, so we make a dry + %% run to ensure that ancillary modules like 'merl' won't be loaded during + %% the actual test. + on_load_update(Config), + Papa = self(), Tracer = spawn_link(fun F() -> receive M -> Papa ! M end, F() end), {tracer,[]} = erlang:trace_info(self(),tracer), |