aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_test_lib.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-12-08 11:52:09 +0100
committerHans Nilsson <[email protected]>2015-12-08 11:52:09 +0100
commit5fe8d649b1431d84d559e6c3730de25b54dbde31 (patch)
tree04b30751d0d847378b6cebfdbe84034edf613ff2 /lib/ssh/test/ssh_test_lib.erl
parentdbe8fe945aaf26809b288d33dd100ed83f6984e4 (diff)
parent7061105f5a8458486d43183a8b925c203b7a21fe (diff)
downloadotp-5fe8d649b1431d84d559e6c3730de25b54dbde31.tar.gz
otp-5fe8d649b1431d84d559e6c3730de25b54dbde31.tar.bz2
otp-5fe8d649b1431d84d559e6c3730de25b54dbde31.zip
Merge branch 'hans/ssh/cuddle_tests' into maint
* hans/ssh/cuddle_tests: ssh: add econnaborted as correct tcp disconnect reason in testcase ssh: add check for available ipv6 addr in test case ssh: Add testcase precondition
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r--lib/ssh/test/ssh_test_lib.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index 424afc76fe..ed76f4f795 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -646,3 +646,15 @@ ssh_supports(Alg, SshDefaultAlg_tag) ->
{false,UnSup}
end
end.
+
+%%%----------------------------------------------------------------
+has_inet6_address() ->
+ try
+ [throw(6) || {ok,L} <- [inet:getifaddrs()],
+ {_,L1} <- L,
+ {addr,{_,_,_,_,_,_,_,_}} <- L1]
+ of
+ [] -> false
+ catch
+ throw:6 -> true
+ end.