test/rinda/test_rinda: skip multicast tests for unsupported systems
This allows "test-all" to pass on systems without multicast support. I leave CONFIG_IP_MULTICAST unset in my Linux kernel .config, nowadays. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57310 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5c244d73d7
commit
d9421e1376
@ -643,7 +643,11 @@ class TestRingServer < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_make_socket_ipv4_multicast
|
def test_make_socket_ipv4_multicast
|
||||||
v4mc = @rs.make_socket('239.0.0.1')
|
begin
|
||||||
|
v4mc = @rs.make_socket('239.0.0.1')
|
||||||
|
rescue Errno::ENOBUFS => e
|
||||||
|
skip "Missing multicast support in OS: #{e.message}"
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Socket.const_defined?(:SO_REUSEPORT) then
|
if Socket.const_defined?(:SO_REUSEPORT) then
|
||||||
@ -670,6 +674,8 @@ class TestRingServer < Test::Unit::TestCase
|
|||||||
v6mc = @rs.make_socket('ff02::1')
|
v6mc = @rs.make_socket('ff02::1')
|
||||||
rescue Errno::EADDRNOTAVAIL
|
rescue Errno::EADDRNOTAVAIL
|
||||||
return # IPv6 address for multicast not available
|
return # IPv6 address for multicast not available
|
||||||
|
rescue Errno::ENOBUFS => e
|
||||||
|
skip "Missing multicast support in OS: #{e.message}"
|
||||||
end
|
end
|
||||||
|
|
||||||
if Socket.const_defined?(:SO_REUSEPORT) then
|
if Socket.const_defined?(:SO_REUSEPORT) then
|
||||||
@ -684,7 +690,12 @@ class TestRingServer < Test::Unit::TestCase
|
|||||||
|
|
||||||
def test_ring_server_ipv4_multicast
|
def test_ring_server_ipv4_multicast
|
||||||
@rs.shutdown
|
@rs.shutdown
|
||||||
@rs = Rinda::RingServer.new(@ts, [['239.0.0.1', '0.0.0.0']], @port)
|
begin
|
||||||
|
@rs = Rinda::RingServer.new(@ts, [['239.0.0.1', '0.0.0.0']], @port)
|
||||||
|
rescue Errno::ENOBUFS => e
|
||||||
|
skip "Missing multicast support in OS: #{e.message}"
|
||||||
|
end
|
||||||
|
|
||||||
v4mc = @rs.instance_variable_get('@sockets').first
|
v4mc = @rs.instance_variable_get('@sockets').first
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user