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
This commit is contained in:
parent
cb1affb478
commit
18e7743817
@ -1,3 +1,7 @@
|
|||||||
|
Tue Jun 2 10:46:36 2015 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
|
* test/socket/test_nonblock.rb: new test for sendmsg_nonblock
|
||||||
|
|
||||||
Tue Jun 2 09:04:14 2015 Eric Wong <e@80x24.org>
|
Tue Jun 2 09:04:14 2015 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
* lib/benchmark.rb: just use Process::CLOCK_MONOTONIC
|
* lib/benchmark.rb: just use Process::CLOCK_MONOTONIC
|
||||||
|
@ -275,6 +275,19 @@ class TestSocketNonblock < Test::Unit::TestCase
|
|||||||
}
|
}
|
||||||
end
|
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
|
def test_recvmsg_nonblock_error
|
||||||
udp_pair {|s1, s2|
|
udp_pair {|s1, s2|
|
||||||
begin
|
begin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user