aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/bif_SUITE.erl
AgeCommit message (Collapse)Author
2018-06-21Fix environment case sensitivity issues on WindowsJohn Högberg
2018-04-12New process_info() implementation using signalsRickard Green
2018-03-22Fix signal order for is_process_aliveRickard Green
2018-03-21Implementation of true asynchronous signaling between processesRickard Green
Communication between Erlang processes has conceptually always been performed through asynchronous signaling. The runtime system implementation has however previously preformed most operation synchronously. In a system with only one true thread of execution, this is not problematic (often the opposite). In a system with multiple threads of execution (as current runtime system implementation with SMP support) it becomes problematic. This since it often involves locking of structures when updating them which in turn cause resource contention. Utilizing true asynchronous communication often avoids these resource contention issues. The case that triggered this change was contention on the link lock due to frequent updates of the monitor trees during communication with a frequently used server. The signal order delivery guarantees of the language makes it hard to change the implementation of only some signals to use true asynchronous signaling. Therefore the implementations of (almost) all signals have been changed. Currently the following signals have been implemented as true asynchronous signals: - Message signals - Exit signals - Monitor signals - Demonitor signals - Monitor triggered signals (DOWN, CHANGE, etc) - Link signals - Unlink signals - Group leader signals All of the above already defined as asynchronous signals in the language. The implementation of messages signals was quite asynchronous to begin with, but had quite strict delivery constraints due to the ordering guarantees of signals between a pair of processes. The previously used message queue partitioned into two halves has been replaced by a more general signal queue partitioned into three parts that service all kinds of signals. More details regarding the signal queue can be found in comments in the erl_proc_sig_queue.h file. The monitor and link implementations have also been completely replaced in order to fit the new asynchronous signaling implementation as good as possible. More details regarding the new monitor and link implementations can be found in the erl_monitor_link.h file.
2017-10-27Correct erlang:is_builtin/3 for apply/2 and yield/0Björn Gustavsson
erlang:is_builtin(erlang, M, F) returns false for apply/2 and yield/0. The documentation for erlang:is_builtin/3 says that it returns true for BIFs that are implemented in C. apply/2 and yield/0 are implemented in C (as BEAM instructions), and therefore the correct return value is true. Also see a similar argument that was made for apply/3 in the past: http://erlang.org/pipermail/erlang-bugs/2015-October/005101.html https://bugs.erlang.org/browse/ERL-500
2017-10-13Eliminate use of deprecated functions in stringBjörn Gustavsson
2017-09-01Merge branch 'sverker/20/binary_to_atom-utf8-crash/ERL-474/OTP-14590' into maintSverker Eriksson
* sverker/20/binary_to_atom-utf8-crash/ERL-474/OTP-14590: erts: Fix crash in binary_to_atom/term for invalid utf8
2017-08-30Merge tag 'OTP-20.0' into sverker/20/binary_to_atom-utf8-crash/ERL-474/OTP-14590Sverker Eriksson
2017-08-30Merge tag 'OTP-19.0' into sverker/19/binary_to_atom-utf8-crash/ERL-474/OTP-14590Sverker Eriksson
2017-08-30erts: Fix crash in binary_to_atom/term for invalid utf8Sverker Eriksson
such as a sub-binary, of a correct utf8 string, that ends in the middle of a character.
2017-08-23Unicode support for erlang:display_string/1Rickard Green
2017-08-23erts: Allow any unicode string as crash dump sloganSverker Eriksson
i.e the first argument to erlang:halt
2017-01-30Add new AtU8 beam chunkJosé Valim
The new chunk stores atoms encoded in UTF-8. beam_lib has also been modified to handle the new 'utf8_atoms' attribute while the 'atoms' attribute may be a missing chunk from now on. The binary_to_atom/2 BIF can now encode any utf8 binary with up to 255 characters. The list_to_atom/1 BIF can now accept codepoints higher than 255 with up to 255 characters (thanks to Björn Gustavsson).
2016-12-19New test cases testing stacktrace from apply on erlang:error()Rickard Green
2016-11-22erts: Add env variable ERL_CRASH_DUMP_BYTESSverker Eriksson
to limit crash dump size
2016-05-30Reintroduce erlang:halt/0/1 in erl_bif_types.erlSverker Eriksson
Removed in f9cb80861f169743 when changed impl from C to Erlang. But seems they are needed to keep dialyzer tests happy. Also improved bif_SUITE:shadow_comments to include all exported in module erlang, not just the "snifs". ...which detected that apply/2 was missing Shadowed comment as well.
2016-05-25erts: Make erlang:halt/2 truncate string argSverker Eriksson
if too long.
2016-03-15update copyright-yearHenrik Nord
2016-03-11Remove ?line macrosBjörn-Egil Dahlberg
2016-03-11Eliminate use of doc and suite clausesBjörn-Egil Dahlberg
Those clause are obsolete and never used by common_test.
2016-03-11Eliminate use of test_server:fail/0,1Björn-Egil Dahlberg
2016-03-11Modernize use of timetrapsBjörn-Egil Dahlberg
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2015-10-09Teach erlang:is_builtin/3 that erlang:apply/3 is built-inBjörn Gustavsson
erlang:is_builtin(erlang, apply, 3) returns 'false'. That seems to be an oversight in the implementation of erlang:is_builtin/3 rather than a conscious design decision. Part of apply/3 is implemented in C (as a special instruction), and part of it in Erlang (only used if apply/3 is used recursively). That makes apply/3 special compared to all other BIFs. From the viewpoint of the user, apply/3 is a built-in function, since it cannot possibly be implemented in pure Erlang. Noticed-by: Stavros Aronis
2015-06-18Change license text to APLv2Bruce Yinhe
2014-12-19erts: Improve crash dumpsLukas Larsson
This commit improves crash dumps in several ways: * Suspends schedulers to get a current snapshot * Dumps information about scheduler * Dumps stack trace of current running process (including Garbing processes)
2013-11-11erts: remove ?line macro in testcasesFredrik Gustafsson
2013-11-09Add os:unsetenv/1Martin Hässler
New BIF os:unsetenv/1 which deletes an environment variable and returns 'true'. Does not change any old functionality. Calls the libc function unsetenv(3) on UNIX and SetEnvironmentVariableW(key, NULL) on Windows. The unicode support is the same as for os:getenv and os:putenv.
2013-01-08erts: Change internal representation of atoms to utf8Sverker Eriksson
2012-06-08Merge branch 'maint'Lukas Larsson
* maint: Update to work with space in include path Update to work with whitespace in exec path
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-03-22Merge branch 'maint'Raimo Niskanen
Conflicts: erts/doc/src/erlang.xml erts/emulator/beam/erl_process.c erts/emulator/beam/erl_process.h erts/emulator/test/bif_SUITE.erl erts/preloaded/ebin/erlang.beam erts/preloaded/src/erlang.erl lib/hipe/cerl/erl_bif_types.erl
2012-03-21erts: Basic test of erlang:halt/0..2Raimo Niskanen
2012-02-08bif_SUITE: Test for suitable "shadowed by erl_bif_types" commentsBjörn Gustavsson
2012-02-08bif_SUITE: Add test to ensure that all guard BIFs have type infoBjörn Gustavsson
2012-02-08Replace autoimport_SUITE with bif_SUITE:auto_imports/1Björn Gustavsson
erts/test/autoimport_SUITE tested that auto-import information in erl_internal:bif/2 was consistent with the documentation. It did it by scanning erlang.xml. Since the documentation is now based on the specs in erlang.erl, we should now test consistency of the specs and erl_internal:bif/2. Since anyone that adds a new BIF runs the emulator test suite, it makes sense to do this test in bif_SUITE in the emulator test suite.
2012-02-08bif_SUITE: Add test case for specs and BIF stubsBjörn Gustavsson
Rename the existing types/1 test case to erl_bif_types/1 to make it clearer what it does. Also no longer test for missing type information for BIFs (since it has become optional), but only check that the information provided seems to be consistent. Introduce the specs/1 test case to ensure that all BIFs have specs. Also introduce improper_bif_stubs/1 to check for proper stubs. Since the BEAM loader will now silently allow stubs for BIFs, we want to be particular about exactly what a stub look like, so that an Erlang function is not unintentionally overridden by a BIF.
2011-03-17Make erts_printf %T not recurse on C stackPatrik Nyblom
2011-02-17Rename Suite Callback to Common Test HookLukas Larsson
2011-02-17Fix formatting for emulatorLukas Larsson
2011-02-17Add init_per_suite and end_per_suiteLukas Larsson
2011-02-17Add ts_install_scb to suite/0Lukas Larsson
2011-02-17Update emulator tests to conform with common_test standardLukas Larsson
2010-06-07Test that all BIFs have known typesBjörn Gustavsson
Add a test that will verify that BIFs have type information in hiper/cerl/erl_bif_types.erl.
2010-06-03Merge branch 'pan/otp_8579_autoimport_override' into devErlang/OTP
* origin/pan/otp_8579_autoimport_override: Update preloaded modules Update primary bootstrap Remove outcommented code from erl_lint Make port_command/3 auto-imported Remove (harmless) warnings about min/max in core applications Autoimport min/2 and max/2 Improve coverage of erl_int in testcases Change warning to error for nowarn_bif_clash compiler directive Add -compile({no_auto_import,[F/A]}) doc to compiler.xml Add some testcases to compiler to verify that overriding really happens Return nowarn_bif_clash functionality but with warning Teach erl_lint to better override BIFs with local functions and imports Teach compiler to override autoimport with import First prototype for local functions overriding autoimported OTP-8579 Local functions should override auto-imported Local and imported functions now override the autoimported BIFs when the names clash. The pre R14 behaviour was that autoimported BIFs would override local functions. To avoid that old programs change behaviour, the following will generate an error: Doing a call without explicit module name to a local function having a name clashing with the name of an autoimported BIF that was present (and autoimported) before OTP R14A Explicitly importing a function having a name clashing with the name of an autoimported BIF that was present (and autoimported) before OTP R14A Using any form of the old compiler directive nowarn_bif_clash If the BIF was added or autoimported in OTP R14A or later, overriding it with an import or a local function will only result in a warning, To resolve clashes, you can either use the explicit module name erlang to call the BIF, or you can remove the autoimport of that specific BIF by using the new compiler directive -compile({no_auto_import,[F/A]})., which makes all calls to the local or imported function without explicit module name pass without warnings or errors. The change makes it possible to add autoimported BIFs without breaking or silently changing old code in the future. However some current code ingeniously utilizing the old behaviour or the nowarn_bif_clash compiler directive, might need changing to be accepted by the compiler.
2010-06-02Autoimport min/2 and max/2Patrik Nyblom
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP