aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/gen_sctp_SUITE.erl18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/kernel/test/gen_sctp_SUITE.erl b/lib/kernel/test/gen_sctp_SUITE.erl
index ceda5b0af6..eb06d4324b 100644
--- a/lib/kernel/test/gen_sctp_SUITE.erl
+++ b/lib/kernel/test/gen_sctp_SUITE.erl
@@ -26,12 +26,12 @@
-export([all/1,init_per_testcase/2,fin_per_testcase/2]).
-export(
[basic/1,
- api_open_close/1,api_listen/1,api_connect_init/1,
+ api_open_close/1,api_listen/1,api_connect_init/1,api_opts/1,
xfer_min/1,xfer_active/1,def_sndrcvinfo/1]).
all(suite) ->
[basic,
- api_open_close,api_listen,api_connect_init,
+ api_open_close,api_listen,api_connect_init,api_opts,
xfer_min,xfer_active,def_sndrcvinfo].
init_per_testcase(_Func, Config) ->
@@ -537,3 +537,17 @@ api_connect_init(Config) when is_list(Config) ->
?line ok = gen_sctp:close(Sa),
?line ok = gen_sctp:close(Sb),
ok.
+
+api_opts(doc) ->
+ "Test socket options";
+api_opts(suite) ->
+ [];
+api_opts(Config) when is_list(Config) ->
+ ?line {ok,S} = gen_sctp:open(0),
+ ?line OSType = os:type(),
+ ?line case {inet:setopts(S, [{linger,{true,2}}]),OSType} of
+ {ok,_} ->
+ ok;
+ {{error,einval},{unix,sunos}} ->
+ ok
+ end.