aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2012-11-02Fix oracle solaris bug in sendfileLukas Larsson
When using values of sfv_len and sfv_off which are larger than the file in question, sendfilev can sometimes return -1 and send data. It seems to be only Oracle SunOS which this happens on.
2012-11-02Merge branch 'raimo/IPV6_V6ONLY/OTP-8928'Raimo Niskanen
* raimo/IPV6_V6ONLY/OTP-8928: kernel: Correct documentation typos discovered by Tuncer Ayaz
2012-11-02kernel: Correct documentation typos discovered by Tuncer AyazRaimo Niskanen
2012-10-31Merge branch 'siri/cover-tests'Siri Hansen
* siri/cover-tests: (21 commits) [common_test] Extend timer for flushing error logger [cover] Allow reconnection if node has been disconnected or down [cover] Don't kill remote nodes when connection to main node is lost [test_server] Add option {start_cover,false} to test_server:start_node Use code:lib_dir instead of code:which to get application directory [common_test] Add test for OTP-9956 Include all kernel modules in code coverage analysis [common_test] Add test suite for code coverage support [common_test, test_server] Don't flush cover if cover is not running [common_test] Add option cover_stop [test_server] Allow cross cover analysis when testing through common_test [test_server] Start cover in test_server:wait_for_node [test_server] Multiply timers with timetrap_scale_factor when starting nodes Include all stdlib modules in code coverage analysis [test_server] Include all test_server modules in code coverage analysis Skip epp_SUITE:otp_8911 if cover is running [common_test] Start cover on slave nodes if running cover tests [common_test] Don't stop cover before stopping slave node [test_server] Don't stop cover after test is finished [cover] Add support for test_server ... OTP-10427
2012-10-31Merge branch 'bjorn/ct/stability/OTP-10480'Björn Gustavsson
* bjorn/ct/stability/OTP-10480: Simplify managment of test_server_loc Keep the information about the current test case consistent test_server: Eliminate the Loc argument for do_end_tc_call() Refactor the handling of the make_priv_dir message test_server: Refactor run_test_case_msgloop()
2012-10-31Fix writing of configuration information to ct_master_log.htmlBjörn Gustavsson
Because of a forgotten "Fd", configuration information intended for ct_master_log.html ended up being written to standard output.
2012-10-31Merge branch 'raimo/IPV6_V6ONLY/OTP-8928'Raimo Niskanen
* raimo/IPV6_V6ONLY/OTP-8928: kernel: Document socket option ipv6_v6only kernel: Add test cases for socket option ipv6_v6only erts,kernel: Implement socket option ipv6_v6only in erlang code erts: Implement socket option IPV6_V6ONLY erts: Add configure test for IPV6_V6ONLY
2012-10-31kernel: Document socket option ipv6_v6onlyRaimo Niskanen
2012-10-31kernel: Add test cases for socket option ipv6_v6onlyRaimo Niskanen
2012-10-31erts,kernel: Implement socket option ipv6_v6only in erlang codeRaimo Niskanen
2012-10-31erts: Implement socket option IPV6_V6ONLYRaimo Niskanen
2012-10-30Merge branch 'dgud/stdlib/proc_lib_hangs/OTP-9803'Dan Gudmundsson
* dgud/stdlib/proc_lib_hangs/OTP-9803: stdlib: Monitor proc_lib:start'ed processes to avoid waiting forever
2012-10-30stdlib: Monitor proc_lib:start'ed processes to avoid waiting foreverDan Gudmundsson
Monitor the spawned process in proc_lib:start/[3|4|5], so that a proper error is returned, if the spawned process crashes before proclib:init_ack/1 is sent. Previously the calling process would hang forever or until specified timeout. Start link catches these errors but start did not. start now behaves as start_link if process traps exit.
2012-10-30Merge branch 'dgud/test-fixes'Dan Gudmundsson
* dgud/test-fixes: test: fix timetraps kernel: Extend test timeout for cover tests stdlib: Fix test timeouts in cover runs runtime_tools: Fix failing testcase
2012-10-30test: fix timetrapsDan Gudmundsson
Use ct:timetrap/1 instead of test_server:timetrap/1 for really long test_cases. Commontest sets up a default timetrap on 30 min, which is not cancelled if testserver:timetrap called.
2012-10-30kernel: Extend test timeout for cover testsDan Gudmundsson
2012-10-30stdlib: Fix test timeouts in cover runsDan Gudmundsson
2012-10-30runtime_tools: Fix failing testcaseDan Gudmundsson
2012-10-30[common_test] Extend timer for flushing error loggerSiri Hansen
OTP-10040 If a busy test case generated lots of error messages, cth_log_redirect:post_end_per_testcase would crash with a timeout while waiting for the error logger to finish handling all error messages. The default timer is 5 seconds. This has now been extended to 5 minutes.
2012-10-30[cover] Allow reconnection if node has been disconnected or downSiri Hansen
OTP-10523 Earlier, if the connection to a remote cover node was lost, all cover data was lost and the cover_server on the remote node would die. This would cause problems if there were cover compiled modules that would still be executed since they would attempt to write to the no longer existing ets tables belonging to the cover_server. This commit changes this behavior so that the cover_server on the remote node will survive connection loss and continue collecting cover data. If the connection is re-established then the main node will sync with the remote node again and cover data will not be lost (unless the node was down).
2012-10-30[cover] Don't kill remote nodes when connection to main node is lostSiri Hansen
OTP-10523 Since the will probably be cover compiled modules left in the remote node, we want to keep the cover_server and it's ets tables even if connection to remote node is lost. This way it will not crash (due to ets:insert in non existing table) if functions in cover compiled modules are executed.
2012-10-30[test_server] Add option {start_cover,false} to test_server:start_nodeSiri Hansen
By default the test server will start cover on all nodes when the test is run with code coverage analysis. To make sure cover is not started on a new node, this option can be set. This can be useful if the test itself starts cover or if the new node for some reason can not run cover compiled code.
2012-10-30Use code:lib_dir instead of code:which to get application directorySiri Hansen
code_SUITE:ext_mod_dep used code:which(kernel) to get the path to the kernel ebin directory. This failed when kernel was cover compiled, since code:which then returns 'cover_compiled'. Using code:lib_dir instead solved the problem.
2012-10-30[common_test] Add test for OTP-9956Siri Hansen
OTP-9956 Test that the test suite itself can be cover compiled, and that data_dir is still set correctly.
2012-10-30Include all kernel modules in code coverage analysisSiri Hansen
2012-10-30[common_test] Add test suite for code coverage supportSiri Hansen
2012-10-30[common_test, test_server] Don't flush cover if cover is not runningSiri Hansen
ct_slave, ct_test_support and test_server_test_lib always called cover:flush/1 when stopping slave nodes. If cover was not running, this would cause cover_server to be started and thus test_server:is_cover/0 to return true afterwards. This has been corrected.
2012-10-30[common_test] Add option cover_stopSiri Hansen
By default, test_server will always stop cover (and thus load back the non cover compiled original beam files) after a test with code coverage analysis is completed. The new option allows the common_test user to specify that cover shall not be stopped. This can be useful if there are processes still running old code, i.e. processes that have not done any fully qualified function call after the cover compilation, since loading the original code then will kill those processes. This is only recommended if the erlang node is to be stopped after the test run, or if cover can be manually stopped.
2012-10-30[test_server] Allow cross cover analysis when testing through common_testSiri Hansen
The cross cover analysis functionality in test_server was broken since OTP converted to running daily tests through common_test. This has been corrected.
2012-10-30[test_server] Start cover in test_server:wait_for_nodeSiri Hansen
Without this change, there is no support in test_server for starting cover on a node started with option {wait,false}.
2012-10-30[test_server] Multiply timers with timetrap_scale_factor when starting nodesSiri Hansen
In test_server_ctrl:start_node and wait_for_node, the timer in controller_call was not multiplied by the timetrap_scale_factor. This caused unexpected behaviour since the scale factor was used furhter down the the code, and timeout would happen in unexpected order when cover was running.
2012-10-30Include all stdlib modules in code coverage analysisSiri Hansen
2012-10-30[test_server] Include all test_server modules in code coverage analysisSiri Hansen
2012-10-30Skip epp_SUITE:otp_8911 if cover is runningSiri Hansen
This is because this test case itself starts and stops cover.
2012-10-30[common_test] Start cover on slave nodes if running cover testsSiri Hansen
Nodes started with ct_slave should automatically run cover when tests are executed with cover analysis. Nodes must also be flushed for cover data before stopped.
2012-10-30[common_test] Don't stop cover before stopping slave nodeSiri Hansen
In order to avoid crash of processes that hold old code, cover is no longer stopped before slave nodes are stopped. Instead cover:flush is used which only fetches cover data from the slave. This, along with similar changes in test_server allows all common_test modules to be included in cover analysis.
2012-10-30[test_server] Don't stop cover after test is finishedSiri Hansen
This commit removes all calls to cover:stop from test_server. This is to avoid crash in some processes due to old code. The correction shall be further refined for general use. There will, for instance, be an option to turn off cover:stop/0 after completed test run, so the default behaviour is backwards compatible.
2012-10-30[cover] Add support for test_serverSiri Hansen
OTP-10523 * Added cover:flush(Nodes), which will fetch data from remote nodes without stopping cover on those nodes. * Added cover:get_main_node(), which returns the node name of the main node. This is used by test_server to avoid {error,not_main_node} when a slave starts another slave (e.g. in test_server's own tests).
2012-10-26common_test: Enable running cover on common_testBjörn Gustavsson
2012-10-26Simplify managment of test_server_locBjörn Gustavsson
Before line numbers were included in exceptions (in R15), there were parse transforms and macros that would keep the test_server_loc process dictionary variable updated; therefore there is a mod_loc/1 function that will normalize the representation of locations. Simplify the code as following: * 'test_server_loc' should always contain a list with one or more tuples. ({M,F} or {M,F,Line}) * At the beginning of each test case, set 'test_server_loc' to [{Module,Func}] of the the currently executing test case. * Stop updating 'test_server_loc', except when an exception occurs. (It used to be updated when running 'init_per_testcase' and so on.) * Remove the mod_loc/1 function.
2012-10-26Keep the information about the current test case consistentBjörn Gustavsson
Three pieces of information could be out of sync in testcase supervisor process at the time when a timetrap occurred: * test_server_loc (process dictionary) - may indicate that a framework function is executing * test_server_init_or_end_conf (process dictionary) - indicates whether init_per_testcase or end_per_testcase is executing * The current configuration (#st.config) - set using a synchronous call There could be in a crash in spawn_fw_call/7 because the current configuration was not defined when it was expected to. To avoid the problem, introduce set_tc_state/2 (and a corresponding message) to allow setting both an indication what the testcase is executing (e.g. init_per_testcase, framework call, and so on), and the current configuration. Use only that information to handle a timetrap timeout (and aborted testcase and the other reasons for the testcase process to terminate). Completely remove test_server_init_or_end_conf.
2012-10-26test_server: Eliminate the Loc argument for do_end_tc_call()Björn Gustavsson
The Loc argument was use to determine the name of the currently executing test case, in case that the M and F arguments did not specify a test case. Since a previous commit makes sure that the M and F arguments *are* valied, we can eliminate the Loc argument.
2012-10-26Refactor the handling of the make_priv_dir messageBjörn Gustavsson
The code is not actually shorter, but it avoids duplicating the code for producing an error tuple when theres is no priv_dir tuple in the config data.
2012-10-26test_server: Refactor run_test_case_msgloop()Björn Gustavsson
Keeping all state as separate function arguments does not make it easy to add more pieces of data to the state. Case in point is the CurrConf argument where up to three separate items have been shoehorned in. Instead of the arguments, introduce a state record to hold all of the different pieces of state (taking care to separate the former CurrConf variable into separate fields in the record). While at it, fix a bug. The name of the currently executing test case (module and function) used to be stored in a tuple in the CurrConf variable, and it would only be available after 'set_curr_conf' message has been received. Depending on timing, it was possible in rare circumstances for an EXIT signal to arrive before the 'set_curr_conf' message. Avoid this problem by putting the current test case name into the record from the beginning. That also means that we can eliminate the workaround of getting the currently executing test case from the stack trace using the get_mf/1.
2012-10-26Merge branch 'bjorn/compiler/test-cases'Björn Gustavsson
* bjorn/compiler/test-cases: Correct typo in test suite name compiler: Run testcases in parallel
2012-10-26Merge branch 'bjorn/test_server/test-cases'Björn Gustavsson
* bjorn/test_server/test-cases: test_server tests: Be kind to Windows by using shorter pathnames
2012-10-26Merge branch 'bjorn/erts/beam_makeops'Björn Gustavsson
* bjorn/erts/beam_makeops: beam_makeops: Turn on warnings and eliminate existing warnings beam_makeops: Eliminate a deprecation warning
2012-10-26Merge branch 'bjorn/ct/separate-io-server/OTP-10101'Björn Gustavsson
* bjorn/ct/separate-io-server/OTP-10101: Test ct:capture/start/stop/get Introduce ct_group_leader_SUITE that does nasty things with group leaders Eliminate unexpected I/O to the minor log file Introduce test_server_io and test_server_gl Clean up initialization of parallel test cases Introduce is_io_buffered/0 to somewhat improve readability test_server_ctrl: Consistently use set_io_buffering/1
2012-10-26Merge branch 'siri/test_server/faulty-data_dir-when-cover/OTP-9956'Siri Hansen
* siri/test_server/faulty-data_dir-when-cover/OTP-9956: [test_server] Set data_dir correctly when suite is cover compiled
2012-10-25[test_server] Set data_dir correctly when suite is cover compiledSiri Hansen
If the test suite itself was included in code coverage analysis, then test_server_ctrl would not manage to set data_dir correctly for the test, since it relied on the result of code:which(Suite). This has been corrected.