aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-05-21 15:18:31 +0200
committerMicael Karlberg <[email protected]>2019-05-29 13:47:40 +0200
commit9ccec09217aa3d721501a0634b205d9d87cab914 (patch)
treee2338ff99b8e0e28e84d1484cd90266fe98aa4af /erts/emulator/test
parent2eb1dd7b5ee49401aae3c8db185cd3bf659ea0ab (diff)
downloadotp-9ccec09217aa3d721501a0634b205d9d87cab914.tar.gz
otp-9ccec09217aa3d721501a0634b205d9d87cab914.tar.bz2
otp-9ccec09217aa3d721501a0634b205d9d87cab914.zip
[esock|test] Skip some test cases on old linux(s)
OTP-15822
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/socket_SUITE.erl37
1 files changed, 18 insertions, 19 deletions
diff --git a/erts/emulator/test/socket_SUITE.erl b/erts/emulator/test/socket_SUITE.erl
index 0970739a19..85f2e47812 100644
--- a/erts/emulator/test/socket_SUITE.erl
+++ b/erts/emulator/test/socket_SUITE.erl
@@ -1821,7 +1821,10 @@ api_b_sendto_and_recvfrom_udpL(doc) ->
api_b_sendto_and_recvfrom_udpL(_Config) when is_list(_Config) ->
?TT(?SECS(5)),
tc_try(api_b_sendto_and_recvfrom_udpL,
- fun() -> has_support_unix_domain_socket() end,
+ fun() ->
+ has_support_unix_domain_socket(),
+ unix_domain_socket_host_cond()
+ end,
fun() ->
Send = fun(Sock, Data, Dest) ->
socket:sendto(Sock, Data, Dest)
@@ -1892,7 +1895,10 @@ api_b_sendmsg_and_recvmsg_udpL(doc) ->
api_b_sendmsg_and_recvmsg_udpL(_Config) when is_list(_Config) ->
?TT(?SECS(5)),
tc_try(api_b_sendmsg_and_recvmsg_udpL,
- fun() -> has_support_unix_domain_socket() end,
+ fun() ->
+ has_support_unix_domain_socket(),
+ unix_domain_socket_host_cond()
+ end,
fun() ->
Send = fun(Sock, Data, Dest) ->
%% We need tests for this,
@@ -19813,21 +19819,6 @@ sock_open(Domain, Type, Proto) ->
end.
-sock_bind(Sock, SockAddr) ->
- try socket:bind(Sock, SockAddr) of
- {ok, Port} ->
- Port;
- {error, Reason} ->
- i("sock_bind -> error: "
- "~n SockAddr: ~p"
- "~n Reason: ~p", [SockAddr, Reason]),
- ?FAIL({bind, Reason})
- catch
- C:E:S ->
- i("sock_bind -> failed: ~p, ~p, ~p", [C, E, S]),
- ?FAIL({bind, C, E, S})
- end.
-
sock_connect(Sock, SockAddr) ->
try socket:connect(Sock, SockAddr) of
ok ->
@@ -20007,16 +19998,24 @@ unlink_path(_, _, _) ->
%% Here are all the *general* test vase condition functions.
+unix_domain_socket_host_cond() ->
+ unix_domain_socket_host_cond(os:type(), os:version()).
+
+unix_domain_socket_host_cond({unix, linux}, {M, _, _}) when (M < 3) ->
+ skip("TC may not work on this version");
+unix_domain_socket_host_cond(_, _) ->
+ ok.
+
has_support_unix_domain_socket() ->
case os:type() of
{win32, _} ->
- {skip, "Not supported"};
+ skip("Not supported");
_ ->
case socket:supports(local) of
true ->
ok;
false ->
- {skip, "Not supported"}
+ skip("Not supported")
end
end.