aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
AgeCommit message (Collapse)Author
2017-06-03Fix process_SUITE:low_prio/1Björn Gustavsson
It is expected that low-priority processes should be allowed to run about 1/8 of the time of normal-priority processes. The proportion calculated was usually considerably lower than 1/8. It seems that the main reason is the punishement in reductions when sending to a process that alreday has many messages in the message queue. I have verified that by running the emulator with the +snsp to turn off the send punishment. To avoid that punishment, let the server process run at high priority so that it can keep its message queue short. It seems that the proportion is now very close to 1/8. Therefore, we can tighten the margins for the proportion.
2017-06-02Merge branch 'john/erts/refactor-gcsuite'John Högberg
2017-06-01Merge branch 'rickard/purge-hibernated-19' into rickard/purge-hibernated-20Rickard Green
* rickard/purge-hibernated-19: Update testcase to check that purge handle hibernated process correct
2017-06-01Merge branch 'rickard/purge-hibernated' into rickard/purge-hibernated-19Rickard Green
* rickard/purge-hibernated: Update testcase to check that purge handle hibernated process correct Conflicts: erts/emulator/test/code_SUITE.erl
2017-06-01Update testcase to check that purge handle hibernated process correctRickard Green
2017-05-31Break out a lot of duplicated code in minor_major_gc_option_ZZZJohn Högberg
2017-05-31Make sure that asynchronous replies are not lostBjörn Gustavsson
(First attempt to fix in 23f132d9ab776a.) If an synchronous GC was requested by calling: erlang:garbage_collect(Pid, [{async,Ref}]) the reply message could in certain circumstances be lost. The problem is that cleanup_sys_tasks() is never called if there are dirty tasks, but no other active system tasks. Also shorten the long waiting times in the test case binary_SUITE:trapping/1 to make it much more likely that the GC have not already finished when the process is killed.
2017-05-31Fix a race condition that consistently affected lc+lcnt buildsJohn Högberg
The garbage_collect message could be received while waiting for trace messages, causing the test to crash erroneously.
2017-05-29Merge branch 'bjorn/cuddle-with-tests'Björn Gustavsson
* bjorn/cuddle-with-tests: bs_construct_SUITE: Correct calculation of free memory
2017-05-24bs_construct_SUITE: Correct calculation of free memoryBjörn Gustavsson
free_mem/0 returned the number of free Kb, but the caller assumed that it was in Mb. Also add another clause to further scale down the size of the binaries created.
2017-05-23erts: Reduce runtime for nif_SUITE hash testsSverker Eriksson
and base allowed hash deviation on nr of standard deviations to make it easier to fiddle with the work load.
2017-05-23Merge branch 'sverker/enif_select-testing'Sverker Eriksson
* sverker/enif_select-testing: erts: Fix nif_SUITE:monitor_frenzy for threadless erts: Improve message flush in nif_SUITE erts: Test monitor resource destructor from thread
2017-05-23erts: Fix nif_SUITE:monitor_frenzy for threadlessSverker Eriksson
2017-05-23erts: Improve message flush in nif_SUITESverker Eriksson
Pass number of expected messages in order to wait longer for messages (for slow machines) while not wasting test time waiting for nothing.
2017-05-23erts: Test monitor resource destructor from threadSverker Eriksson
which is scheduled on non-smp VM.
2017-05-22Add enif_whereis_...() functionsTed Burghart
#### Why do we need this new feature? There are cases when a NIF needs to send a message, using `enif_send()`, to a long-lived process with a registered name. A common use-case is logging, where asynchronous fire-and-forget messages are the norm. There can also be cases where a yielding or dirty NIF or background thread may request a callback from a service with additional information it needs to complete its operation, yielding or waiting (with suitable timeouts, etc) until its state has been updated through the NIF module's API. NIFs can only send messages to pids, and the lack of name resolution leaves a complicated dance between separate monitoring processes and the NIF as the only way to keep a NIF informed of the whereabouts of such long-lived processes. Providing a reliable, built-in facility for NIFs to resolve process (or port) names simplifies these use cases considerably. #### Risks or uncertain artifacts? Testing has not exposed any significant risk. The implementation behaves as expected on regular and dirty scheduler threads as well as non-scheduler threads. By constraining the `enif_whereis_...()` functions to their minimal scopes and using patterns consistent with related functions, the implementation, testing, and maintenance burden is low. The API and behavior of existing functions is unchanged. #### How did you solve it? While extending `enif_send()` to operate on a pid or an atom (as `erlang:send/2` does) was attractive, it would have entailed changing the type of its `to_pid` parameter and thereby breaking backward compatibility. The same consideration applies to `enif_port_command()`. That leaves a choice between 1, 2, or 3 new functions: 1. `enif_whereis()` 2. `enif_whereis_pid()` and `enif_whereis_port()` 3. All of the above. While option (1), directly mimicking the behavior of `erlang:whereis/1`, is appealing, it poses potential problems if `pid()` or `port()` are subsequently implemented as non-integral types that must be bound to an owning `ErlNifEnv` instance. Therefore, option (2) has been chosen to use `ErlNifPid`/`ErlNifPort` structures in the API to maintain proper term ownership semantics.
2017-05-19Merge branch 'rickard/ds-runqs'Rickard Green
OTP-14152 * rickard/ds-runqs: Make statistics/1 aware of dirty run-queues and tasks
2017-05-19Make statistics/1 aware of dirty run-queues and tasksRickard Green
2017-05-17code_SUITE: Remove unused functionsBjörn Gustavsson
2017-05-17Eliminate warning for variable 'Config' being unusedBjörn Gustavsson
2017-05-08Merge branch 'sverker/is_module_native-trace-bug/OTP-14390'Sverker Eriksson
* sverker/is_module_native-trace-bug/OTP-14390: erts: Fix code:is_module_native for local trace erts: Move and rename erts_is_native_break()
2017-05-05Extend hipe_SUITE to test exceptions and try/catchBjörn Gustavsson
2017-05-04erts: Fix code:is_module_native for local traceSverker Eriksson
Local trace on first function in module made code:is_module_native/1 return true. Use new erts_is_function_native() to make a proper check.
2017-05-04Update copyright yearRaimo Niskanen
2017-04-28Merge PR1413 from g-andrade/feature/phash2_nifSverker Eriksson
Support hashing terms from NIF code
2017-04-25Merge branch 'lukas/erts/list_to_port/OTP-14348'Lukas Larsson
* lukas/erts/list_to_port/OTP-14348: erts: Add erlang:list_to_port/1 debug bif erts: Auto-import port_to_list for consistency erts: Polish off erlang:list_to_ref/1
2017-04-25erts: Add erlang:list_to_port/1 debug bifLukas Larsson
2017-04-25Merge branch 'lukas/erts/deprecate-non-smp/OTP-14272'Lukas Larsson
* lukas/erts/deprecate-non-smp/OTP-14272: erts: Fix testcases for smp +S 1:1 erts: Deprecate the non-smp emulators
2017-04-24erts: Discontinue salted use of enif_hash/phash2Guilherme Andrade
2017-04-24Handle chardata in string:to_float and string:to_listDan Gudmundsson
2017-04-22erts: Allow for easier future enif_hash expansionGuilherme Andrade
Allow for expanding support to 64-bit hashes without breaking the interface.
2017-04-22erts: Add test cases for salted enif_hash callsGuilherme Andrade
2017-04-22erts: Support custom salt in enif_hashGuilherme Andrade
2017-04-21erts: Fix testcases for smp +S 1:1Lukas Larsson
2017-04-21erts: Deprecate the non-smp emulatorsLukas Larsson
2017-04-20erts: Refactor enif_phash2 into enif_hashGuilherme Andrade
A more generic hashing function which can also hash terms based on `make_internal_hash'.
2017-04-20erts: Fix random floats in enif_phash2 testsGuilherme Andrade
2017-04-20erts: Remove enif_phash2_rangedGuilherme Andrade
2017-04-20Remove test case for testing compatibility with R9BBjörn Gustavsson
It is no longer possible to commuicate with R9B nodes.
2017-04-20Do atom roundtripping with an R16B nodeBjörn Gustavsson
It is no longer possible to communicate with R15B nodes.
2017-04-19erts: Add enif_phash2 and enif_phash2_rangedGuilherme Andrade
These allow one to hash VM terms from NIF code.
2017-04-12Merge branch sverker/remove-latin1-atom-encoding/OTP-14337Sverker Eriksson
* sverker/remove-latin1-atom-encoding: kernel: Fix erl_distribution_wb_SUITE:whitebox kernel: Remove pg2_SUITE:compat erts: Remove fun_r13_SUITE stdlib: Remove test cases for R12 io protocol kernel: Make DFLAG_UTF8_ATOMS mandatory kernel: Rewrite distribution flag verification tools: Update assumptions in lcnt about external atom format stdlib: Tweak beam_lib_SUITE whitebox assumptions orber: Remove hard dependency to external atom format kernel: Try mend disk_log whitebox tests erts: Mark latin1 atom encoding as deprecated jinterface: Do not generate atoms on old latin1 external format erl_interface: Do not generate atoms on old latin1 ext format erts: Do not generate atoms on old latin1 external format erts: Fix faulty ASSERT for failed dec_term
2017-04-11Merge branch 'rickard/node_container_SUITE.spec'Rickard Green
* rickard/node_container_SUITE.spec: Add node_container_SUITE spec
2017-04-11Merge branch 'rickard/test-fix'Rickard Green
* rickard/test-fix: Fix scheduler_SUITE:update_cpu_info test-case
2017-04-11Merge branch 'rickard/pcre-8.40'Rickard Green
OTP-14331 * rickard/pcre-8.40: Update documentation Update README.pcre_update.md Stack guard for PCRE Adjust for incompatibility between PCRE 8.40 and perl 5.22.1 Generate re replacement and split tests with perl vsn 5.22.1 Fix re_SUITE:pcre_compile_workspace_overflow/1 Skip line with lockout of modifiers in PCRE tests Update tests for PCRE version 8.40 Update PCRE to version 8.40 Conflicts: erts/emulator/beam/beam_debug.c
2017-04-07Stack guard for PCRERickard Green
2017-03-24Add node_container_SUITE specRickard Green
2017-03-17Fix scheduler_SUITE:update_cpu_info test-caseRickard Green
2017-03-14erts: Remove fun_r13_SUITESverker Eriksson
2017-03-13erts: Fix os_signal_SUITE testBjörn-Egil Dahlberg