aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
AgeCommit message (Collapse)Author
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
2015-04-09erts: Test maps:from_list/1 shrinkingBjörn-Egil Dahlberg
Repeated keys will shrink map to a flatmap if the number of pairs drops below the limit.
2015-04-07erts: Fix deep colliding hash values in maps:from_list/1Björn-Egil Dahlberg
Reported-by: Jesper Louis Andersen
2015-04-01Merge branch 'egil/fix-maps-tmp-heap'Björn-Egil Dahlberg
* egil/fix-maps-tmp-heap: erts: Test deep Maps updates erts: Use halfword secure tmp heap erts: Remove unused tmp heap in make_internal_hash Conflicts: erts/emulator/test/map_SUITE.erl
2015-04-01Merge branch 'egil/fix-maps-from_list-size'Björn-Egil Dahlberg
* egil/fix-maps-from_list-size: erts: Strengthen Maps merge tests erts: Try to test deep Maps collision erts: Fix size bug in maps:from_list/1 BIF
2015-03-31erts: Test deep Maps updatesBjörn-Egil Dahlberg
2015-03-31erts: Strengthen Maps merge testsBjörn-Egil Dahlberg
2015-03-31erts: Try to test deep Maps collisionBjörn-Egil Dahlberg
Ensure maps:size/1 is correct.
2015-03-30erts: Strengthen Maps testsBjörn-Egil Dahlberg
2015-03-30Merge branch 'egil/fix-make_internal_hash-float'Björn-Egil Dahlberg
* egil/fix-make_internal_hash-float: erts: Add tests for internal_hash erts: Fix make_internal_hash for 0.0 vs -0.0
2015-03-30Merge branch 'egil/maps/tests'Björn-Egil Dahlberg
* egil/maps/tests: debugger: Strengthen Maps tests compiler: Strengthen Maps tests erts: Strengthen Maps tests
2015-03-27erts: Add tests for internal_hashBjörn-Egil Dahlberg
2015-03-27Merge branch 'maint'Sverker Eriksson
Conflicts: lib/stdlib/src/stdlib.appup.src
2015-03-27Merge branch 'sverk/large-list_to_integer-bug/OTP-12624' into maintSverker Eriksson
* sverk/large-list_to_integer-bug/OTP-12624: erts: Fix bug in list_to_integer for very large strings
2015-03-27erts: Strengthen Maps testsBjörn-Egil Dahlberg
2015-03-25Merge branch 'rickard/time_api/OTP-11997'Rickard Green
* rickard/time_api/OTP-11997: Skip not updated test-cases Fixes and cleanup
2015-03-25Skip not updated test-casesRickard Green
2015-03-25Merge branch 'sverk/hamt-term2bin-bug/OTP-12585'Sverker Eriksson
* sverk/hamt-term2bin-bug/OTP-12585: erts: Optimize hashmap_get erts: Remove HAMT_SUBTAG_NODE_ARRAY erts: Fix bug in binary_to_term for hamt when yielding erts: Rename to flatmap_from_validated_list
2015-03-25erts: Fix bug in list_to_integer for very large stringsSverker Eriksson
list_to_integer(lists:duplicate(10000000,$0)). crashed due to overflow when calculating nr heap words.
2015-03-25Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: erts/emulator/beam/erl_map.c erts/emulator/test/map_SUITE.erl
2015-03-24erts: Remove HAMT_SUBTAG_NODE_ARRAYSverker Eriksson
This will also fix a bug in term_to_binary treating full nodes as tuples and emiting LIST_EXT for leafs.
2015-03-24erts: Fix comparison of exact termsBjörn-Egil Dahlberg
Comparison of exact terms could cause faulty term tests. This was caused by a faulty (too small) internal type. Symptom: -1 = erts_internal:cmp_term(2147483648,0). %% wrong Correct: 1 = erts_internal:cmp_term(2147483648,0). Reported-by: Jesper Louis Andersen
2015-03-22Merge branch 'maint'Anders Svensson
2015-03-20Merge branch 'rickard/time_api/master/OTP-11997'Rickard Green
* rickard/time_api/master/OTP-11997: (22 commits) Update primary bootstrap inets: Suppress deprecated warning on erlang:now/0 inets: Cleanup of multiple copies of functions Add inets_lib with common functions used by multiple modules inets: Update comments Suppress deprecated warning on erlang:now/0 Use new time API and be back-compatible in inets Remove unused functions and removed redundant test asn1 test SUITE: Eliminate use of now/0 Disable deprecated warning on erlang:now/0 in diameter_lib Use new time API and be back-compatible in ssh Replace all calls to now/0 in CT with new time API functions test_server: Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API otp_SUITE: Warn for calls to erlang:now/0 Replace usage of erlang:now() with usage of new API Multiple timer wheels Erlang based BIF timer implementation for scalability Implement ethread events with timeout ...
2015-03-20Merge branch 'rickard/time_api/OTP-11997'Rickard Green
* rickard/time_api/OTP-11997: (22 commits) Update primary bootstrap inets: Suppress deprecated warning on erlang:now/0 inets: Cleanup of multiple copies of functions Add inets_lib with common functions used by multiple modules inets: Update comments Suppress deprecated warning on erlang:now/0 Use new time API and be back-compatible in inets Remove unused functions and removed redundant test asn1 test SUITE: Eliminate use of now/0 Disable deprecated warning on erlang:now/0 in diameter_lib Use new time API and be back-compatible in ssh Replace all calls to now/0 in CT with new time API functions test_server: Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API Replace usage of erlang:now() with usage of new API otp_SUITE: Warn for calls to erlang:now/0 Replace usage of erlang:now() with usage of new API Multiple timer wheels Erlang based BIF timer implementation for scalability Implement ethread events with timeout ... Conflicts: bootstrap/bin/start.boot bootstrap/bin/start_clean.boot bootstrap/lib/compiler/ebin/beam_asm.beam bootstrap/lib/compiler/ebin/compile.beam bootstrap/lib/kernel/ebin/auth.beam bootstrap/lib/kernel/ebin/dist_util.beam bootstrap/lib/kernel/ebin/global.beam bootstrap/lib/kernel/ebin/hipe_unified_loader.beam bootstrap/lib/kernel/ebin/inet_db.beam bootstrap/lib/kernel/ebin/inet_dns.beam bootstrap/lib/kernel/ebin/inet_res.beam bootstrap/lib/kernel/ebin/os.beam bootstrap/lib/kernel/ebin/pg2.beam bootstrap/lib/stdlib/ebin/dets.beam bootstrap/lib/stdlib/ebin/dets_utils.beam bootstrap/lib/stdlib/ebin/erl_tar.beam bootstrap/lib/stdlib/ebin/escript.beam bootstrap/lib/stdlib/ebin/file_sorter.beam bootstrap/lib/stdlib/ebin/otp_internal.beam bootstrap/lib/stdlib/ebin/qlc.beam bootstrap/lib/stdlib/ebin/random.beam bootstrap/lib/stdlib/ebin/supervisor.beam bootstrap/lib/stdlib/ebin/timer.beam erts/aclocal.m4 erts/emulator/beam/bif.c erts/emulator/beam/erl_bif_info.c erts/emulator/beam/erl_db_hash.c erts/emulator/beam/erl_init.c erts/emulator/beam/erl_process.h erts/emulator/beam/erl_thr_progress.c erts/emulator/beam/utils.c erts/emulator/sys/unix/sys.c erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/init.beam erts/preloaded/src/erts_internal.erl lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl lib/diameter/src/base/diameter_lib.erl lib/kernel/src/os.erl lib/ssh/test/ssh_basic_SUITE.erl system/doc/efficiency_guide/advanced.xml
2015-03-20erts: Add test map_SUITE:t_hashmap_balanceSverker Eriksson