aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_util.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-09-05 17:50:07 +0200
committerIngela Anderton Andin <[email protected]>2016-09-10 13:48:56 +0200
commit736ce20a34ebe66fc2adc97e1f991de3f825e6e6 (patch)
tree6a289eff4df5fc6d8430330de1586a34a33a8375 /lib/diameter/test/diameter_util.erl
parent93369eec652aa136c57fecc52182fb02449d69e6 (diff)
downloadotp-736ce20a34ebe66fc2adc97e1f991de3f825e6e6.tar.gz
otp-736ce20a34ebe66fc2adc97e1f991de3f825e6e6.tar.bz2
otp-736ce20a34ebe66fc2adc97e1f991de3f825e6e6.zip
diameter: Do not test SCTP on sparc-sun-solaris2.10
The SCPT stack has a different behavior in solaris2.10 then in later versions and linux. Diameter implementation does not support this behavior.
Diffstat (limited to 'lib/diameter/test/diameter_util.erl')
-rw-r--r--lib/diameter/test/diameter_util.erl22
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl
index 37fcbbc267..cca28dd23c 100644
--- a/lib/diameter/test/diameter_util.erl
+++ b/lib/diameter/test/diameter_util.erl
@@ -195,13 +195,21 @@ unique_string() ->
%% have_sctp/0
have_sctp() ->
- case gen_sctp:open() of
- {ok, Sock} ->
- gen_sctp:close(Sock),
- true;
- {error, E} when E == eprotonosupport;
- E == esocktnosupport -> %% fail on any other reason
- false
+ case erlang:system_info(system_architecture) of
+ %% We do not support the sctp version present in solaris
+ %% version "sparc-sun-solaris2.10", that behaves differently
+ %% from later versions and linux
+ "sparc-sun-solaris2.10" ->
+ false;
+ _->
+ case gen_sctp:open() of
+ {ok, Sock} ->
+ gen_sctp:close(Sock),
+ true;
+ {error, E} when E == eprotonosupport;
+ E == esocktnosupport -> %% fail on any other reason
+ false
+ end
end.
%% ---------------------------------------------------------------------------