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,11 +2,13 @@ require_relative '../spec_helper'
|
||||||
|
|
||||||
guard -> { SocketSpecs.ipv6_available? } do
|
guard -> { SocketSpecs.ipv6_available? } do
|
||||||
describe 'Addrinfo#ipv6_linklocal?' do
|
describe 'Addrinfo#ipv6_linklocal?' do
|
||||||
it 'returns true for a link-local address' do
|
platform_is_not :aix do
|
||||||
Addrinfo.ip('fe80::').ipv6_linklocal?.should == true
|
it 'returns true for a link-local address' do
|
||||||
Addrinfo.ip('fe81::').ipv6_linklocal?.should == true
|
Addrinfo.ip('fe80::').ipv6_linklocal?.should == true
|
||||||
Addrinfo.ip('fe8f::').ipv6_linklocal?.should == true
|
Addrinfo.ip('fe81::').ipv6_linklocal?.should == true
|
||||||
Addrinfo.ip('fe80::1').ipv6_linklocal?.should == true
|
Addrinfo.ip('fe8f::').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
|
||||||
|
|
|
@ -2,11 +2,13 @@ require_relative '../spec_helper'
|
||||||
|
|
||||||
guard -> { SocketSpecs.ipv6_available? } do
|
guard -> { SocketSpecs.ipv6_available? } do
|
||||||
describe 'Addrinfo#ipv6_sitelocal?' do
|
describe 'Addrinfo#ipv6_sitelocal?' do
|
||||||
it 'returns true for a site-local address' do
|
platform_is_not :aix do
|
||||||
Addrinfo.ip('feef::').ipv6_sitelocal?.should == true
|
it 'returns true for a site-local address' do
|
||||||
Addrinfo.ip('fee0::').ipv6_sitelocal?.should == true
|
Addrinfo.ip('feef::').ipv6_sitelocal?.should == true
|
||||||
Addrinfo.ip('fee2::').ipv6_sitelocal?.should == true
|
Addrinfo.ip('fee0::').ipv6_sitelocal?.should == true
|
||||||
Addrinfo.ip('feef::1').ipv6_sitelocal?.should == true
|
Addrinfo.ip('fee2::').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
|
||||||
|
|
|
@ -11,31 +11,33 @@ guard -> { SocketSpecs.ipv6_available? } do
|
||||||
addr.ip_address.should == '192.168.1.1'
|
addr.ip_address.should == '192.168.1.1'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns an Addrinfo for ::0.0.1.1' do
|
platform_is_not :aix do
|
||||||
addr = Addrinfo.ip('::0.0.1.1').ipv6_to_ipv4
|
it 'returns an Addrinfo for ::0.0.1.1' do
|
||||||
|
addr = Addrinfo.ip('::0.0.1.1').ipv6_to_ipv4
|
||||||
|
|
||||||
addr.should be_an_instance_of(Addrinfo)
|
addr.should be_an_instance_of(Addrinfo)
|
||||||
|
|
||||||
addr.afamily.should == Socket::AF_INET
|
addr.afamily.should == Socket::AF_INET
|
||||||
addr.ip_address.should == '0.0.1.1'
|
addr.ip_address.should == '0.0.1.1'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns an Addrinfo for ::0.0.1.0' do
|
it 'returns an Addrinfo for ::0.0.1.0' do
|
||||||
addr = Addrinfo.ip('::0.0.1.0').ipv6_to_ipv4
|
addr = Addrinfo.ip('::0.0.1.0').ipv6_to_ipv4
|
||||||
|
|
||||||
addr.should be_an_instance_of(Addrinfo)
|
addr.should be_an_instance_of(Addrinfo)
|
||||||
|
|
||||||
addr.afamily.should == Socket::AF_INET
|
addr.afamily.should == Socket::AF_INET
|
||||||
addr.ip_address.should == '0.0.1.0'
|
addr.ip_address.should == '0.0.1.0'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns an Addrinfo for ::0.1.0.0' do
|
it 'returns an Addrinfo for ::0.1.0.0' do
|
||||||
addr = Addrinfo.ip('::0.1.0.0').ipv6_to_ipv4
|
addr = Addrinfo.ip('::0.1.0.0').ipv6_to_ipv4
|
||||||
|
|
||||||
addr.should be_an_instance_of(Addrinfo)
|
addr.should be_an_instance_of(Addrinfo)
|
||||||
|
|
||||||
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
|
||||||
|
|
|
@ -95,21 +95,23 @@ describe 'Socket#connect_address' do
|
||||||
end
|
end
|
||||||
|
|
||||||
with_feature :unix_socket do
|
with_feature :unix_socket do
|
||||||
describe 'using an unbound UNIX socket' do
|
platform_is_not :aix do
|
||||||
before do
|
describe 'using an unbound UNIX socket' do
|
||||||
@path = SocketSpecs.socket_path
|
before do
|
||||||
@server = UNIXServer.new(@path)
|
@path = SocketSpecs.socket_path
|
||||||
@client = UNIXSocket.new(@path)
|
@server = UNIXServer.new(@path)
|
||||||
end
|
@client = UNIXSocket.new(@path)
|
||||||
|
end
|
||||||
|
|
||||||
after do
|
after do
|
||||||
@client.close
|
@client.close
|
||||||
@server.close
|
@server.close
|
||||||
rm_r(@path)
|
rm_r(@path)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'raises SocketError' do
|
it 'raises SocketError' do
|
||||||
lambda { @client.connect_address }.should raise_error(SocketError)
|
lambda { @client.connect_address }.should raise_error(SocketError)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -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,20 +21,24 @@ with_feature :unix_socket do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'the returned Addrinfo' do
|
describe 'the returned Addrinfo' do
|
||||||
it 'uses AF_UNIX as the address family' do
|
platform_is_not :aix do
|
||||||
@client.local_address.afamily.should == Socket::AF_UNIX
|
it 'uses AF_UNIX as the address family' do
|
||||||
end
|
@client.local_address.afamily.should == Socket::AF_UNIX
|
||||||
|
end
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
it 'uses an empty socket path' do
|
platform_is_not :aix do
|
||||||
@client.local_address.unix_path.should == ''
|
it 'uses an empty socket path' do
|
||||||
|
@client.local_address.unix_path.should == ''
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'uses 0 as the protocol' do
|
it 'uses 0 as the protocol' do
|
||||||
|
|
Loading…
Reference in a new issue