aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
AgeCommit message (Collapse)Author
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
2015-03-20Erlang based BIF timer implementation for scalabilityRickard Green
2015-03-20Introduce a new time APIRickard Green
The old time API is based on erlang:now/0. The major issue with erlang:now/0 is that it was intended to be used for so many unrelated things. This tied these unrelated operations together and unnecessarily caused performance, scalability as well as accuracy, and precision issues for operations that do not need to have such issues. The new API spreads different functionality over multiple functions in order to improve on this. The new API consists of a number of new BIFs: - erlang:convert_time_unit/3 - erlang:monotonic_time/0 - erlang:monotonic_time/1 - erlang:system_time/0 - erlang:system_time/1 - erlang:time_offset/0 - erlang:time_offset/1 - erlang:timestamp/0 - erlang:unique_integer/0 - erlang:unique_integer/1 - os:system_time/0 - os:system_time/1 and a number of extensions of existing BIFs: - erlang:monitor(time_offset, clock_service) - erlang:system_flag(time_offset, finalize) - erlang:system_info(os_monotonic_time_source) - erlang:system_info(time_offset) - erlang:system_info(time_warp_mode) - erlang:system_info(time_correction) - erlang:system_info(start_time) See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.
2015-03-20Merge branch 'nox/fix-port_info-race' into maintZandra Hird
* nox/fix-port_info-race: Fix a race condition when calling port_info/1 OTP-12587
2015-03-19erts: Silence valgrind warning in nif_SUITE.cSverker Eriksson
Hmm, seems like gcc (4.4.3 at least) can switch the order of an &&-expression and do the last condition first if it think it's more efficient (and without side effects I hope). Which led to valgrind complaining about 'prev_ret' being used uninitialized in this case.
2015-03-19erts: Fix bug in binary_to_term with more than one big mapSverker Eriksson
2015-03-18Fix a race condition when calling port_info/1Anthony Ramine
This variable hold the values returned by erlang:port_info/1 and shouldn't be static. Reported-by: Heinz Nikolaus Gies
2015-03-15Ensure NIF term creation disallows illegal valuesSteve Vinoski
Add a check to enif_make_double to see if its double argument is infinity or NaN, returning a badarg exception if it is. Change the erl_nif documentation to specify that enif_make_double returns a badarg exception if its double argument is either infinity or NaN. Add tests to nif_SUITE for this change. Add checks to the enif_make* functions for atoms to prevent the creation of atoms whose name lengths are greater than the allowed maximum atom length. The enif_make_atom and enif_make_atom_len functions now return a badarg exception if the input string is too long. The enif_make_existing_atom and enif_make_existing_atom_len functions return false if the input string is too long. Change the erl_nif documentation to reflect the changes to these functions. Add tests to nif_SUITE for these changes. Add a field to ErlNifEnv to track that a NIF has raised an exception via enif_make_badarg. If a NIF calls enif_make_badarg but then ignores its return value and instead tries to return a non-exception term as its return value, the runtime still raises a badarg. This is needed to prevent enif_make_badarg values resulting from calls to enif_make_double, enif_make_atom, or enif_make_atom_len from being erroneously stored within other terms and returned from a NIF. Calling enif_make_badarg but not returning its return value has been documented as being illegal ever since enif_make_badarg was added, but the runtime has not enforced it until now. Add tests for regular and dirty NIFs to ensure that calls to enif_make_badarg result in badarg exceptions even if a NIF fails to return the result of enif_make_badarg as its return value. Add documentation to enif_make_badarg to specify that calling it raises a badarg even if a NIF ignores its return value.
2015-03-13erts: Enhance maps ordering testsBjörn-Egil Dahlberg
2015-03-12erts: Fix nif API for hashmapsSverker Eriksson
2015-03-12erts: Enhance match spec tests for mapsBjörn-Egil Dahlberg
2015-03-12erts: Make is_members in map_SUITE's more stringentSverker Eriksson
2015-03-12erts: Fix maps testcase unordered enc/decBjörn-Egil Dahlberg
2015-03-12erts: Update map tests for unordered mapsBjörn-Egil Dahlberg
2015-03-12erts: Update tests for maps:merge/2 and erlang:map_size/1Björn-Egil Dahlberg
2015-03-12erts: Fix erlang:hash and erlang:phash for hamtSverker Eriksson
by calling make_hash2.
2015-03-12erts: Update build_and_check maps testcaseBjörn-Egil Dahlberg
2015-03-12erts: Extend tests of maps:merge/2Björn-Egil Dahlberg
2015-03-12erts: Test building and removing mapsBjörn-Egil Dahlberg
2015-03-12erts: Add tests for large maps:get/2 and maps:find/2Björn-Egil Dahlberg
2015-03-12erts: Remove hashmap from testsBjörn-Egil Dahlberg