aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-12-03 11:10:49 +0100
committerSverker Eriksson <[email protected]>2013-12-03 11:10:49 +0100
commitaf97353a660fee2c97f9c4faf4a32ba04a5face7 (patch)
tree29cd782c7ca24eaaf1b5f0035bb2d7bbb0efea84 /erts/emulator/test
parentdba8ba5d055dc9219cacabd7bfacb23e2ed0835b (diff)
parent342d12087e62ffaf239a3a42d503d9e5ec64a83f (diff)
downloadotp-af97353a660fee2c97f9c4faf4a32ba04a5face7.tar.gz
otp-af97353a660fee2c97f9c4faf4a32ba04a5face7.tar.bz2
otp-af97353a660fee2c97f9c4faf4a32ba04a5face7.zip
Merge branch 'maint'
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/match_spec_SUITE.erl16
1 files changed, 12 insertions, 4 deletions
diff --git a/erts/emulator/test/match_spec_SUITE.erl b/erts/emulator/test/match_spec_SUITE.erl
index b56b7ce525..bcc46d78ba 100644
--- a/erts/emulator/test/match_spec_SUITE.erl
+++ b/erts/emulator/test/match_spec_SUITE.erl
@@ -213,7 +213,7 @@ test_3(Config) when is_list(Config) ->
otp_9422(doc) -> [];
otp_9422(Config) when is_list(Config) ->
- Laps = 1000,
+ Laps = 10000,
?line Fun1 = fun() -> otp_9422_tracee() end,
?line P1 = spawn_link(?MODULE, loop_runner, [self(), Fun1, Laps]),
io:format("spawned ~p as tracee\n", [P1]),
@@ -230,7 +230,7 @@ otp_9422(Config) when is_list(Config) ->
%%receive after 10*1000 -> ok end,
stop_collect(P1),
- stop_collect(P2),
+ stop_collect(P2, abort),
ok.
otp_9422_tracee() ->
@@ -975,7 +975,9 @@ start_collect(P) ->
P ! {go, self()}.
stop_collect(P) ->
- P ! {done, self()},
+ stop_collect(P, done).
+stop_collect(P, Order) ->
+ P ! {Order, self()},
receive
{gone, P} ->
ok
@@ -1008,7 +1010,13 @@ loop_runner_cont(_Collector, _Fun, Laps, Laps) ->
end;
loop_runner_cont(Collector, Fun, N, Laps) ->
Fun(),
- loop_runner_cont(Collector, Fun, N+1, Laps).
+ receive
+ {abort, Collector} ->
+ io:format("loop_runner ~p aborted after ~p of ~p laps\n", [self(), N+1, Laps]),
+ Collector ! {gone, self()}
+ after 0 ->
+ loop_runner_cont(Collector, Fun, N+1, Laps)
+ end.
f1(X) ->