aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2019-04-15 11:29:25 +0200
committerLukas Larsson <[email protected]>2019-04-18 14:14:42 +0200
commit31457daef972d3a79b7c8f3a1ffde2e1e082595a (patch)
tree57d1324b0f7a0c62fddca7ae50c7ef86d2a7e292
parentbea8399d5d4b54ec2c77d86921885eb9539b00d6 (diff)
downloadotp-31457daef972d3a79b7c8f3a1ffde2e1e082595a.tar.gz
otp-31457daef972d3a79b7c8f3a1ffde2e1e082595a.tar.bz2
otp-31457daef972d3a79b7c8f3a1ffde2e1e082595a.zip
tools: Adjust instrument abort tc to better trigger faults
-rw-r--r--lib/tools/test/instrument_SUITE.erl13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/tools/test/instrument_SUITE.erl b/lib/tools/test/instrument_SUITE.erl
index 33259df58f..f474669836 100644
--- a/lib/tools/test/instrument_SUITE.erl
+++ b/lib/tools/test/instrument_SUITE.erl
@@ -260,13 +260,18 @@ test_format(Options0, Gather, Verify) ->
test_abort(Gather) ->
%% There's no way for us to tell whether this actually aborted or ran to
%% completion, but it might catch a few segfaults.
+ %% This testcase is mostly useful when run in an debug emulator as it needs
+ %% the modified reduction count to trigger the odd trap scenarios
Runner = self(),
Ref = make_ref(),
spawn_opt(fun() ->
- [Gather({Type, SchedId, 1, 1, Ref}) ||
- Type <- erlang:system_info(alloc_util_allocators),
- SchedId <- lists:seq(0, erlang:system_info(schedulers))],
- Runner ! Ref
+ [begin
+ Ref2 = make_ref(),
+ [Gather({Type, SchedId, 1, 1, Ref2}) ||
+ Type <- erlang:system_info(alloc_util_allocators),
+ SchedId <- lists:seq(0, erlang:system_info(schedulers))]
+ end || _ <- lists:seq(1,100)],
+ Runner ! Ref
end, [{priority, max}]),
receive
Ref -> ok