aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_basic_SUITE.erl
diff options
context:
space:
mode:
authorPéter Dimitrov <[email protected]>2019-06-19 17:08:58 +0200
committerPéter Dimitrov <[email protected]>2019-06-26 14:03:01 +0200
commitadba2f830a495f48e24f8e1fd1bf5c945a3cea05 (patch)
tree05eafec26da41842a7f6db43941177a3c438ee5d /lib/ssl/test/ssl_basic_SUITE.erl
parent4319a7f8bc93388ec540e954eb9bb73ea1eec4ef (diff)
downloadotp-adba2f830a495f48e24f8e1fd1bf5c945a3cea05.tar.gz
otp-adba2f830a495f48e24f8e1fd1bf5c945a3cea05.tar.bz2
otp-adba2f830a495f48e24f8e1fd1bf5c945a3cea05.zip
ssl: Update ssl_test_lib
On some configurations the inet:peername/1 and inet:getaddr/2 functions return different loopback addresses, leading to testcase failures in the ssl_basic_SUITE (peername, sockname). This commit updates the node_to_hostip and check_result functions to tolerate different loopback addresses.
Diffstat (limited to 'lib/ssl/test/ssl_basic_SUITE.erl')
-rw-r--r--lib/ssl/test/ssl_basic_SUITE.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl
index 4f6ea6c886..2d5d488ece 100644
--- a/lib/ssl/test/ssl_basic_SUITE.erl
+++ b/lib/ssl/test/ssl_basic_SUITE.erl
@@ -1289,14 +1289,14 @@ peername(Config) when is_list(Config) ->
{options, [{port, 0} | ClientOpts]}]),
ClientPort = ssl_test_lib:inet_port(Client),
- ServerIp = ssl_test_lib:node_to_hostip(ServerNode),
- ClientIp = ssl_test_lib:node_to_hostip(ClientNode),
+ ServerIp = ssl_test_lib:node_to_hostip(ServerNode, server),
+ ClientIp = ssl_test_lib:node_to_hostip(ClientNode, client),
ServerMsg = {ok, {ClientIp, ClientPort}},
ClientMsg = {ok, {ServerIp, Port}},
-
+
ct:log("Testcase ~p, Client ~p Server ~p ~n",
[self(), Client, Server]),
-
+
ssl_test_lib:check_result(Server, ServerMsg, Client, ClientMsg),
ssl_test_lib:close(Server),
@@ -1399,10 +1399,10 @@ sockname(Config) when is_list(Config) ->
%% so we can only get a ClientIP, ServerIP will always be 0.0.0.0
{0,0,0,0};
_ ->
- ssl_test_lib:node_to_hostip(ServerNode)
+ ssl_test_lib:node_to_hostip(ServerNode, server)
end,
- ClientIp = ssl_test_lib:node_to_hostip(ClientNode),
+ ClientIp = ssl_test_lib:node_to_hostip(ClientNode, client),
ServerMsg = {ok, {ServerIp, Port}},
ClientMsg = {ok, {ClientIp, ClientPort}},