aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
AgeCommit message (Collapse)Author
2019-05-23Fix sticky class in exceptionBjörn Gustavsson
When catching an exception re-throwing with a changed class, the class could be changed to the original class if the exception got caught and rethrown in (for example) an after block: sticky_class() -> try try throw(reason) catch throw:Reason:Stack -> erlang:raise(error, Reason, Stack) end after ok end.
2019-05-14Merge branch 'john/erts/fix-xxx_to_existing_atom-overflow/ERL-944/OTP-15819' ↵John Högberg
into maint * john/erts/fix-xxx_to_existing_atom-overflow/ERL-944/OTP-15819: erts: Fix buffer overflow in xxx_to_existing_atom
2019-05-13erts: Fix buffer overflow in xxx_to_existing_atomJohn Högberg
2019-05-02Merge branch 'bmk/erts/esock/20190430/configure_esock_include/OTP-15658'Micael Karlberg
2019-05-02Merge branch 'lukas/OTP-22/misc-fixes'Lukas Larsson
* lukas/OTP-22/misc-fixes: erts: Restart driver_SUITE:polling node at failure
2019-05-02erts: Restart driver_SUITE:polling node at failureLukas Larsson
2019-04-30[socket|net|test] Update test suites to handle disabled esockMicael Karlberg
2019-04-29Merge branch 'bmk/erts/esock/20190417/new_select_api/OTP-15496'Micael Karlberg
2019-04-18Merge branch 'kjell/emulator/persistent_term_yield/OTP-15615'Kjell Winblad
* kjell/emulator/persistent_term_yield/OTP-15615: Make persistent_term:put/2 and persistent_term:erase/1 yield
2019-04-18Merge branch 'rickard/dist-system-limit/OTP-15708'Rickard Green
* rickard/dist-system-limit/OTP-15708: Fail when we cannot encode term in binary
2019-04-18Make persistent_term:put/2 and persistent_term:erase/1 yieldKjell Winblad
Prior to this commit, the functions put/2 and erase/1 in the persistent_term module did not yield even if the persistent term table was large (the persistent term table is copied every time put/2 or erase/1 is called). Furthermore, a call to put/2 or erase/1 did only consume a single reduction. This commit fixes these problems.
2019-04-18Merge branch 'lukas/OTP-22-rc2/misc-fixes/OTP-15773'Lukas Larsson
* lukas/OTP-22-rc2/misc-fixes/OTP-15773: erts: Yield correctly when iterating over distr exit messages erts: Fix cerl -rr to use correct etp file erts: Fix etp-process-info to print exiting and free processes tools: Adjust instrument abort tc to better trigger faults erts: Fix cleanup of message factory undo erts: Make dump_SUITE:free_dump not dump via rpc erts: Add extra debugging to dist frag testcases erts: Run smaller dist frag test to 32 bit machines erl_docgen: Remove accidentally merged debug printout erts: Fix z_SUITE to always look for cerl in ERL_TOP otp: make top Makefile app target respect TYPE variable vxworks: Make vxworks configure use environment CFLAGS erts: Make erts_free debug failure easier to diagnose erts: Fix gcc warning in to_erl
2019-04-18erts: Yield correctly when iterating over distr exit messagesLukas Larsson
Before this fix the process would continue to process more distributed down or exit messages until it ran out of reductions instead of being suspended immediately.
2019-04-18erts: Make dump_SUITE:free_dump not dump via rpcLukas Larsson
Doing the dump via rpc can introduce all kins of strange timing issiues. So instead we dump 5ms after the exit has been started.
2019-04-18erts: Add extra debugging to dist frag testcasesLukas Larsson
2019-04-18erts: Run smaller dist frag test to 32 bit machinesLukas Larsson
Because of fragmentation of memory it is not always possible to allocate enough 320 MB segments on 32-bit so we only sent smaller packets there.
2019-04-17[socket|test] Timing and node startsMicael Karlberg
1) Improved time calculations When measuring the time something takes, use monitonic time instead (of os:timestamp()). 2) Make sure we do not hang when the node start hangs. We start new (slave) nodes via a starter process. The point of that is that it can be killed when it takes to long.
2019-04-17[socket|test] Make sure all evaluators are terminatedMicael Karlberg
When an evaluator skips (issue a exit or throw skip), we must make sure all the other also terminates, before the TC can end. This was not done which cause the TC to fail when one of the other evaluators (tester) terminated later.
2019-04-17[socket|test] Test case tweakingMicael Karlberg
2019-04-17[socket|test] Commented out setting debug during closeMicael Karlberg
2019-04-17[socket] Make use of the new select (read|write) functionsMicael Karlberg
Make use of the new select functions; enif_select_[read|write], for read and write select. These functions allows us to construct the select message ourseves: {'$socket', Socket, select, Ref} This is in preparations for when we introduce the 'nowait' (or something similar) value for the timeout argument (in accept, read and write funcions). It also solves (we hope) the term leakage problems (it was difficult to free the environment when there was only one/socket). OTP-15496
2019-04-15Merge branch 'bjorn/cuddle-with-tests'Björn Gustavsson
* bjorn/cuddle-with-tests: crash dump: Fix printing of "OldBinVHeap unused" crash dump: Include correct IP for a garbing process fun_SUITE: Make refc/1 test more reliable Remove redundant rule from Emakefile Turn off more optimizations for no_opt modules test_server_node: Bump compiler compatibility version to OTP 20 erts_test_utils: Bump compiler compatibility version to OTP 20 distribution_SUITE: Remove irrelevant test atom_roundtrip_r16b bs_construct_SUITE: Rename bs_add_overflow/1 to bs_append_overflow/1 bs_construct_SUITE: Remove troublesome test huge_binary/1 bs_construct_SUITE: Remove incorrect purpose line
2019-04-12fun_SUITE: Make refc/1 test more reliableBjörn Gustavsson
Wait a little after to make sure that fun holding process to complete its termination.
2019-04-12Remove redundant rule from EmakefileBjörn Gustavsson
According to the comment, this rule was only needed when communication with R7B nodes was supported.
2019-04-12Turn off more optimizations for no_opt modulesBjörn Gustavsson
With the new compiler in OTP 22, we have to use more options to turn off optimizations. This commit also skips the match_huge_int/1 test case in the unoptimized clone of the bs_match_int module because it could crash on memory-constrained computers.
2019-04-12Merge branch 'bjorn/erts/measure-process_main/OTP-15620'Björn Gustavsson
* bjorn/erts/measure-process_main/OTP-15620: Add benchmark Add erts_debug:interpreter_size/0
2019-04-11erts_test_utils: Bump compiler compatibility version to OTP 20Björn Gustavsson
2019-04-11distribution_SUITE: Remove irrelevant test atom_roundtrip_r16bBjörn Gustavsson
Communication with OTP R16b has not been supported for a while.
2019-04-11bs_construct_SUITE: Rename bs_add_overflow/1 to bs_append_overflow/1Björn Gustavsson
The test case tests that the bs_append instruction tests for overflow. Make that clear by renaming the test case. While at it, also add a few explicit garbage_collection/0 calls to make it more likeley to run successfully in tight memory situations.
2019-04-11bs_construct_SUITE: Remove troublesome test huge_binary/1Björn Gustavsson
This test case can fail for the wrong reason (swapping followed by a timetrap timeout). It is unlikely to fail because of a real bug.
2019-04-11bs_construct_SUITE: Remove incorrect purpose lineBjörn Gustavsson
2019-04-11Add benchmarkBjörn Gustavsson
2019-04-10Merge pull request #2204 from jhogberg/john/erts/optimize-arith-ops/OTP-15740John Högberg
erts: Optimize arithmetic ops using overflow intrinsics
2019-04-09erts: Fix driver_SUITE:use_fallback_pollsetLukas Larsson
We don't check for io errors as the pollset will be unstable.
2019-04-09erts: Skip large dist testcases on machines with little memoryLukas Larsson
2019-04-08Merge branch 'bjorn/erts/cuddle-with-tests'Björn Gustavsson
* bjorn/erts/cuddle-with-tests: statistics_SUITE: Make wall_clock_update/1 more tolerant
2019-04-08erts: Optimize arithmetic ops using overflow intrinsicsJohn Högberg
2019-04-05Fail when we cannot encode term in binaryRickard Green
Fail when we cannot encode term in binary instead of producing a faulty result.
2019-04-03lcnt_SUITE: Ignore socket-NIF locks in toggle testsJohn Högberg
2019-04-01efile_SUITE: Fix proc_zero_sized_files on systems with empty /procJohn Högberg
This test would fail on some versions of FreeBSD because /proc was present but empty. This commit makes the test fail if and only if a known zero-sized file is found and turns out to be empty empty.
2019-03-29Merge branch 'sverker/process_info-reductions-fix/OTP-15709' into maint-21Erlang/OTP
* sverker/process_info-reductions-fix/OTP-15709: erts: Fix bug in process_info(reductions) erts: Use ptr_val for pointer in gc msg copy
2019-03-29Merge branch 'maint'Sverker Eriksson
2019-03-29Merge branch 'sverker/process_info-reductions-fix/OTP-15709' into maintSverker Eriksson
* sverker/process_info-reductions-fix/OTP-15709: erts: Fix bug in process_info(reductions) erts: Use ptr_val for pointer in gc msg copy
2019-03-29Fix out of memory bug in the implementation of mapsKjell Winblad
This commit fixes a bug that could cause a crash or memory usage to grow until the machine ran out of memory when adding a key-value pair to a map. This could happen when inserting a new key-value pair with a key K1 containing a binary B1 into a map M having a key K2 with a binary B2 if the following conditions were met: * size(B1) >= 4294967296 * size(B2) >= 4294967296 * size(M) >= 32 * (size(B1) rem 4294967296) == (size(B2) rem 4294967296) * the first (size(B1) rem 4294967296) bytes are the same both in B1 and B2 * substituting B1 in K1 with B2 would result in a term with the same value as K2 The root cause of the bug is that the map implementation only hashed the first (X modulo 4294967296) bytes of binaries so that different binaries could get hashed to the same hash value independently of the hash seed.
2019-03-28erts: Fix bug in process_info(reductions)Sverker Eriksson
returning incorrect result as * current process might not be RUNNING in which case REDS_IN is actually used as def_arg_reg[5] * FCALLS might not have been swapped out * the SAVED_CALLS case was wrong and returned number of reds left
2019-03-28Merge branch 'john/erts/remove-destructive-bs_get_binary2/ERL-901'John Högberg
* john/erts/remove-destructive-bs_get_binary2/ERL-901: erts: Remove unsafe bs_get_binary2 optimization from loader
2019-03-27erts: Remove unsafe bs_get_binary2 optimization from loaderJohn Högberg
A load-time optimization assumed that match contexts had no further uses when a bs_get_binary2 overwrote the match context's register, and figured it would be safe to reuse the match context's memory for the resulting binary. This is no longer safe as of OTP 22, as a match context may be reused after being passed to another function.
2019-03-25Merge branch 'sverker/bug-fixing'Sverker Eriksson
* sverker/bug-fixing: erts: Fix erts_debug:set_internal_state(reds_left) erts: Fix binary_SUITE:cmp_old_impl
2019-03-25erts: Fix binary_SUITE:cmp_old_implSverker Eriksson
since DFLAG_BIG_CREATION became mandatory in 321dc6ee0241f802c940def174c0a77262e11f21.
2019-03-25erts: Yield when exiting/free process is suspended by deLukas Larsson