diff options
author | Rickard Green <[email protected]> | 2019-07-04 17:40:16 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2019-07-08 11:10:23 +0200 |
commit | f9648e8f4aab57411c6002815b1fde43185b29c2 (patch) | |
tree | ba78227972319aa2b5e3f3fa0f1c4224f52608cc | |
parent | 2c49062e00375e90b3076bf707412303ed73e457 (diff) | |
download | otp-f9648e8f4aab57411c6002815b1fde43185b29c2.tar.gz otp-f9648e8f4aab57411c6002815b1fde43185b29c2.tar.bz2 otp-f9648e8f4aab57411c6002815b1fde43185b29c2.zip |
Fix unstable test dump_SUITE:signal_abort
Sometimes processes have not had the time to spread
from one scheduler. Force spread by using the undocumented
'scheduler' option.
-rw-r--r-- | erts/emulator/test/dump_SUITE.erl | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/erts/emulator/test/dump_SUITE.erl b/erts/emulator/test/dump_SUITE.erl index d0237b78cc..0aba2b874c 100644 --- a/erts/emulator/test/dump_SUITE.erl +++ b/erts/emulator/test/dump_SUITE.erl @@ -65,12 +65,14 @@ signal_abort(Config) -> {ok, Node} = start_node(Config), - _P1 = spawn(Node, ?MODULE, load, []), - _P2 = spawn(Node, ?MODULE, load, []), - _P3 = spawn(Node, ?MODULE, load, []), - _P4 = spawn(Node, ?MODULE, load, []), - _P5 = spawn(Node, ?MODULE, load, []), - _P6 = spawn(Node, ?MODULE, load, []), + SO = rpc:call(Node, erlang, system_info, [schedulers_online]), + + _P1 = spawn_opt(Node, ?MODULE, load, [], [{scheduler, (0 rem SO) + 1}]), + _P2 = spawn_opt(Node, ?MODULE, load, [], [{scheduler, (1 rem SO) + 1}]), + _P3 = spawn_opt(Node, ?MODULE, load, [], [{scheduler, (2 rem SO) + 1}]), + _P4 = spawn_opt(Node, ?MODULE, load, [], [{scheduler, (3 rem SO) + 1}]), + _P5 = spawn_opt(Node, ?MODULE, load, [], [{scheduler, (4 rem SO) + 1}]), + _P6 = spawn_opt(Node, ?MODULE, load, [], [{scheduler, (5 rem SO) + 1}]), timer:sleep(500), |