diff options
author | Lukas Larsson <[email protected]> | 2012-03-15 12:30:52 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2012-03-20 10:34:49 +0100 |
commit | 2676ca6135fbf78fcfce90b2c9a2f9c645756c54 (patch) | |
tree | fde6ef9425c4e6726980ed289758c069a9c7fa0a /lib/kernel/test | |
parent | 3618672c3e4746fada7464b2e31bf7c3ad0b3b88 (diff) | |
download | otp-2676ca6135fbf78fcfce90b2c9a2f9c645756c54.tar.gz otp-2676ca6135fbf78fcfce90b2c9a2f9c645756c54.tar.bz2 otp-2676ca6135fbf78fcfce90b2c9a2f9c645756c54.zip |
Fix reselecting bug on OS X
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.
Diffstat (limited to 'lib/kernel/test')
-rw-r--r-- | lib/kernel/test/sendfile_SUITE.erl | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl index 4056b5d121..03704b0c04 100644 --- a/lib/kernel/test/sendfile_SUITE.erl +++ b/lib/kernel/test/sendfile_SUITE.erl @@ -102,6 +102,8 @@ t_sendfile_many_small(Config) when is_list(Config) -> Filename = proplists:get_value(small_file, Config), FileOpts = proplists:get_value(file_opts, Config, []), + error_logger:add_report_handler(?MODULE,[self()]), + Send = fun(Sock) -> {Size,_} = sendfile_file_info(Filename), N = 10000, @@ -113,7 +115,15 @@ t_sendfile_many_small(Config) when is_list(Config) -> Size*N end, - ok = sendfile_send({127,0,0,1}, Send, 0). + ok = sendfile_send({127,0,0,1}, Send, 0), + + receive + {stolen,Reason} -> + exit(Reason) + after 200 -> + ok + end. + t_sendfile_big_all(Config) when is_list(Config) -> Filename = proplists:get_value(big_file, Config), |