aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2018-10-17 07:41:07 +0200
committerJohn Högberg <[email protected]>2018-10-17 07:48:46 +0200
commit2c9cfa8663df4b73afb6d9a6e5a40d6887cdc744 (patch)
treed741291d864d3f565a1cf0fd9996a3c7fa98615f /lib/kernel/test
parentcedccd3e8d42189b91d46c2637b9ce39675318f4 (diff)
parent917eeea53273f00489715a94a90cc0c2bb129b74 (diff)
downloadotp-2c9cfa8663df4b73afb6d9a6e5a40d6887cdc744.tar.gz
otp-2c9cfa8663df4b73afb6d9a6e5a40d6887cdc744.tar.bz2
otp-2c9cfa8663df4b73afb6d9a6e5a40d6887cdc744.zip
Merge branch 'igor/tcp-nopush-ERL-698/OTP-15357' into maint
* igor/tcp-nopush-ERL-698/OTP-15357: "cork" tcp socket around file:sendfile Add nopush TCP socket option
Diffstat (limited to 'lib/kernel/test')
-rw-r--r--lib/kernel/test/inet_sockopt_SUITE.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/kernel/test/inet_sockopt_SUITE.erl b/lib/kernel/test/inet_sockopt_SUITE.erl
index ada9c2689c..27ff74e309 100644
--- a/lib/kernel/test/inet_sockopt_SUITE.erl
+++ b/lib/kernel/test/inet_sockopt_SUITE.erl
@@ -110,9 +110,14 @@ simple(Config) when is_list(Config) ->
{S1,S2} = create_socketpair(Opt, Opt),
{ok,Opt} = inet:getopts(S1,OptTags),
{ok,Opt} = inet:getopts(S2,OptTags),
- COpt = [{X,case X of nodelay -> false;_ -> Y end} || {X,Y} <- Opt],
+ NoPushOpt = case os:type() of
+ {unix, Osname} when Osname =:= linux; Osname =:= freebsd -> {nopush, true};
+ {_,_} -> {nopush, false}
+ end,
+ COpt = [{X,case X of nodelay -> false;_ -> Y end} || {X,Y} <- [NoPushOpt|Opt]],
+ COptTags = [X || {X,_} <- COpt],
inet:setopts(S1,COpt),
- {ok,COpt} = inet:getopts(S1,OptTags),
+ {ok,COpt} = inet:getopts(S1,COptTags),
{ok,Opt} = inet:getopts(S2,OptTags),
gen_tcp:close(S1),
gen_tcp:close(S2),