[前][次][番号順一覧][スレッド一覧]

ruby-changes:39281

From: ngoto <ko1@a...>
Date: Fri, 24 Jul 2015 20:30:06 +0900 (JST)
Subject: [ruby-changes:39281] ngoto:r51362 (trunk): * test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6): prevent to use

ngoto	2015-07-24 20:29:49 +0900 (Fri, 24 Jul 2015)

  New Revision: 51362

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51362

  Log:
    * test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6): prevent to use
      IPv6 loopback interface for
      Rinda::TestRingFinger#test_make_socket_ipv6_multicast and
      Rinda::TestRingFinger#test_make_socket_ipv6_multicast_hops.
      The tests are skipped if there are no IPv6 devices other than the
      loopback device. [Bug #11394] [ruby-dev:49199]
    
    * test/rinda/test_rinda.rb (test_make_socket_ipv6_multicast): ditto
      for Rinda::TestRingServer#test_make_socket_ipv6_multicast.
       
    * test/rinda/test_rinda.rb (test_ring_server_ipv6_multicast): ditto
      for Rinda::TestRingServer#test_ring_server_ipv6_multicast.

  Modified files:
    trunk/ChangeLog
    trunk/test/rinda/test_rinda.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51361)
+++ ChangeLog	(revision 51362)
@@ -1,3 +1,18 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Jul 24 20:09:43 2015  Naohisa Goto  <ngotogenome@g...>
+
+	* test/rinda/test_rinda.rb (RingIPv6#prepare_ipv6): prevent to use
+	  IPv6 loopback interface for
+	  Rinda::TestRingFinger#test_make_socket_ipv6_multicast and
+	  Rinda::TestRingFinger#test_make_socket_ipv6_multicast_hops.
+	  The tests are skipped if there are no IPv6 devices other than the
+	  loopback device. [Bug #11394] [ruby-dev:49199]
+
+	* test/rinda/test_rinda.rb (test_make_socket_ipv6_multicast): ditto
+	  for Rinda::TestRingServer#test_make_socket_ipv6_multicast.
+
+	* test/rinda/test_rinda.rb (test_ring_server_ipv6_multicast): ditto
+	  for Rinda::TestRingServer#test_ring_server_ipv6_multicast.
+
 Fri Jul 24 16:35:55 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* string.c (fstr_update_callback): pool bare strings only.
Index: test/rinda/test_rinda.rb
===================================================================
--- test/rinda/test_rinda.rb	(revision 51361)
+++ test/rinda/test_rinda.rb	(revision 51362)
@@ -547,7 +547,7 @@ module RingIPv6 https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L547
     rescue NotImplementedError
       # ifindex() function may not be implemented on Windows.
       return if
-        Socket.ip_address_list.any? { |addrinfo| addrinfo.ipv6? }
+        Socket.ip_address_list.any? { |addrinfo| addrinfo.ipv6? && !addrinfo.ipv6_loopback? }
     end
     skip 'IPv6 not available'
   end
@@ -636,7 +636,7 @@ class TestRingServer < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L636
 
   def test_make_socket_ipv6_multicast
     skip 'IPv6 not available' unless
-      Socket.ip_address_list.any? { |addrinfo| addrinfo.ipv6? }
+      Socket.ip_address_list.any? { |addrinfo| addrinfo.ipv6? && !addrinfo.ipv6_loopback? }
 
     begin
       v6mc = @rs.make_socket('ff02::1')
@@ -671,7 +671,7 @@ class TestRingServer < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L671
 
   def test_ring_server_ipv6_multicast
     skip 'IPv6 not available' unless
-      Socket.ip_address_list.any? { |addrinfo| addrinfo.ipv6? }
+      Socket.ip_address_list.any? { |addrinfo| addrinfo.ipv6? && !addrinfo.ipv6_loopback? }
 
     @rs.shutdown
     begin

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]