aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2013-02-21 14:09:53 +0100
committerLukas Larsson <[email protected]>2013-02-21 14:09:53 +0100
commit9dcbf5234b7e6dcb9adbaf0db062a5ac74ba6818 (patch)
tree3467f6bc10496e60c3e11583ea284e6c81ea18db /erts/emulator
parentb0db6381f30029f6dba03290a02129dde672b88a (diff)
parent0b42c6a7be1ba13bec8a75af27f3d4883fe0847f (diff)
downloadotp-9dcbf5234b7e6dcb9adbaf0db062a5ac74ba6818.tar.gz
otp-9dcbf5234b7e6dcb9adbaf0db062a5ac74ba6818.tar.bz2
otp-9dcbf5234b7e6dcb9adbaf0db062a5ac74ba6818.zip
Merge branch 'lukas/erts/efile_iter_max_files'
* lukas/erts/efile_iter_max_files: Move test to slave node with limited ports
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/test/efile_SUITE.erl20
1 files changed, 14 insertions, 6 deletions
diff --git a/erts/emulator/test/efile_SUITE.erl b/erts/emulator/test/efile_SUITE.erl
index 9ac004200e..ddf23f90fd 100644
--- a/erts/emulator/test/efile_SUITE.erl
+++ b/erts/emulator/test/efile_SUITE.erl
@@ -21,6 +21,8 @@
init_per_group/2,end_per_group/2]).
-export([iter_max_files/1]).
+-export([do_iter_max_files/2]).
+
-include_lib("test_server/include/test_server.hrl").
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -51,11 +53,17 @@ end_per_group(_GroupName, Config) ->
iter_max_files(suite) -> [];
iter_max_files(Config) when is_list(Config) ->
- ?line DataDir = ?config(data_dir,Config),
- ?line TestFile = filename:join(DataDir, "existing_file"),
- ?line L = do_iter_max_files(10, TestFile),
- ?line io:format("Number of files opened in each test:~n~w\n", [L]),
- ?line all_equal(L),
+ DataDir = ?config(data_dir,Config),
+ TestFile = filename:join(DataDir, "existing_file"),
+ N = 10,
+ %% Run on a different node in order to set the max ports
+ Dir = filename:dirname(code:which(?MODULE)),
+ {ok,Node} = test_server:start_node(test_iter_max_files,slave,
+ [{args,"+Q 1524 -pa " ++ Dir}]),
+ L = rpc:call(Node,?MODULE,do_iter_max_files,[N, TestFile]),
+ test_server:stop_node(Node),
+ io:format("Number of files opened in each test:~n~w\n", [L]),
+ all_equal(L),
Head = hd(L),
if Head >= 2 -> ok;
true -> ?line test_server:fail(too_few_files)
@@ -91,6 +99,6 @@ open_files(Name) ->
{ok, Fd} ->
[Fd| open_files(Name)];
{error, Reason} ->
- io:format("Error reason: ~p", [Reason]),
+% io:format("Error reason: ~p", [Reason]),
[]
end.