diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-02 01:47:41 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-02 01:47:41 +0000 |
commit | d80c73d60f9ac867c79b28027236a3dc5668e411 (patch) | |
tree | 4a17f9a4009fe9b0cb778ffbf167647462ca1068 /test/socket | |
parent | 618b3ca0c1ced365f42bcace6dfb83378411ac6a (diff) | |
download | ruby-d80c73d60f9ac867c79b28027236a3dc5668e411.tar.gz |
test/socket/test_nonblock.rb: new test for sendmsg_nonblock
sendmsg_nonblock was not tested on any of my systems due to the
common 64K limit. I also don't believe UDP sockets are at all
a useful candidate for sendmsg_nonblock testing since they
should never block on sending.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket')
-rw-r--r-- | test/socket/test_nonblock.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/socket/test_nonblock.rb b/test/socket/test_nonblock.rb index 0109d19636..4b1f209907 100644 --- a/test/socket/test_nonblock.rb +++ b/test/socket/test_nonblock.rb @@ -275,6 +275,19 @@ class TestSocketNonblock < Test::Unit::TestCase } end + def test_sendmsg_nonblock_seqpacket + if defined?(UNIXSocket) && defined?(Socket::SOCK_SEQPACKET) + buf = '*' * 10000 + UNIXSocket.pair(:SEQPACKET) do |s1, s2| + assert_raises(IO::WaitWritable) do + loop { s1.sendmsg_nonblock(buf) } + end + end + else + skip "UNIXSocket.pair(:SEQPACKET) not implemented on this platform" + end + end + def test_recvmsg_nonblock_error udp_pair {|s1, s2| begin |