aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
AgeCommit message (Collapse)Author
2015-06-18Change license text to APLv2Bruce Yinhe
2015-06-17Merge branch 'egil/cuddle-tests'Björn-Egil Dahlberg
* egil/cuddle-tests: kernel: Remove ?line macros in inet_SUITE:t_gethostbyaddr/1 erts: Tweak statistics_SUITE:scheduler_wall_time/1
2015-06-15Merge branch 'rc/robustify-module_info/OTP-12820'Björn-Egil Dahlberg
* rc/robustify-module_info/OTP-12820: erts: Add test for module_info on purged modules erts: Remove ?line macros from module_info_SUITE Fix segfault in module_info for deleted modules
2015-06-15Merge branch 'sverk/map-merge-trap'Sverker Eriksson
* sverk/map-merge-trap: erts: Optimize maps:merge erts: Yield in maps:merge erts: Refactor arg swapping for maps:merge erts: Add save/restore for PSTACK erts: Fix magic binary alignment on 32-bit erts: Add maps to send_term_SUITE erts: Fix calculation of reclaimed data during full gc erts: Fix warning about const pointer to make_boxed and make_list erts: Fix typo in etp-carrier-blocks
2015-06-10Merge branch 'rickard/delayed-delete-node/OTP-12802'Rickard Green
* rickard/delayed-delete-node/OTP-12802: Delayed node table GC
2015-06-10Merge branch 'rickard/timer-improvement/OTP-12650'Rickard Green
* rickard/timer-improvement/OTP-12650: Callback timer Disable accessor timer option Aux work flag descriptions Fix test cases
2015-06-10Delayed node table GCRickard Green
2015-06-10erts: Add test for module_info on purged modulesBjörn-Egil Dahlberg
2015-06-10erts: Remove ?line macros from module_info_SUITEBjörn-Egil Dahlberg
2015-06-10Fix segfault in module_info for deleted modulesRichard Carlsson
Add a check to protect from segfault when erlang:get_module_info/1/2 is called on a deleted module (i.e. with no current code). Also refactor erts_module_info_0/1 to avoid repeated calls to erts_active_code_ix() and remove some obsolete comments. Add test for module_info on deleted modules.
2015-06-09Disable accessor timer optionRickard Green
2015-06-09Fix test casesRickard Green
2015-06-09erts: Tweak statistics_SUITE:scheduler_wall_time/1Björn-Egil Dahlberg
2015-06-08erts: Fix faulty list optimization in make_internal_hashBjörn-Egil Dahlberg
Reported-by: Rory Byrne
2015-06-04Merge branch 'egil/cuddle-tests'Björn-Egil Dahlberg
* egil/cuddle-tests: erts: Remove remaining ?line macros in trace_meta_SUITE erts: Relax trace_meta_SUITE:on_and_off_test/1 erts: Remove ?line macro in trace_meta_SUITE:on_and_off_test/1 kernel: Remove remaining ?line macros in gen_tcp_misc_SUITE kernel: Relax gen_tcp_misc_SUITE don't wait for timeout kernel: Relax test gen_tcp_misc_SUITE:wrapping_oct/1
2015-06-04erts: Remove remaining ?line macros in trace_meta_SUITEBjörn-Egil Dahlberg
Also, fixed some confusing indentations and whitespace errors. This commit only has whitespace changes and removal of ?line macros.
2015-06-04erts: Relax trace_meta_SUITE:on_and_off_test/1Björn-Egil Dahlberg
2015-06-04erts: Remove ?line macro in trace_meta_SUITE:on_and_off_test/1Björn-Egil Dahlberg
2015-06-01Merge branch 'vinoski/enif-raise-exception/OTP-12770'Sverker Eriksson
* vinoski/enif-raise-exception/OTP-12770: Add enif_raise_exception Enhance enif_has_pending_exception Fix for enif_schedule_nif and exceptions Conflicts: erts/doc/src/erl_nif.xml
2015-05-27erts: Rename ErlNifMapIteratorEntry enumsSverker Eriksson
To differentiate between first/last map entry and head/tail which is before/after first/last map entry.
2015-05-26Add enif_raise_exceptionSteve Vinoski
Add enif_raise_exception function to allow NIFs to raise error exceptions holding any Erlang terms. This does not replace or deprecate the enif_make_badarg function, though, because raising badarg errors is so idiomatic in NIFs. Reimplement enif_make_badarg on top of enif_raise_exception. Add new tests for enif_raise_exception for both normal and dirty NIFs. Add documentation for enif_raise_exception.
2015-05-26Enhance enif_has_pending_exceptionSteve Vinoski
Sverker Eriksson came up with the following idea: to handle a future ability for NIFs to raise more than just badarg exceptions, modify the recently-added enif_has_pending_exception function to take a second argument: a pointer to ERL_NIF_TERM. If this argument is a null pointer, ignore it. Otherwise, if the first argument, an ErlNifEnv*, has an associated exception, set the pointed-to ERL_NIF_TERM of the second argument to the value of the exception term. Add new tests and documentation for this modification.
2015-05-26Fix for enif_schedule_nif and exceptionsSteve Vinoski
Fix a place where part of the implementation of enif_schedule_nif was not using the ErlNifEnv exception_thrown field when it should have been. Also make the result of enif_schedule_nif return false when passed to enif_is_exception, and add an assertion for this to the nif_SUITE.c tests.
2015-05-25erts: Relax monitor_SUITE:mixer/1Björn-Egil Dahlberg
2015-05-25erts: Refactor monitor_SUITE:mixer/1Björn-Egil Dahlberg
Remove ?line macro.
2015-05-20erts: Add maps to send_term_SUITESverker Eriksson
2015-05-12Merge branch 'rickard/timer-optimization/OTP-12650'Rickard Green
* rickard/timer-optimization/OTP-12650: Timer fixes, documentation, and test cases Conflicts: erts/emulator/beam/erl_hl_timer.c
2015-05-12Timer fixes, documentation, and test casesRickard Green
2015-05-11Merge branch 'egil/fix-maps-erts_debug-size'Björn-Egil Dahlberg
* egil/fix-maps-erts_debug-size: erts: Fix erts_debug:size/1 for large Maps erts: Simple test of erts_debug:size/1 of Maps
2015-05-08erts: Simple test of erts_debug:size/1 of MapsBjörn-Egil Dahlberg
2015-05-08Merge branch 'rickard/time-improvement/OTP-11997'Rickard Green
* rickard/time-improvement/OTP-11997: Allow execution of estone suite on pre OTP-18 systems Add parallel time monotonicity test-case Replace usage of erlang:now() in line-tracing Replace erlang:now() usage in emulator suite Replace erlang:now() usage in system suite Misc time improvements
2015-05-07Set module_info md5 for native modules properlyRichard Carlsson
Use the md5 of the native code chunk instead of the Beam code md5.
2015-05-07Add module_info entry for native codeRichard Carlsson
2015-05-06Allow execution of estone suite on pre OTP-18 systemsRickard Green
2015-05-06Add parallel time monotonicity test-caseRickard Green
2015-05-06Replace erlang:now() usage in emulator suiteRickard Green
2015-04-30emulator: Use module erl_annoHans Bolinder
2015-04-22Merge branch 'sverk/pr632/prevent-illegal-nif-terms/OTP-12655'Sverker Eriksson
* sverk/pr632/prevent-illegal-nif-terms/OTP-12655: erts: Reject non-finite float terms in erl_drv_output_term erts: Remove old docs about experimental NIF versions. erts: Add enif_has_pending_exception erts: Clearify erl_nif documentation about badarg exception erts: Fix compile warning in enif_make_double erts: Fix divide by zero compile error in nif_SUITE.c erts: Fix isfinite for windows Ensure NIF term creation disallows illegal values
2015-04-15erts: Add enif_has_pending_exceptionSverker Eriksson
2015-04-15erts: Fix divide by zero compile error in nif_SUITE.cSverker Eriksson
2015-04-15Raise more descriptive error messages for failed map operationsBjörn Gustavsson
According to EEP-43 for maps, a 'badmap' exception should be generated when an attempt is made to update non-map term such as: <<>>#{a=>42} That was not implemented in the OTP 17. José Valim suggested that we should take the opportunity to improve the errors coming from map operations: http://erlang.org/pipermail/erlang-questions/2015-February/083588.html This commit implement better errors from map operations similar to his suggestion. When a map update operation (Map#{...}) or a BIF that expects a map is given a non-map term, the exception will be: {badmap,Term} This kind of exception is similar to the {badfun,Term} exception from operations that expect a fun. When a map operation requires a key that is not present in a map, the following exception will be raised: {badkey,Key} José Valim suggested that the exception should be {badkey,Key,Map}. We decided not to do that because the map could potentially be huge and cause problems if the error propagated through links to other processes. For BIFs, it could be argued that the exceptions could be simply 'badmap' and 'badkey', because the bad map and bad key can be found in the argument list for the BIF in the stack backtrace. However, for the map update operation (Map#{...}), the bad map or bad key will not be included in the stack backtrace, so that information must be included in the exception reason itself. For consistency, the BIFs should raise the same exceptions as update operation. If more than one key is missing, it is undefined which of keys that will be reported in the {badkey,Key} exception.
2015-04-13beam_emu: Slightly optimize update_map_{assoc,exact}Björn Gustavsson
In the update loop for big maps, the E variable is restored for each turn of the loop. It only needs to be restored if a garbage collection has been performed. Also add a new test case that attempts to force several garbage collections while updating a map, to help us find bugs with incorrect restoration of the E variable after a garbage collection.
2015-04-13Sort maps keys in the loaderBjörn Gustavsson
The map instructions require that the keys in the instructions are sorted (for flatmaps). But that is an implementation detail that should not exposed outside of the BEAM virtual machine. Therefore, make the sorting of the keys the responsibility of the loader and not the compiler. Also note that the sort order for maps with numeric keys or keys with numeric components has changed in OTP 18. That means that code compiled for OTP 17 that operated on maps with map keys might not work in OTP 18 without the sorting in the loader (although it is unlikely to be an issue in practice).
2015-04-13erts/map_SUITE.erl: Add a test case that tests has_map_fieldsBjörn Gustavsson
The has_map_fields instruction was not tested at all by erts/map_SUITE.erl
2015-04-13map_SUITE: Add tests of is_map/1 with literal mapsBjörn Gustavsson
To be sure that the compiler and BEAM virtual machine correctly handles literals maps, we must test it.
2015-04-13Run a clone of map_SUITE without optimizationsBjörn Gustavsson
Create a clone of map_SUITE named map_no_opt_SUITE to ensure that the loader can cope with unoptimized map instructions.
2015-04-10Merge branch 'egil/maps-test-coverage'Björn-Egil Dahlberg
* egil/maps-test-coverage: erts: Remove code that was commented out erts: Cover maps:values/1 for large maps erts: Test maps:from_list/1 shrinking
2015-04-10Merge branch 'egil/fix-maps-deep-colliding-merge'Björn-Egil Dahlberg
* egil/fix-maps-deep-colliding-merge: erts: Fix deep colliding hash values in maps:from_list/1
2015-04-10erts: Ensure hashing of zero is consistentBjörn-Egil Dahlberg
Erlang treats positive and negative zero as equal, meaning, true = 0.0 =:= 0.0/-1 However, Erlangs hash functions: hash, phash and phash2 did not reflect this behaviour. Meaning, the hash values produced by the different hash functions would not be identical for positive and negative zero. This commit ensures that hash value of positive zero is always produced regardless of the signedness of the zero float, i.e. true = erlang:phash2(0.0) =:= erlang:phash2(0.0/-1)
2015-04-09erts: Cover maps:values/1 for large mapsBjörn-Egil Dahlberg