aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-06-01 15:46:46 +0200
committerLukas Larsson <[email protected]>2016-06-14 10:09:37 +0200
commit7d0c75c91cbe903868efc51ffa6c721fe29447a2 (patch)
treed5cbcf54dddfdf329745faca7007c73ed7a35e42 /lib
parentb847766d2c4ab26ba7c720cc7b46fefd2efaf1e0 (diff)
downloadotp-7d0c75c91cbe903868efc51ffa6c721fe29447a2.tar.gz
otp-7d0c75c91cbe903868efc51ffa6c721fe29447a2.tar.bz2
otp-7d0c75c91cbe903868efc51ffa6c721fe29447a2.zip
ssl: Fix use_interface dist_SSL test
Doing inet:port will cause an port_control to be sent to the port, and not all ports in the vm can handle having arbitrary data sent to them.
Diffstat (limited to 'lib')
-rw-r--r--lib/ssl/test/ssl_dist_SUITE.erl10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/ssl/test/ssl_dist_SUITE.erl b/lib/ssl/test/ssl_dist_SUITE.erl
index e7cbfa63f4..2cf74ba37f 100644
--- a/lib/ssl/test/ssl_dist_SUITE.erl
+++ b/lib/ssl/test/ssl_dist_SUITE.erl
@@ -410,7 +410,7 @@ use_interface(Config) when is_list(Config) ->
NH1,
fun() ->
[inet:sockname(P) ||
- P <- erlang:ports(),
+ P <- inet_ports(),
{ok, Port} =:= (catch inet:port(P))]
end),
%% And check that it's actually listening on localhost.
@@ -453,9 +453,11 @@ try_setting_priority(TestFun, Config) ->
get_socket_priorities() ->
[Priority ||
{ok,[{priority,Priority}]} <-
- [inet:getopts(Port, [priority]) ||
- Port <- erlang:ports(),
- element(2, erlang:port_info(Port, name)) =:= "tcp_inet"]].
+ [inet:getopts(Port, [priority]) || Port <- inet_ports()]].
+
+inet_ports() ->
+ [Port || Port <- erlang:ports(),
+ element(2, erlang:port_info(Port, name)) =:= "tcp_inet"].
%%
%% test_server side api