diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-08-11 12:46:27 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-08-11 12:46:27 -0700 |
commit | 60d60a6fa716e91651997d86e3cb9cda41475975 (patch) | |
tree | 97ec76a36f7c57aace54b497a66160f5b7dd5750 /test/unit | |
parent | ec8a8f32d257290aac377f1c7b1c496e1df75f73 (diff) | |
download | unicorn-60d60a6fa716e91651997d86e3cb9cda41475975.tar.gz |
I don't build IPv6 into all my kernels; maybe other testers do not, either.
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/test_socket_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/test_socket_helper.rb b/test/unit/test_socket_helper.rb index 8ce1023..f099391 100644 --- a/test/unit/test_socket_helper.rb +++ b/test/unit/test_socket_helper.rb @@ -179,7 +179,11 @@ class TestSocketHelper < Test::Unit::TestCase end if defined?(TCP_DEFER_ACCEPT) def test_ipv6only - port = unused_port "#@test6_addr" + port = begin + unused_port "#@test6_addr" + rescue Errno::EINVAL + return + end sock = bind_listen "[#@test6_addr]:#{port}", :ipv6only => true cur = sock.getsockopt(:IPPROTO_IPV6, :IPV6_V6ONLY).unpack('i')[0] assert_equal 1, cur |