diff options
author | Björn-Egil Dahlberg <[email protected]> | 2013-05-03 18:59:54 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2013-05-03 18:59:54 +0200 |
commit | dd88004c973eb582122e09e6cca1a4e7b3d4e4d8 (patch) | |
tree | e43397d8807e753792787e7fd5771e491d27396e /lib/tools/test/eprof_SUITE_data | |
parent | fb4ef8fb27a0766e5dddf6cd35be50c4d35c05f4 (diff) | |
download | otp-dd88004c973eb582122e09e6cca1a4e7b3d4e4d8.tar.gz otp-dd88004c973eb582122e09e6cca1a4e7b3d4e4d8.tar.bz2 otp-dd88004c973eb582122e09e6cca1a4e7b3d4e4d8.zip |
tools: Add testcase to eprof_SUITE
Test disabling of set_on_spawn
Diffstat (limited to 'lib/tools/test/eprof_SUITE_data')
-rw-r--r-- | lib/tools/test/eprof_SUITE_data/eprof_test.erl | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/tools/test/eprof_SUITE_data/eprof_test.erl b/lib/tools/test/eprof_SUITE_data/eprof_test.erl index 33c428e893..2d9e4c2945 100644 --- a/lib/tools/test/eprof_SUITE_data/eprof_test.erl +++ b/lib/tools/test/eprof_SUITE_data/eprof_test.erl @@ -1,5 +1,5 @@ -module(eprof_test). --export([go/1]). +-export([go/1, do/1]). go(N) -> 0 = dec(N), @@ -7,3 +7,16 @@ go(N) -> dec(0) -> 0; dec(N) -> dec(N - 1). + + + +load(N, Pid) -> + _ = lists:sort(lists:reverse(lists:seq(1, N))), + Pid ! {self(), ok}. + + +do(N) -> + Me = self(), + Pid = spawn_link(fun() -> load(N, Me) end), + ok = go(N), + receive {Pid, ok} -> ok end. |