aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/sendfile_SUITE.erl
AgeCommit message (Collapse)Author
2018-11-28erts: Fix unexpected inet_reply message from failing file:sendfileSverker Eriksson
A failing file:sendfile call would often send a message {inet_reply, Port, {error, Reason}} that would pollute the mailbox of the calling process. TCP_REQ_SENDFILE has its own reply messages format {sendfile, _, _} and does not expect an inet_reply message. Solution: Suppress inet_reply error message if TCP_ADDF_SENDFILE is set.
2018-11-28erts: Fix bug in sendfile for active socketSverker Eriksson
driver_select() was called after port had been killed by tcp_inet_sendfile() calling tcp_send_error().
2017-11-30Make file:sendfile/5 follow its documented error behaviorJohn Högberg
2017-11-30Stop testing use_threads in sendfile_SUITEJohn Högberg
The option no longer does anything at all.
2017-11-30Account for new behavior in tests that touch prim_fileJohn Högberg
This also hides the module behind ?PRIM_FILE to make testing new implementations less painful.
2017-06-14Update copyright yearHans Nilsson
2017-06-07erts: Fix sendfile closeduring scenario on sunosLukas Larsson
On Solaris, giving a too long sfv_len results in an EINVAL error, but data is still transmitted and len is correctly. So we translate this to a success with that amount of data sent. This may hide some other errors that causes EINVAL, but it is the best we can do for now.
2016-03-15update copyright-yearHenrik Nord
2016-03-09Eliminate use of ?config() macroBjörn Gustavsson
?config is ugly and not recommended. Use proplists:get_value/2 instead.
2015-06-18Change license text to APLv2Bruce Yinhe
2014-04-10kernel: Skip sendfile tests that force async threadsLukas Larsson
The tests have to be skipped when the emulator running the tests does not have any async threads.
2014-01-28Merge branch 'lukas/erts/sendfile_no_async_pool/OTP-11639'Lukas Larsson
* lukas/erts/sendfile_no_async_pool/OTP-11639: erts/kernel: sendfile no longer uses async threads
2014-01-27erts: fix bug when using passive mode and sendfileLukas Larsson
The bug incorrectly issued driver_select when un-ignoring an fd for a socket in passive mode, which caused an incorrect error tuple to be returned when the remote end closed the connection.
2014-01-27erts/kernel: sendfile no longer uses async threadsLukas Larsson
This has been done because a slow client attack is possible if the async thread pool is used. The scenario is: Client does a request for a file and then slowly receives the file one byte at a time. This will eventually fill the async thread pool with blocking sendfile operations and thus starving the vm of all file operations. If you still want to use the async threads pool for sendfile an option to enable it has been introduced.
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-20Fix reselecting bug on OS XLukas Larsson
Since stop_select is called at an arbitrary point in the future it would sometime not be alled before the tcp driver started selecting on the fd. So now ERL_DRV_USE_NO_CALLBACK is used so that the stop_select call is never made. This seems to only have happened OS X.
2012-03-20Fix bug when sending long files using selectLukas Larsson
The return value from efile_sendfile was not consistent inbetween platforms. The API should now be working as it was intended. OTP-9994
2012-03-20Add test case for sending multiple small files on same connectionLukas Larsson
2012-03-20Extend timeout for windowsLukas Larsson
2012-03-15Skip sendfile suite if solaris 8Lukas Larsson
2011-12-08Fix cleanup when sendfile process crashesLukas Larsson
When sendfile crashes during a send there should be no error_logger printouts about stolen fds.
2011-12-07Return {error,closed} from sendfile if closedLukas Larsson
If the socket is closed by the remote end, sendfile now returns {error,closed}.
2011-12-05Clarify some code commentsLukas Larsson
Thanks Tuncer Ayaz
2011-12-05Make solaris use sendfilevLukas Larsson
sendfilev is a richer API which allows us to do non blocking TCP on solaris. The normal sendfile API seems to have some issue with non blocking sockets and the return value of sendfile.
2011-12-02Add sendfile server printoutsLukas Larsson
2011-12-02Skip recv/send during tests for fallback platformsLukas Larsson
2011-12-02Remove header/trailer supportLukas Larsson
Since the API for headers/trailers seem to be very awkward to work with when using non-blocking io the feature is dropped for now. See unix_efile.c for more details.
2011-12-02Move sendfile api to file moduleLukas Larsson
Since sendfile could in theory be used to send to any type of file descriptor in *nix, it is a better fit to have it in file.