Use omit instead of skip: test/socket/**/*.rb
This commit is contained in:
parent
bab8623343
commit
55cdb8b013
@ -588,7 +588,7 @@ class TestSocketAddrinfo < Test::Unit::TestCase
|
|||||||
assert(ai.ipv4? || ai.send(meth), "ai=#{addr_exp}; ai.ipv4? || .#{meth}")
|
assert(ai.ipv4? || ai.send(meth), "ai=#{addr_exp}; ai.ipv4? || .#{meth}")
|
||||||
rescue Test::Unit::AssertionFailedError
|
rescue Test::Unit::AssertionFailedError
|
||||||
if /aix/ =~ RUBY_PLATFORM
|
if /aix/ =~ RUBY_PLATFORM
|
||||||
skip "Known bug in IN6_IS_ADDR_V4COMPAT and IN6_IS_ADDR_V4MAPPED on AIX"
|
omit "Known bug in IN6_IS_ADDR_V4COMPAT and IN6_IS_ADDR_V4MAPPED on AIX"
|
||||||
end
|
end
|
||||||
raise $!
|
raise $!
|
||||||
end
|
end
|
||||||
|
@ -35,7 +35,7 @@ class TestSocket_BasicSocket < Test::Unit::TestCase
|
|||||||
rescue Test::Unit::AssertionFailedError
|
rescue Test::Unit::AssertionFailedError
|
||||||
s.close
|
s.close
|
||||||
if /aix/ =~ RUBY_PLATFORM
|
if /aix/ =~ RUBY_PLATFORM
|
||||||
skip "Known bug in getsockopt(2) on AIX"
|
omit "Known bug in getsockopt(2) on AIX"
|
||||||
end
|
end
|
||||||
raise $!
|
raise $!
|
||||||
end
|
end
|
||||||
|
@ -279,7 +279,7 @@ class TestSocketNonblock < Test::Unit::TestCase
|
|||||||
s1.sendmsg_nonblock("a" * 100000)
|
s1.sendmsg_nonblock("a" * 100000)
|
||||||
}
|
}
|
||||||
rescue NotImplementedError, Errno::ENOSYS
|
rescue NotImplementedError, Errno::ENOSYS
|
||||||
skip "sendmsg not implemented on this platform: #{$!}"
|
omit "sendmsg not implemented on this platform: #{$!}"
|
||||||
rescue Errno::EMSGSIZE
|
rescue Errno::EMSGSIZE
|
||||||
# UDP has 64K limit (if no Jumbograms). No problem.
|
# UDP has 64K limit (if no Jumbograms). No problem.
|
||||||
rescue Errno::EWOULDBLOCK
|
rescue Errno::EWOULDBLOCK
|
||||||
@ -308,7 +308,7 @@ class TestSocketNonblock < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue NotImplementedError, Errno::ENOSYS, Errno::EPROTONOSUPPORT
|
rescue NotImplementedError, Errno::ENOSYS, Errno::EPROTONOSUPPORT
|
||||||
skip "UNIXSocket.pair(:SEQPACKET) not implemented on this platform: #{$!}"
|
omit "UNIXSocket.pair(:SEQPACKET) not implemented on this platform: #{$!}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_sendmsg_nonblock_no_exception
|
def test_sendmsg_nonblock_no_exception
|
||||||
@ -329,7 +329,7 @@ class TestSocketNonblock < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
rescue NotImplementedError, Errno::ENOSYS, Errno::EPROTONOSUPPORT
|
rescue NotImplementedError, Errno::ENOSYS, Errno::EPROTONOSUPPORT
|
||||||
skip "UNIXSocket.pair(:SEQPACKET) not implemented on this platform: #{$!}"
|
omit "UNIXSocket.pair(:SEQPACKET) not implemented on this platform: #{$!}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -338,7 +338,7 @@ class TestSocketNonblock < Test::Unit::TestCase
|
|||||||
begin
|
begin
|
||||||
s1.recvmsg_nonblock(4096)
|
s1.recvmsg_nonblock(4096)
|
||||||
rescue NotImplementedError
|
rescue NotImplementedError
|
||||||
skip "recvmsg not implemented on this platform."
|
omit "recvmsg not implemented on this platform."
|
||||||
rescue Errno::EWOULDBLOCK
|
rescue Errno::EWOULDBLOCK
|
||||||
assert_kind_of(IO::WaitReadable, $!)
|
assert_kind_of(IO::WaitReadable, $!)
|
||||||
end
|
end
|
||||||
|
@ -343,7 +343,7 @@ class TestSocket < Test::Unit::TestCase
|
|||||||
begin
|
begin
|
||||||
ifaddrs = Socket.getifaddrs
|
ifaddrs = Socket.getifaddrs
|
||||||
rescue NotImplementedError
|
rescue NotImplementedError
|
||||||
skip "Socket.getifaddrs not implemented"
|
omit "Socket.getifaddrs not implemented"
|
||||||
end
|
end
|
||||||
|
|
||||||
ifconfig = nil
|
ifconfig = nil
|
||||||
@ -437,10 +437,10 @@ class TestSocket < Test::Unit::TestCase
|
|||||||
}
|
}
|
||||||
rescue NotImplementedError, Errno::ENOSYS
|
rescue NotImplementedError, Errno::ENOSYS
|
||||||
skipped = true
|
skipped = true
|
||||||
skip "need sendmsg and recvmsg: #{$!}"
|
omit "need sendmsg and recvmsg: #{$!}"
|
||||||
rescue RuntimeError
|
rescue RuntimeError
|
||||||
skipped = true
|
skipped = true
|
||||||
skip "UDP server is no response: #{$!}"
|
omit "UDP server is no response: #{$!}"
|
||||||
ensure
|
ensure
|
||||||
if th
|
if th
|
||||||
if skipped
|
if skipped
|
||||||
|
@ -34,7 +34,7 @@ class TestSocketOption < Test::Unit::TestCase
|
|||||||
}
|
}
|
||||||
rescue TypeError
|
rescue TypeError
|
||||||
if /aix/ =~ RUBY_PLATFORM
|
if /aix/ =~ RUBY_PLATFORM
|
||||||
skip "Known bug in getsockopt(2) on AIX"
|
omit "Known bug in getsockopt(2) on AIX"
|
||||||
end
|
end
|
||||||
raise $!
|
raise $!
|
||||||
end
|
end
|
||||||
|
@ -25,7 +25,7 @@ class TestSocket_UDPSocket < Test::Unit::TestCase
|
|||||||
assert_match(/AF_INET6\b/, sock.inspect)
|
assert_match(/AF_INET6\b/, sock.inspect)
|
||||||
}
|
}
|
||||||
rescue Errno::EAFNOSUPPORT
|
rescue Errno::EAFNOSUPPORT
|
||||||
skip 'AF_INET6 not supported by kernel'
|
omit 'AF_INET6 not supported by kernel'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user