diff options
author | odaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-05 00:29:39 +0000 |
---|---|---|
committer | odaira <odaira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-05 00:29:39 +0000 |
commit | 1874524d4269ccebafe6825373a19b1df16d7f38 (patch) | |
tree | 59009188eafd2a387261af7db6e7e1ab0008b677 /test/socket/test_sockopt.rb | |
parent | adde0a94a2828df8a28207a0d4c90ae97c7df9f2 (diff) | |
download | ruby-1874524d4269ccebafe6825373a19b1df16d7f38.tar.gz |
Sat Mar 5 09:17:54 2016 Rei Odaira <Rei.Odaira@gmail.com>
* test/rinda/test_rinda.rb (test_make_socket_ipv4_multicast):
The fifth argument to getsockopt(2) should be modified to
indicate the actual size of the value on return,
but not in AIX. This is a know bug. Skip related tests.
* test/rinda/test_rinda.rb (test_ring_server_ipv4_multicast):
ditto.
* test/rinda/test_rinda.rb (test_make_socket_unicast): ditto.
* test/socket/test_basicsocket.rb (test_getsockopt): ditto.
* test/socket/test_sockopt.rb (test_bool): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket/test_sockopt.rb')
-rw-r--r-- | test/socket/test_sockopt.rb | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/test/socket/test_sockopt.rb b/test/socket/test_sockopt.rb index f38ac2a891..f166027d26 100644 --- a/test/socket/test_sockopt.rb +++ b/test/socket/test_sockopt.rb @@ -25,12 +25,19 @@ class TestSocketOption < Test::Unit::TestCase assert_equal(true, opt.bool) opt = Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 2) assert_equal(true, opt.bool) - Socket.open(:INET, :STREAM) {|s| - s.setsockopt(Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, true)) - assert_equal(true, s.getsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE).bool) - s.setsockopt(Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, false)) - assert_equal(false, s.getsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE).bool) - } + begin + Socket.open(:INET, :STREAM) {|s| + s.setsockopt(Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, true)) + assert_equal(true, s.getsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE).bool) + s.setsockopt(Socket::Option.bool(:INET, :SOCKET, :KEEPALIVE, false)) + assert_equal(false, s.getsockopt(Socket::SOL_SOCKET, Socket::SO_KEEPALIVE).bool) + } + rescue TypeError + if /aix/ =~ RUBY_PLATFORM + skip "Known bug in getsockopt(2) on AIX" + end + raise $! + end end def test_ipv4_multicast_loop |