aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
AgeCommit message (Collapse)Author
2014-09-12Merge branch 'maint'Sverker Eriksson
2014-09-12erts: Remove enif_have_dirty_schedulers()Sverker Eriksson
and add 'dirty_scheduler_support' to ErlNifSysInfo
2014-09-05Merge branch 'maint'Rickard Green
* maint: Only run upper boundry tuple test with lots of memory
2014-09-05Merge branch 'rickard/memory_consuming_tuple_tests' into maintRickard Green
* rickard/memory_consuming_tuple_tests: Only run upper boundry tuple test with lots of memory
2014-09-05Only run upper boundry tuple test with lots of memoryRickard Green
2014-09-04Merge branch 'maint'Sverker Eriksson
2014-09-04Merge branch 'sverk/MIN_SMALL-to-integer' into maintSverker Eriksson
* sverk/MIN_SMALL-to-integer: erts: Correct conversion of MIN_SMALL numeral to fixnum OTP-12140
2014-09-04erts: Correct conversion of MIN_SMALL numeral to fixnumSverker Eriksson
list_to_integer and binary_to_integer returned un-normalized bignum for -134217728 on 32-bit and -576460752303423488 on 64-bit. Thanks to Jesper Louis Andersen, Mikael Pettersson and Anthony Ramine for report, initial patch and optimization suggestion.
2014-09-04Merge branch 'maint'Sverker Eriksson
2014-09-04Merge branch 'sverk/nif-inspect-copy-bug/OTP-9828' into maintSverker Eriksson
* sverk/nif-inspect-copy-bug/OTP-9828: erts: Fix bug with enif_make_copy reallocating writable binary Conflicts: erts/emulator/test/nif_SUITE.erl
2014-09-03erts: Fix bug with enif_make_copy reallocating writable binarySverker Eriksson
that could invalidate a pointer received from an earlier call to enif_inspect_binary. Solution: Emasculate writable binary at enif_inspect_binary. There are room for optimizations here as we now do an unconditional emasculation even though enif_make_copy is not called later in the NIF.
2014-08-29Merge branch 'maint'Rickard Green
* maint: Fix busy_port_SUITE:io_to_busy test-case Ensure "runnable port" trace messages are not sent out of order Ensure "runnable proc" trace messages are not sent out of order
2014-08-29Merge branch 'rickard/runnable-trace-ooo-bug/OTP-12105' into maintRickard Green
* rickard/runnable-trace-ooo-bug/OTP-12105: Fix busy_port_SUITE:io_to_busy test-case Ensure "runnable port" trace messages are not sent out of order Ensure "runnable proc" trace messages are not sent out of order
2014-08-28Merge branch 'maint'Rickard Green
* maint: add enif_schedule_nif() to NIF API
2014-08-28add enif_schedule_nif() to NIF APISteve Vinoski
In the #erlang IRC channel Anthony Ramine once mentioned the idea of allowing a NIF to use an emulator trap, similar to a BIF trap, to schedule another NIF for execution. This is exactly how dirty NIFs were implemented for Erlang/OTP 17.0, so this commit refactors and generalizes that dirty NIF code to support a new enif_schedule_nif() API function. The enif_schedule_nif() function allows a long-running NIF to be broken into separate NIF invocations. The NIF first executes part of the long-running task, then calls enif_schedule_nif() to schedule a NIF for later execution to continue the task. Any number of NIFs can be scheduled in this manner, one after another. Since the emulator regains control between invocations, this helps avoid problems caused by native code tying up scheduler threads for too long. The enif_schedule_nif() function also replaces the original experimental dirty NIF API. The function takes a flags parameter that a caller can use to indicate the NIF should be scheduled onto either a dirty CPU scheduler thread, a dirty I/O scheduler thread, or scheduled as a regular NIF on a regular scheduler thread. With this change, the original experimental enif_schedule_dirty_nif(), enif_schedule_dirty_nif_finalizer() and enif_dirty_nif_finalizer() API functions are no longer needed and have been removed. Explicit scheduling of a dirty NIF finalization function is no longer necessary; if an application wants similar functionality, it can have a dirty NIF just invoke enif_schedule_nif() to schedule a non-dirty NIF to complete its task. Lift the restriction that dirty NIFs can't call enif_make_badarg() to raise an exception. This was a problem with the original dirty NIF API because it forced developers to get and check all incoming arguments in a regular NIF, and then schedule the dirty NIF which then had to get all the arguments again. Now, the argument checking can be done in the dirty NIF and it can call enif_make_badarg() itself to flag incorrect arguments. Extend the ErlNifFunc struct with a new flags field that allows NIFs to be declared as dirty. The default value for this field is 0, indicating a regular NIF, so it's backwards compatible with all existing statically initialized ErlNifFunc struct instances, and so such instances require no code changes. Defining the flags field with a value of ERL_NIF_DIRTY_JOB_CPU_BOUND indicates that the NIF should execute on a dirty CPU scheduler thread, or defining it with a value of ERL_NIF_DIRTY_JOB_IO_BOUND indicates that the NIF should execute on a dirty I/O scheduler thread. Any other flags field value causes a NIF library loading error. Extend the ErlNifEntry struct with a new options field that indicates whether a NIF library was built with support for optional features such as dirty NIFs. When a NIF library is loaded, the runtime checks the options field to ensure compatibility. If a NIF library built with dirty NIF support is loaded into a runtime that does not support dirty NIFs, and the library defines one or more ErlNifFunc entries with non-zero flags fields indicating dirty NIFs, a NIF library loading error results. There is no error if a NIF library built with dirty NIF support is loaded into a runtime that does not support dirty NIFs but the library does not have any dirty NIFs. It is also not an error if a library without dirty NIF support is loaded into a runtime built with dirty NIF support. Add documentation and tests for enif_schedule_nif().
2014-08-22Fix busy_port_SUITE:io_to_busy test-caseRickard Green
2014-08-21Merge branch 'maint'Björn-Egil Dahlberg
2014-08-21Merge branch 'egil/proc_lib-optimizations/OTP-12060' into maintBjörn-Egil Dahlberg
* egil/proc_lib-optimizations/OTP-12060: stdlib: Update dependencies to erts-6.2 erts: Update preloaded erlang.beam stdlib: Use erlang:fun_info_mfa/1 in proc_lib:init_p/3 erts: Test erlang:fun_info_mfa/1 erts: Introduce erlang:fun_info_mfa/1
2014-08-20Properly support maps in match_specsAnthony Ramine
2014-08-11Merge branch 'maint'Rickard Green
* maint: Fix build of test port program Update Makefile.src Add async_ports test Fix abort of nosuspend-tasks in erts_port_task_schedule()
2014-08-11Merge branch 'rickard/nosuspend-bug/OTP-12082' into maintRickard Green
* rickard/nosuspend-bug/OTP-12082: Fix build of test port program Update Makefile.src Add async_ports test Fix abort of nosuspend-tasks in erts_port_task_schedule()
2014-08-06Fix build of test port programRickard Green
2014-08-06Merge branch 'maint'Lukas Larsson
* maint: erts: Fix tc and docs after {fd,FD} bind change
2014-08-06erts: Fix tc and docs after {fd,FD} bind changeLukas Larsson
The sha of the original change is 52810718b
2014-08-05Update Makefile.srckudryashov-sv
2014-08-05Add async_ports testSergey Kudryashov
2014-07-11erts: Test erlang:fun_info_mfa/1Björn-Egil Dahlberg
2014-06-06Merge branch 'maint'Rickard Green
2014-06-06Merge branch 'rickard/binary_to_term_error/OTP-11931' into maintRickard Green
* rickard/binary_to_term_error/OTP-11931: Replace erlang:binary_to_term() Erlang wrappers Conflicts: erts/preloaded/ebin/erts_internal.beam
2014-06-06Merge branch 'rickard/yielding-binary-list-conversions/OTP-11888' into maintRickard Green
* rickard/yielding-binary-list-conversions/OTP-11888: Add test-case comparing old and new implementations Make binary BIFs converting from lists yield on large input Make binary BIFs converting to lists yield on large input
2014-06-05Replace erlang:binary_to_term() Erlang wrappersRickard Green
Replace the 'erlang:binary_to_term/1' and 'erlang:binary_to_term/2' Erlang wrappers taking care of failure after yield with management of this in the hidden yield BIF.
2014-06-05Merge branch 'maint'Lukas Larsson
* maint: Add erlang:system_info(tolerant_timeofday)
2014-06-05Merge branch 'etsukata/system_info_tolerant_timeofday/OTP-11970' into maintLukas Larsson
* etsukata/system_info_tolerant_timeofday/OTP-11970: Add erlang:system_info(tolerant_timeofday)
2014-06-05Merge branch 'maint'Lukas Larsson
* maint: erts: tracing on send now works for registered processes
2014-06-05Merge branch 'lukas/erts/fix_trace_on_registered_procs/OTP-11968' into maintLukas Larsson
* lukas/erts/fix_trace_on_registered_procs/OTP-11968: erts: tracing on send now works for registered processes
2014-06-05erts: tracing on send now works for registered processesLukas Larsson
This bug was introduced in R16B. Testcases have been adapted to verify the correct behaviour.
2014-05-22Add test-case comparing old and new implementationsRickard Green
2014-05-22Make binary BIFs converting from lists yield on large inputRickard Green
- erlang:list_to_binary/1 - erlang:iolist_to_binary/1 - erlang:list_to_bitstring/1 - binary:list_to_bin/1
2014-05-22Make binary BIFs converting to lists yield on large inputRickard Green
- erlang:binary_to_list/1 - erlang:binary_to_list/3 - erlang:bitstring_to_list/1
2014-05-20Merge branch 'sverk/better-module-info'Sverker Eriksson
OTP-11940 * sverk/better-module-info: Remove obsolete 'imports' entry from module_info/1/2 functions Add 'module' entry for module_info/0 function for completeness Add 'md5' entry for module_info/0/1 functions.
2014-05-14Add 'module' entry for module_info/0 function for completenessRichard Carlsson
as it exist in module_info/1.
2014-05-14Add 'md5' entry for module_info/0/1 functions.Richard Carlsson
2014-05-12Merge branch 'maint'Björn-Egil Dahlberg
2014-05-05Merge branch 'lukas/erts/win32_spawn_exec_quoting/OTP-11905'Lukas Larsson
* lukas/erts/win32_spawn_exec_quoting/OTP-11905: win32: Fix quoting of paths
2014-04-30erts: Add testcase for erts_debug:size/1 Map termsBjörn-Egil Dahlberg
2014-04-29Fix timeout for match_spec_SUITE:otp_9422Sverker Eriksson
Must receive 'abort' even after loop_runner has finished.
2014-04-28Add erlang:system_info(tolerant_timeofday)Eiichi Tsukata
Add erlang:system_info(tolerant_timeofday), an API to check whether compensation for sudden changes of system time is enabled or not.
2014-04-10win32: Fix quoting of pathsLukas Larsson
2014-04-02Merge branch 'egil/test-cuddling'Björn-Egil Dahlberg
* egil/test-cuddling: tools: Refactor testcase emulator: Increase timetrap timeout for binary_SUITE emulator: Increase timetrap timeout for match_spec_SUITE
2014-04-01erts: Make binary_SUITE:deep less stressfulSverker Eriksson
as it times out on some machines. Not much point in redoing with lower input reductions when the terms are so big we will trap several times anyway.