summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicael Karlberg <bmk@erlang.org>2020-06-09 15:25:40 +0200
committerMicael Karlberg <bmk@erlang.org>2020-06-09 15:25:40 +0200
commit169f84e42be0092075d6a2641fa01f7dac52cf54 (patch)
treeba0b84a24822bb388c9754cbee8164ba8112b182
parent7a8d04dbcb388a5d837a213ad249c1b96e19e998 (diff)
downloaderlang-169f84e42be0092075d6a2641fa01f7dac52cf54.tar.gz
[kernel|esock|test] Adjust hoplimit test case(s)
The two hoplimit test cases, needs to be skip'ed on Montavista (atleast on one very old version).
-rw-r--r--lib/kernel/test/socket_SUITE.erl28
1 files changed, 26 insertions, 2 deletions
diff --git a/lib/kernel/test/socket_SUITE.erl b/lib/kernel/test/socket_SUITE.erl
index 7dd9b04662..ab96be599d 100644
--- a/lib/kernel/test/socket_SUITE.erl
+++ b/lib/kernel/test/socket_SUITE.erl
@@ -21502,7 +21502,8 @@ api_opt_ipv6_hoplimit_udp6(_Config) when is_list(_Config) ->
fun() ->
has_support_ipv6(),
has_support_ipv6_hoplimit_or_recvhoplimit(),
- is_good_enough_darwin({9,8,0})
+ is_good_enough_darwin({9,8,0}),
+ is_good_enough_montavista("4.0.1")
end,
fun() ->
%% Begin by choosing which of the options we shall use
@@ -22163,7 +22164,8 @@ api_opt_ipv6_mopts_udp6(_Config) when is_list(_Config) ->
%% The problem here is hoplimit on darwin 9.8.0,
%% but I can't be bothered to adjust the test case,
%% just skip on that machine (there is only one)...
- is_good_enough_darwin({9,8,0})
+ is_good_enough_darwin({9,8,0}),
+ is_good_enough_montavista("4.0.1")
end,
fun() ->
%% If we get this far, we *know* that at least one of the
@@ -42990,6 +42992,28 @@ is_good_enough_linux(CondVsn) ->
is_good_enough_darwin(CondVsn) ->
is_good_enough_platform(unix, darwin, CondVsn).
+is_good_enough_montavista(_Vsn) ->
+ %% We have *one* old M, which have kernel version 2.6.10.
+ %% So if its that kernel version, we only need to check
+ %% if its M (no need to figure out the version of M).
+ case os:type() of
+ {unix, linux} ->
+ case os:version() of
+ {2,6,10} ->
+ case string:trim(os:cmd("cat /etc/issue")) of
+ "MontaVista" ++ _ = V -> % Stone age MontaVista => Skip
+ skip(V);
+ _ ->
+ ok
+ end;
+ _ ->
+ ok
+ end;
+ _ ->
+ ok
+ end.
+
+
is_good_enough_platform(Family, Name, CondVsn) ->
case os:type() of
{Family, Name} ->