aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
AgeCommit message (Collapse)Author
2016-04-26Update global_group_SUITE.erlxuming
2016-04-15erts: Implement tracer modulesLukas Larsson
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
2016-04-13Merge branch 'henrik/update-copyrightyear'Henrik Nord
* henrik/update-copyrightyear: update copyright-year
2016-04-06Merge branch 'egil/erts/fix-file_info/OTP-13478'Björn-Egil Dahlberg
* 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
2016-04-04Don't check dates before 1970Björn-Egil Dahlberg
2016-03-31Log additional test information in prim_file_SUITEBjörn-Egil Dahlberg
2016-03-31Relax file_info testsBjörn-Egil Dahlberg
2016-03-30inet_SUITE: Handle pointtopoint devices in getifaddrs/1Björn Gustavsson
2016-03-30file_SUITE: Increase timetrap for large_write/1Björn Gustavsson
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.
2016-03-30inet_SUITE: Handle {error,enoent} in simple_netns_openBjörn Gustavsson
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.
2016-03-24inet_SUITE: Handle missing SCTP support in simple_netns/1Björn Gustavsson
2016-03-23file_name_SUITE: Improve handling of missing permission for link creationBjörn Gustavsson
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.
2016-03-23file_name_SUITE: Remove useless put/2 to process dictionaryBjörn Gustavsson
There is never any corresponding get/1.
2016-03-23file_name_SUITE: Handle the case that HOMEPATH may not be setBjörn Gustavsson
Seems that it can happen on Windows.
2016-03-23code_SUITE: Skip on_load_embedded/1 if no symlinksBjörn Gustavsson
On Windows, we might not have permission to create symlinks. Skip the test case instead of failing.
2016-03-23gen_sctp_SUITE: Skip most SCTP test cases on Solaris before 5.12Björn Gustavsson
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.
2016-03-23heart_SUITE: Increase timeout in restart/1Björn Gustavsson
2016-03-23heart_SUITE: Use unique node namesBjörn Gustavsson
Avoid interference between test cases.
2016-03-23init_SUITE: Quote pathname that may contain a spaceBjörn Gustavsson
On Windows, the pathname is likely to start with "C:/Program Files".
2016-03-23gen_tcp_misc_SUITE: Clean up send_timeout{_active}/1Björn Gustavsson
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.
2016-03-23Clean up the determination of the hostnameBjörn Gustavsson
2016-03-18Merge branch 'lukas/kernel/error_logger_warn_fix/OTP-13184'Lukas Larsson
* lukas/kernel/error_logger_warn_fix/OTP-13184: kernel: Fix progress check in error logger warn suite
2016-03-16code_server: Normalize the pathnames for all loaded modulesBjörn Gustavsson
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.
2016-03-15update copyright-yearHenrik Nord
2016-03-11Don't throw exceptions from rpc:call() and rpc:block_call()Björn Gustavsson
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]}}}}
2016-03-11Reduce code duplication in called_node_dies/1 and friendsBjörn Gustavsson
2016-03-11Merge branch 'bjorn/kernel/modernize-tests'Björn Gustavsson
* 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
2016-03-10Remove ?line macrosBjörn Gustavsson
While we are it, also re-ident the files.
2016-03-10Fix commentsBjörn Gustavsson
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.
2016-03-10gen_tcp_misc_SUITE: Use unique node namesBjörn Gustavsson
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.
2016-03-10Merge branch 'maint'Siri Hansen
2016-03-10Eliminate use of the ?t macroBjörn Gustavsson
2016-03-10Eliminate use of doc and suite clausesBjörn Gustavsson
Those clause are obsolete and never used by common_test.
2016-03-10Replace use of test_server:capture*/0 with ct:capture*/0Björn Gustavsson
2016-03-10Eliminate use test_server:format()Björn Gustavsson
Replace with io:format/2 or ct:pal/3.
2016-03-10Eliminate use of test_server:sleep/1Björn Gustavsson
2016-03-10Merge branch 'bjorn/multiple-load/OTP-13111'Björn Gustavsson
* 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
2016-03-09Eliminate use of test_server:fail/0,1Björn Gustavsson
2016-03-09Eliminate use of ?config() macroBjörn Gustavsson
?config is ugly and not recommended. Use proplists:get_value/2 instead.
2016-03-09Modernize timetrapsBjörn Gustavsson
2016-03-09Change '==' to '=' in code_SUITE:bad_erl_libsSiri Hansen
This bug was introduced by OTP-13388.
2016-03-09disk_log_SUITE: Remove vestiges of VxWorks supportBjörn Gustavsson
2016-03-09Merge branch 'maint'Björn Gustavsson
* 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
2016-03-07erl_prim_loader_SUITE: Add debug printoutBjörn Gustavsson
2016-03-07Skip erl_prim_loader_SUITE:get_modules/1 when cover-compiledBjörn Gustavsson
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.
2016-03-07multi_load_SUITE: Clarify failure reasonsBjörn Gustavsson
The failure reasons remained from a previous draft of the API.
2016-03-07multi_load_SUITE: Don't fail on non-HiPE systemsBjörn Gustavsson
2016-03-03Fix code_SUITE after test_server changeSiri Hansen
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.
2016-03-02kernel: Fix progress check in error logger warn suiteLukas Larsson
Since removal of overload prot as default protection only 4 progress reports arrive when starting sasl.
2016-02-26Merge branch 'bjorn/multiple-load/OTP-13111'Björn Gustavsson
* 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