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

ruby-changes:52088

From: naruse <ko1@a...>
Date: Sat, 11 Aug 2018 22:31:47 +0900 (JST)
Subject: [ruby-changes:52088] naruse:r64296 (trunk): Solaris raises EAI_SERVICE if hints.ai_socktype=0

naruse	2018-08-11 22:31:43 +0900 (Sat, 11 Aug 2018)

  New Revision: 64296

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

  Log:
    Solaris raises EAI_SERVICE if hints.ai_socktype=0

  Modified files:
    trunk/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb
Index: spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb
===================================================================
--- spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb	(revision 64295)
+++ spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb	(revision 64296)
@@ -10,10 +10,12 @@ describe 'Addrinfo.getaddrinfo' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb#L10
   end
 
   SocketSpecs.each_ip_protocol do |family, ip_address|
-    it 'sets the IP address of the Addrinfo instances' do
-      array = Addrinfo.getaddrinfo(ip_address, 80)
+    platform_is_not :solaris do
+      it 'sets the IP address of the Addrinfo instances' do
+        array = Addrinfo.getaddrinfo(ip_address, 80)
 
-      array[0].ip_address.should == ip_address
+        array[0].ip_address.should == ip_address
+      end
     end
 
     it 'sets the port of the Addrinfo instances' do
@@ -49,7 +51,7 @@ describe 'Addrinfo.getaddrinfo' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb#L51
     end
   end
 
-  platform_is_not :windows do
+  platform_is_not :solaris, :windows do
     it 'sets the default socket type of the Addrinfo instances' do
       array    = Addrinfo.getaddrinfo('localhost', 80)
       possible = [Socket::SOCK_STREAM, Socket::SOCK_DGRAM]
@@ -64,7 +66,7 @@ describe 'Addrinfo.getaddrinfo' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb#L66
     array[0].socktype.should == Socket::SOCK_DGRAM
   end
 
-  platform_is_not :windows do
+  platform_is_not :solaris, :windows do
     it 'sets the default socket protocol of the Addrinfo instances' do
       array    = Addrinfo.getaddrinfo('localhost', 80)
       possible = [Socket::IPPROTO_TCP, Socket::IPPROTO_UDP]
@@ -79,10 +81,12 @@ describe 'Addrinfo.getaddrinfo' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb#L81
     array[0].protocol.should == Socket::IPPROTO_UDP
   end
 
-  it 'sets the canonical name when AI_CANONNAME is given as a flag' do
-    array = Addrinfo
-      .getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
+  platform_is_not :solaris do
+    it 'sets the canonical name when AI_CANONNAME is given as a flag' do
+      array = Addrinfo
+        .getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
 
-    array[0].canonname.should be_an_instance_of(String)
+      array[0].canonname.should be_an_instance_of(String)
+    end
   end
 end

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

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