Skip to content

Commit

Permalink
Use omit instead of skip: test/socket/**/*.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Dec 28, 2021
1 parent bab8623 commit 55cdb8b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/socket/test_addrinfo.rb
Expand Up @@ -588,7 +588,7 @@ def test_ipv6_address_predicates
assert(ai.ipv4? || ai.send(meth), "ai=#{addr_exp}; ai.ipv4? || .#{meth}")
rescue Test::Unit::AssertionFailedError
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
raise $!
end
Expand Down
2 changes: 1 addition & 1 deletion test/socket/test_basicsocket.rb
Expand Up @@ -35,7 +35,7 @@ def test_getsockopt
rescue Test::Unit::AssertionFailedError
s.close
if /aix/ =~ RUBY_PLATFORM
skip "Known bug in getsockopt(2) on AIX"
omit "Known bug in getsockopt(2) on AIX"
end
raise $!
end
Expand Down
8 changes: 4 additions & 4 deletions test/socket/test_nonblock.rb
Expand Up @@ -279,7 +279,7 @@ def test_sendmsg_nonblock_error
s1.sendmsg_nonblock("a" * 100000)
}
rescue NotImplementedError, Errno::ENOSYS
skip "sendmsg not implemented on this platform: #{$!}"
omit "sendmsg not implemented on this platform: #{$!}"
rescue Errno::EMSGSIZE
# UDP has 64K limit (if no Jumbograms). No problem.
rescue Errno::EWOULDBLOCK
Expand Down Expand Up @@ -308,7 +308,7 @@ def test_sendmsg_nonblock_seqpacket
end
end
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

def test_sendmsg_nonblock_no_exception
Expand All @@ -329,7 +329,7 @@ def test_sendmsg_nonblock_no_exception
end
end
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

Expand All @@ -338,7 +338,7 @@ def test_recvmsg_nonblock_error
begin
s1.recvmsg_nonblock(4096)
rescue NotImplementedError
skip "recvmsg not implemented on this platform."
omit "recvmsg not implemented on this platform."
rescue Errno::EWOULDBLOCK
assert_kind_of(IO::WaitReadable, $!)
end
Expand Down
6 changes: 3 additions & 3 deletions test/socket/test_socket.rb
Expand Up @@ -343,7 +343,7 @@ def test_udp_server
begin
ifaddrs = Socket.getifaddrs
rescue NotImplementedError
skip "Socket.getifaddrs not implemented"
omit "Socket.getifaddrs not implemented"
end

ifconfig = nil
Expand Down Expand Up @@ -437,10 +437,10 @@ def test_udp_server
}
rescue NotImplementedError, Errno::ENOSYS
skipped = true
skip "need sendmsg and recvmsg: #{$!}"
omit "need sendmsg and recvmsg: #{$!}"
rescue RuntimeError
skipped = true
skip "UDP server is no response: #{$!}"
omit "UDP server is no response: #{$!}"
ensure
if th
if skipped
Expand Down
2 changes: 1 addition & 1 deletion test/socket/test_sockopt.rb
Expand Up @@ -34,7 +34,7 @@ def test_bool
}
rescue TypeError
if /aix/ =~ RUBY_PLATFORM
skip "Known bug in getsockopt(2) on AIX"
omit "Known bug in getsockopt(2) on AIX"
end
raise $!
end
Expand Down
2 changes: 1 addition & 1 deletion test/socket/test_udp.rb
Expand Up @@ -25,7 +25,7 @@ def test_inspect
assert_match(/AF_INET6\b/, sock.inspect)
}
rescue Errno::EAFNOSUPPORT
skip 'AF_INET6 not supported by kernel'
omit 'AF_INET6 not supported by kernel'
end
end
end
Expand Down

0 comments on commit 55cdb8b

Please sign in to comment.