diff options
author | John Högberg <[email protected]> | 2018-07-19 11:41:06 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-09-13 09:02:40 +0200 |
commit | 6f5a0d5f83668d4b53fcce9a6c927e30df169765 (patch) | |
tree | f3ce8ad3ae1382c6e7723c039bb4ec7b1a1edb82 /erts/emulator/test | |
parent | ffa54a25e1cc9c6d0b93dcd3a84ae9c8962ff7ec (diff) | |
download | otp-6f5a0d5f83668d4b53fcce9a6c927e30df169765.tar.gz otp-6f5a0d5f83668d4b53fcce9a6c927e30df169765.tar.bz2 otp-6f5a0d5f83668d4b53fcce9a6c927e30df169765.zip |
Improve trapping in lists:reverse/2
If the process had more free space than reductions it could run a
lot longer than it was supposed to. It didn't honor the number of
reductions going in either, nor did it bump reductions when
returning its result or erroring out.
This commit also removes this function from a work function in
scheduler_SUITE as it's extremely sensitive to the number of
reductions spent in the test, causing
equal_and_high_with_part_time_max to fail on some machines.
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/scheduler_SUITE.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/test/scheduler_SUITE.erl b/erts/emulator/test/scheduler_SUITE.erl index 7eebbe8b19..d98edd1ec2 100644 --- a/erts/emulator/test/scheduler_SUITE.erl +++ b/erts/emulator/test/scheduler_SUITE.erl @@ -2155,7 +2155,7 @@ workers_exit([Ps|Pss]) -> workers_exit(Pss). do_work(PartTime) -> - lists:reverse(lists:seq(1, 50)), + _ = id(lists:seq(1, 50)), receive stop_work -> receive after infinity -> ok end after 0 -> ok end, case PartTime of true -> receive after 1 -> ok end; @@ -2163,6 +2163,8 @@ do_work(PartTime) -> end, do_work(PartTime). +id(I) -> I. + workers(N, _Prio, _PartTime) when N =< 0 -> []; workers(N, Prio, PartTime) -> |