aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/sendfile_SUITE.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl
index 6cf695adfd..5d77305e37 100644
--- a/lib/kernel/test/sendfile_SUITE.erl
+++ b/lib/kernel/test/sendfile_SUITE.erl
@@ -27,6 +27,7 @@
all() ->
[t_sendfile_small
,t_sendfile_big
+ ,t_sendfile_many_small
,t_sendfile_partial
,t_sendfile_offset
,t_sendfile_sendafter
@@ -96,6 +97,23 @@ t_sendfile_small(Config) when is_list(Config) ->
ok = sendfile_send(Send).
+t_sendfile_many_small(Config) when is_list(Config) ->
+ Filename = proplists:get_value(small_file, Config),
+ FileOpts = proplists:get_value(file_opts, Config, []),
+
+ Send = fun(Sock) ->
+ {Size,_} = sendfile_file_info(Filename),
+ N = 10000,
+ {ok,D} = file:open(Filename,[read|FileOpts]),
+ [begin
+ {ok,Size} = file:sendfile(D,Sock,0,0,[])
+ end || _I <- lists:seq(1,N)],
+ file:close(D),
+ Size*N
+ end,
+
+ ok = sendfile_send({127,0,0,1}, Send, 0).
+
t_sendfile_big(Config) when is_list(Config) ->
Filename = proplists:get_value(big_file, Config),