mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add platform guards for AIX
* Most of these seem OS bugs. * See https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180905T103302Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a140f157b9
commit
ebff0059f4
6 changed files with 60 additions and 48 deletions
|
@ -2,12 +2,14 @@ require_relative '../spec_helper'
|
||||||
|
|
||||||
guard -> { SocketSpecs.ipv6_available? } do
|
guard -> { SocketSpecs.ipv6_available? } do
|
||||||
describe 'Addrinfo#ipv6_linklocal?' do
|
describe 'Addrinfo#ipv6_linklocal?' do
|
||||||
|
platform_is_not :aix do
|
||||||
it 'returns true for a link-local address' do
|
it 'returns true for a link-local address' do
|
||||||
Addrinfo.ip('fe80::').ipv6_linklocal?.should == true
|
Addrinfo.ip('fe80::').ipv6_linklocal?.should == true
|
||||||
Addrinfo.ip('fe81::').ipv6_linklocal?.should == true
|
Addrinfo.ip('fe81::').ipv6_linklocal?.should == true
|
||||||
Addrinfo.ip('fe8f::').ipv6_linklocal?.should == true
|
Addrinfo.ip('fe8f::').ipv6_linklocal?.should == true
|
||||||
Addrinfo.ip('fe80::1').ipv6_linklocal?.should == true
|
Addrinfo.ip('fe80::1').ipv6_linklocal?.should == true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it 'returns false for a regular address' do
|
it 'returns false for a regular address' do
|
||||||
Addrinfo.ip('::1').ipv6_linklocal?.should == false
|
Addrinfo.ip('::1').ipv6_linklocal?.should == false
|
||||||
|
|
|
@ -2,12 +2,14 @@ require_relative '../spec_helper'
|
||||||
|
|
||||||
guard -> { SocketSpecs.ipv6_available? } do
|
guard -> { SocketSpecs.ipv6_available? } do
|
||||||
describe 'Addrinfo#ipv6_sitelocal?' do
|
describe 'Addrinfo#ipv6_sitelocal?' do
|
||||||
|
platform_is_not :aix do
|
||||||
it 'returns true for a site-local address' do
|
it 'returns true for a site-local address' do
|
||||||
Addrinfo.ip('feef::').ipv6_sitelocal?.should == true
|
Addrinfo.ip('feef::').ipv6_sitelocal?.should == true
|
||||||
Addrinfo.ip('fee0::').ipv6_sitelocal?.should == true
|
Addrinfo.ip('fee0::').ipv6_sitelocal?.should == true
|
||||||
Addrinfo.ip('fee2::').ipv6_sitelocal?.should == true
|
Addrinfo.ip('fee2::').ipv6_sitelocal?.should == true
|
||||||
Addrinfo.ip('feef::1').ipv6_sitelocal?.should == true
|
Addrinfo.ip('feef::1').ipv6_sitelocal?.should == true
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it 'returns false for a regular IPv6 address' do
|
it 'returns false for a regular IPv6 address' do
|
||||||
Addrinfo.ip('::1').ipv6_sitelocal?.should == false
|
Addrinfo.ip('::1').ipv6_sitelocal?.should == false
|
||||||
|
|
|
@ -11,6 +11,7 @@ guard -> { SocketSpecs.ipv6_available? } do
|
||||||
addr.ip_address.should == '192.168.1.1'
|
addr.ip_address.should == '192.168.1.1'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
platform_is_not :aix do
|
||||||
it 'returns an Addrinfo for ::0.0.1.1' do
|
it 'returns an Addrinfo for ::0.0.1.1' do
|
||||||
addr = Addrinfo.ip('::0.0.1.1').ipv6_to_ipv4
|
addr = Addrinfo.ip('::0.0.1.1').ipv6_to_ipv4
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ guard -> { SocketSpecs.ipv6_available? } do
|
||||||
addr.afamily.should == Socket::AF_INET
|
addr.afamily.should == Socket::AF_INET
|
||||||
addr.ip_address.should == '0.1.0.0'
|
addr.ip_address.should == '0.1.0.0'
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it 'returns an Addrinfo for ::ffff:192.168.1.1' do
|
it 'returns an Addrinfo for ::ffff:192.168.1.1' do
|
||||||
addr = Addrinfo.ip('::ffff:192.168.1.1').ipv6_to_ipv4
|
addr = Addrinfo.ip('::ffff:192.168.1.1').ipv6_to_ipv4
|
||||||
|
|
|
@ -95,6 +95,7 @@ describe 'Socket#connect_address' do
|
||||||
end
|
end
|
||||||
|
|
||||||
with_feature :unix_socket do
|
with_feature :unix_socket do
|
||||||
|
platform_is_not :aix do
|
||||||
describe 'using an unbound UNIX socket' do
|
describe 'using an unbound UNIX socket' do
|
||||||
before do
|
before do
|
||||||
@path = SocketSpecs.socket_path
|
@path = SocketSpecs.socket_path
|
||||||
|
@ -112,6 +113,7 @@ describe 'Socket#connect_address' do
|
||||||
lambda { @client.connect_address }.should raise_error(SocketError)
|
lambda { @client.connect_address }.should raise_error(SocketError)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe 'using a bound UNIX socket' do
|
describe 'using a bound UNIX socket' do
|
||||||
before do
|
before do
|
||||||
|
|
|
@ -62,7 +62,7 @@ describe 'Socket.gethostbyaddr' do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
guard -> { SocketSpecs.ipv6_available? } do
|
guard -> { SocketSpecs.ipv6_available? && platform_is_not(:aix) } do
|
||||||
describe 'using an IPv6 address' do
|
describe 'using an IPv6 address' do
|
||||||
before do
|
before do
|
||||||
@addr = IPAddr.new('::1').hton
|
@addr = IPAddr.new('::1').hton
|
||||||
|
|
|
@ -21,6 +21,7 @@ with_feature :unix_socket do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'the returned Addrinfo' do
|
describe 'the returned Addrinfo' do
|
||||||
|
platform_is_not :aix do
|
||||||
it 'uses AF_UNIX as the address family' do
|
it 'uses AF_UNIX as the address family' do
|
||||||
@client.local_address.afamily.should == Socket::AF_UNIX
|
@client.local_address.afamily.should == Socket::AF_UNIX
|
||||||
end
|
end
|
||||||
|
@ -28,14 +29,17 @@ with_feature :unix_socket do
|
||||||
it 'uses PF_UNIX as the protocol family' do
|
it 'uses PF_UNIX as the protocol family' do
|
||||||
@client.local_address.pfamily.should == Socket::PF_UNIX
|
@client.local_address.pfamily.should == Socket::PF_UNIX
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it 'uses SOCK_STREAM as the socket type' do
|
it 'uses SOCK_STREAM as the socket type' do
|
||||||
@client.local_address.socktype.should == Socket::SOCK_STREAM
|
@client.local_address.socktype.should == Socket::SOCK_STREAM
|
||||||
end
|
end
|
||||||
|
|
||||||
|
platform_is_not :aix do
|
||||||
it 'uses an empty socket path' do
|
it 'uses an empty socket path' do
|
||||||
@client.local_address.unix_path.should == ''
|
@client.local_address.unix_path.should == ''
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
it 'uses 0 as the protocol' do
|
it 'uses 0 as the protocol' do
|
||||||
@client.local_address.protocol.should == 0
|
@client.local_address.protocol.should == 0
|
||||||
|
|
Loading…
Reference in a new issue