4
%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
4
%% Copyright Ericsson AB 1998-2011. All Rights Reserved.
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
8
8
%% compliance with the License. You should have received a copy of the
9
9
%% Erlang Public License along with this software. If not, it can be
10
10
%% retrieved online at http://www.erlang.org/.
12
12
%% Software distributed under the License is distributed on an "AS IS"
13
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
%% the License for the specific language governing rights and limitations
15
15
%% under the License.
19
19
-module(bif_SUITE).
20
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
21
init_per_group/2,end_per_group/2]).
22
-export([spawn_tests/1,
23
24
spawn1/1, spawn2/1, spawn3/1, spawn4/1,
26
27
spawn_link1/1, spawn_link2/1, spawn_link3/1, spawn_link4/1,
29
30
spawn_opt2/1, spawn_opt3/1, spawn_opt4/1, spawn_opt5/1,
36
-export([init_per_testcase/2, fin_per_testcase/2]).
37
-export([init_per_testcase/2, end_per_testcase/2]).
38
-include("test_server.hrl").
39
-include_lib("test_server/include/test_server.hrl").
40
41
% Default timetrap timeout (set in init_per_testcase).
41
42
-define(default_timeout, ?t:minutes(1)).
43
44
init_per_testcase(_Case, Config) ->
44
45
?line Dog = ?t:timetrap(?default_timeout),
45
46
[{watchdog, Dog} | Config].
46
fin_per_testcase(_Case, Config) ->
47
end_per_testcase(_Case, Config) ->
47
48
Dog = ?config(watchdog, Config),
48
49
test_server:timetrap_cancel(Dog),
52
[spawn_tests, spawn_link_tests, spawn_opt_tests, spawn_failures, wilderness].
54
spawn_tests(doc) -> ["Test spawn"];
56
[spawn1, spawn2, spawn3, spawn4].
58
spawn_link_tests(doc) -> ["Test spawn_link"];
59
spawn_link_tests(suite) ->
60
[spawn_link1, spawn_link2, spawn_link3, spawn_link4].
62
spawn_opt_tests(doc) -> ["Test spawn_opt"];
63
spawn_opt_tests(suite) ->
64
[spawn_opt2, spawn_opt3, spawn_opt4, spawn_opt5].
52
suite() -> [{ct_hooks,[ts_install_cth]}].
55
[{group, spawn_tests}, {group, spawn_link_tests},
56
{group, spawn_opt_tests}, spawn_failures, wilderness].
59
[{spawn_tests, [], [spawn1, spawn2, spawn3, spawn4]},
60
{spawn_link_tests, [],
61
[spawn_link1, spawn_link2, spawn_link3, spawn_link4]},
63
[spawn_opt2, spawn_opt3, spawn_opt4, spawn_opt5]}].
65
init_per_suite(Config) ->
68
end_per_suite(_Config) ->
71
init_per_group(_GroupName, Config) ->
74
end_per_group(_GroupName, Config) ->
66
78
spawn1(doc) -> ["Test spawn/1"];
69
spawn1(Config) when list(Config) ->
81
spawn1(Config) when is_list(Config) ->
70
82
?line Node = node(),
71
83
?line Parent = self(),
72
84
?line {_, _, FA, _} = fetch_proc_vals(self()),
275
287
spawn_opt3(doc) -> ["Test spawn_opt/3"];
276
288
spawn_opt3(suite) ->
278
spawn_opt3(Config) when list(Config) ->
290
spawn_opt3(Config) when is_list(Config) ->
279
291
?line {ok, Node} = start_node(spawn_opt3),
280
292
?line Parent = self(),
281
293
?line {_, _, FA, _} = fetch_proc_vals(self()),
352
364
spawn_opt5(doc) -> ["Test spawn_opt/5"];
353
365
spawn_opt5(suite) ->
355
spawn_opt5(Config) when list(Config) ->
367
spawn_opt5(Config) when is_list(Config) ->
356
368
?line {ok, Node} = start_node(spawn_opt5),
357
369
?line Parent = self(),
358
370
?line {_, _, FA, _} = fetch_proc_vals(self()),
556
568
"wilderness of the heap are interpreted correct by the emulator "];
557
569
wilderness(suite) ->
559
wilderness(Config) when list(Config) ->
571
wilderness(Config) when is_list(Config) ->
560
572
?line Dog = ?t:timetrap(?default_timeout),
561
573
?line OKParams = {512, 8},
562
574
?line Alloc = erlang:system_info(allocator),