Age | Commit message (Collapse) | Author |
|
|
|
Add the possibility to use modules as trace data receivers. The functions
in the module have to be nifs as otherwise complex trace probes will be
very hard to handle (complex means trace probes for ports for example).
This commit changes the way that the ptab->tracer field works from always
being an immediate, to now be NIL if no tracer is present or else be
the tuple {TracerModule, TracerState} where TracerModule is an atom that
is later used to lookup the appropriate tracer callbacks to call and
TracerState is just passed to the tracer callback. The default process and
port tracers have been rewritten to use the new API.
This commit also changes the order which trace messages are delivered to the
potential tracer process. Any enif_send done in a tracer module may be delayed
indefinitely because of lock order issues. If a message is delayed any other
trace message send from that process is also delayed so that order is preserved
for each traced entity. This means that for some trace events (i.e. send/receive)
the events may come in an unintuitive order (receive before send) to the
trace receiver. Timestamps are taken when the trace message is generated so
trace messages from differented processes may arrive with the timestamp
out of order.
Both the erlang:trace and seq_trace:set_system_tracer accept the new tracer
module tracers and also the backwards compatible arguments.
OTP-10267
|
|
* henrik/update-copyrightyear:
update copyright-year
|
|
* egil/erts/fix-file_info/OTP-13478:
Don't check dates before 1970
Log additional test information in prim_file_SUITE
Relax file_info tests
Refactor time_t in efile_drv
|
|
|
|
|
|
|
|
|
|
In 9870d22b2401b, the timetrap for large_write/1 was accidentally
reduced from the default 30 minutes to only 1 minute. That is not
enough for some older computers.
|
|
Allow an open operation to fail with {error,enoent}. That will
happen if the executable has compiled-in support for netns,
but the computer has not been configured for netns.
|
|
|
|
On modern versions of Windows, creation of symlinks is supported,
but our test machines usually don't have permissions for creating
symlinks. Therefore, the has_links/0 that attempts to predict whether
link creation will work by testing version numbers will not do
any good.
Refactor the code so that test cases don't fail when links cannot
be created because of missing permissions.
|
|
There is never any corresponding get/1.
|
|
Seems that it can happen on Windows.
|
|
On Windows, we might not have permission to create symlinks.
Skip the test case instead of failing.
|
|
On old Solaris versions, many gen_sctp test cases fail. It is not
clear whether the implementation or the test cases or both must
be fixed.
The number of failed test cases is a problem, as other failed
test cases in the Kernel application might not be noticed.
For now, skip most test gen_sctp test cases on old Solaris platforms,
until the day that someone can mend the tests case and/or
implementation (or test machines die). Keep a few smoke test
cases.
|
|
|
|
Avoid interference between test cases.
|
|
On Windows, the pathname is likely to start with "C:/Program Files".
|
|
Eliminate gratuitous use of funs.
Don't limit the send attempts to 1000; it might not be enough.
Rely on four minut timetrap to fail the test case if there will
never be a send timeout error.
|
|
|
|
* lukas/kernel/error_logger_warn_fix/OTP-13184:
kernel: Fix progress check in error logger warn suite
|
|
On Windows, the pathnames for modules that are loaded early are
returned with mixed backslashes and slashes:
1> code:which(lists).
"C:\\Program Files\\erl8.0/lib/stdlib-2.7/ebin/lists.beam"
2>
Modules loaded later are fully normalized.
When starting the code_server, normalize the pathnames for all modules
that have been loaded so far.
|
|
|
|
The documentation for rpc:call() says:
Evaluates apply(Module, Function, Args) on the node Node and
returns the corresponding value Res, or {badrpc, Reason} if
the call fails.
What is not said that rpc:call() can generate an exception if the
'rex' process on the other node is killed:
(kalle@host)1> Rex = rpc:call(arne@host, erlang, whereis, [rex]).
<6937.14.0>
(kalle@host)2> rpc:call(arne@host, erlang, exit, [Rex,kill]).
** exception exit: {killed,
{gen_server,call,
[{rex,arne@host},
{call,erlang,exit,[<6937.14.0>,kill],<0.33.0>},
infinity]}}
in function rpc:rpc_check/1 (rpc.erl, line 361)
On the other hand, if the other node shuts down for some other reason,
we'll get a {badrpc,nodedown} result:
(kalle@host)5> rpc:call(arne@host, erlang, halt, []).
{badrpc,nodedown}
There does not seem to be any reason to handle the two cases
differently. If the 'rex' process is terminated on the other node,
it will shut down shortly thereafter.
Therefore, change rpc:call() and rpc:block_call() to always return
{badrpc,Reason} is the call fails:
(kalle@host)1> Rex = rpc:call(arne@host, erlang, whereis, [rex]).
<6937.14.0>
(kalle@host)2> rpc:call(arne@host, erlang, exit, [Rex,kill]).
{badrpc,{'EXIT',{killed,{gen_server,call,
[{rex,arne@host},
{call,erlang,exit,[<7126.14.0>,kill],<0.33.0>},
infinity]}}}}
|
|
|
|
* bjorn/kernel/modernize-tests:
Remove ?line macros
Fix comments
gen_tcp_misc_SUITE: Use unique node names
Eliminate use of the ?t macro
Eliminate use of doc and suite clauses
Replace use of test_server:capture*/0 with ct:capture*/0
Eliminate use test_server:format()
Eliminate use of test_server:sleep/1
Eliminate use of test_server:fail/0,1
Eliminate use of ?config() macro
Modernize timetraps
disk_log_SUITE: Remove vestiges of VxWorks support
Conflicts:
lib/kernel/test/code_SUITE.erl
|
|
While we are it, also re-ident the files.
|
|
Remove out-commented code. Make sure that comments that are not
at the end of a line starts with two '%' characters and not just
one. That will become important later when we'll remove all
?line macros and ask Emacs to re-indent the files.
|
|
Use unique node names to ensure that one failed test case will
not cause other test cases to fail if a slave node was left.
|
|
|
|
|
|
Those clause are obsolete and never used by common_test.
|
|
|
|
Replace with io:format/2 or ct:pal/3.
|
|
|
|
* bjorn/multiple-load/OTP-13111:
erl_prim_loader_SUITE: Add debug printout
Skip erl_prim_loader_SUITE:get_modules/1 when cover-compiled
multi_load_SUITE: Clarify failure reasons
multi_load_SUITE: Don't fail on non-HiPE systems
|
|
|
|
?config is ugly and not recommended. Use proplists:get_value/2
instead.
|
|
|
|
This bug was introduced by OTP-13388.
|
|
|
|
* maint:
io_SUITE: Don't fail on fast computers with rough timers
Fix code_SUITE after test_server change
Set default value for crash_dump_dir
|
|
|
|
code:which/1 will return 'cover_compiled' instead of a path. We
could work around that, but since erl_prim_loader is not
cover-compiled, it does not gain us anything.
|
|
The failure reasons remained from a previous draft of the API.
|
|
|
|
test_server:start_node does no longer add the test_server path to the
new node, since the needed code is present in the default path. This
caused two test cases in code_SUITE to fail.
code_SUITE:mult_lib_roots: Expected the test_server path to be first
in the code path. This check is removed.
code_SUITE:bad_erl_libs: Started a node with "-env ERL_LIBS ",
i.e. not giving any value to the ERL_LIBS variable. This test
succeeded by accident, since the combination with arguments set by
test_server_node.erl and by slave.erl caused the node start to work,
and no further checks were present in the test. This part of the test
case is now removed.
|
|
Since removal of overload prot as default protection only 4
progress reports arrive when starting sasl.
|
|
* bjorn/multiple-load/OTP-13111:
code: Add functions that can load multiple modules
Refactor post_beam_load handling
Simplify and robustify code_server:all_loaded/1
Update preloaded modules
Add erl_prim_loader:get_modules/3
Add has_prepared_code_on_load/1 BIF
Allow erlang:finish_loading/1 to load more than one module
beam_load.c: Add a function to check for an on_load function
|