aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
AgeCommit message (Collapse)Author
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-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
2016-02-25Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: erts/emulator/beam/erl_alloc.types erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_process.c erts/preloaded/ebin/erts_internal.beam
2016-02-25kernel: Clarify heart optionBjörn-Egil Dahlberg
Change scheduler responsiveness to 'check_schedulers'.
2016-02-25code: Add functions that can load multiple modulesBjörn Gustavsson
Add functions to 'code' to allow loading of multiple modules at once. code:atomic_load(Modules) will load all modules at once, or fail having loaded none of them. Since we cannot guarantee the atomicity if there are modules with -on_load functions, the list of modules must not contain any modules with an -on_load function. Also, to make it possible to put an application into an inactive state for as short time as possible, also add code:prepare_loading/1 and code:finish_loading/1. They are used like this: {ok,Prepared} = code:prepare_loading(Modules) . . . ok = code:finish_loading(Prepared) code:ensure_modules_loaded/1 is useful as a pure optimization to ensure that modules that will be needed soon have indeed been loaded. It will not reload modules that have already been loaded and it *will* accept modules that have an on_load function. Therefore, it does not make sense to give any atomicity guarantees. I did consider overloading the existing code:ensure_loaded/1 function, but rejected it because the return value is very different. Having different forms of return values depending on the types of arguments is confusing.
2016-02-25Add erl_prim_loader:get_modules/3Björn Gustavsson
When we are going to implement functions that can load many modules at once, we don't the erl_prim_loader server to become a bottleneck. Therefore, we need erl_prim_loader:get_modules/3 that can read many BEAM files in parallel. Note that we will not bother making reading from archive files or using the inet loader efficient. That can be done later if it turns out to be important.
2016-02-23kernel: Add heart options testBjörn-Egil Dahlberg
2016-02-17Remove test_server as a standalone applicationBjörn Gustavsson
The test_server application has previously been deprecated. In OTP 19, we will move relevant parts of test_server into the common_test application. Test suites that include test_server.hrl must be updated to include ct.hrl instead. Test suites that include test_server_line.hrl must removed that inclusion. Test suites that call the test_server module directly will continue to work in OTP 19. The test suites for Erlang/OTP are built and executed in exactly the same way as previously. Here are some more details. The modules test_server*.erl and erl2html2.erl in lib/test_server/src have been moved to common_test/src. The test_server.hrl and test_server_line.hrl include files have been deleted. The macros in test_server.hrl have been copied into lib/common_test/include/ct.hrl. The ts*.erl modules and their associated data files in lib/test_server/src has been been moved to the new directory lib/common_test/test_server. The ts* modules are no longer built to lib/common_test/ebin. They will only built when 'make release_tests' is executed. The test suite for test_server has been moved to lib/common_test/test. The rest of the files have been deleted.
2016-02-17Remove out-commented references to the test_server applicationsBjörn Gustavsson
Cleanliness.
2016-02-17Makefiles: Remove test_server from include path and code pathBjörn Gustavsson
Since no test suites includede test_server.hrl, there is no need to have test_server in the include path or code path.