ruby-changes:52061
From: naruse <ko1@a...>
Date: Fri, 10 Aug 2018 17:31:23 +0900 (JST)
Subject: [ruby-changes:52061] naruse:r64269: Remove failing spec files
naruse 2018-08-10 17:31:17 +0900 (Fri, 10 Aug 2018) New Revision: 64269 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64269 Log: Remove failing spec files Re-commit after specs are fixed. http://rubyci.s3.amazonaws.com/freebsd11zfs/ruby-trunk/log/20180810T063001Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180809T191808Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180809T192406Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable10s/ruby-trunk/log/20180809T151911Z.log.html.gz http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180809T192507Z.log.html.gz Removed files: trunk/spec/ruby/library/socket/addrinfo/foreach_spec.rb trunk/spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb trunk/spec/ruby/library/socket/addrinfo/initialize_spec.rb trunk/spec/ruby/library/socket/constants/constants_spec.rb trunk/spec/ruby/library/socket/socket/getaddrinfo_spec.rb trunk/spec/ruby/library/socket/socket/gethostbyaddr_spec.rb trunk/spec/ruby/library/socket/socket/getnameinfo_spec.rb trunk/spec/ruby/library/socket/socket/getservbyname_spec.rb trunk/spec/ruby/library/socket/socket/pack_sockaddr_in_spec.rb trunk/spec/ruby/library/socket/socket/sockaddr_in_spec.rb Index: spec/ruby/library/socket/constants/constants_spec.rb =================================================================== --- spec/ruby/library/socket/constants/constants_spec.rb (revision 64268) +++ spec/ruby/library/socket/constants/constants_spec.rb (nonexistent) @@ -1,113 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/constants/constants_spec.rb#L0 -require_relative '../spec_helper' -require_relative '../fixtures/classes' - -describe "Socket::Constants" do - it "defines socket types" do - consts = ["SOCK_DGRAM", "SOCK_RAW", "SOCK_RDM", "SOCK_SEQPACKET", "SOCK_STREAM"] - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - - it "defines protocol families" do - consts = ["PF_INET6", "PF_INET", "PF_UNIX", "PF_UNSPEC"] - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - - platform_is_not :aix do - it "defines PF_IPX protocol" do - Socket::Constants.should have_constant("PF_IPX") - end - end - - it "defines address families" do - consts = ["AF_INET6", "AF_INET", "AF_UNIX", "AF_UNSPEC"] - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - - platform_is_not :aix do - it "defines AF_IPX address" do - Socket::Constants.should have_constant("AF_IPX") - end - end - - it "defines send/receive options" do - consts = ["MSG_DONTROUTE", "MSG_OOB", "MSG_PEEK"] - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - - it "defines socket level options" do - consts = ["SOL_SOCKET"] - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - - it "defines socket options" do - consts = ["SO_BROADCAST", "SO_DEBUG", "SO_DONTROUTE", "SO_ERROR", "SO_KEEPALIVE", "SO_LINGER", - "SO_OOBINLINE", "SO_RCVBUF", "SO_REUSEADDR", "SO_SNDBUF", "SO_TYPE"] - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - - it "defines multicast options" do - consts = ["IP_ADD_MEMBERSHIP", - "IP_MULTICAST_LOOP", "IP_MULTICAST_TTL"] - platform_is_not :windows do - consts += ["IP_DEFAULT_MULTICAST_LOOP", "IP_DEFAULT_MULTICAST_TTL"] - end - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - - platform_is_not :solaris, :windows, :aix do - it "defines multicast options" do - consts = ["IP_MAX_MEMBERSHIPS"] - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - end - - it "defines TCP options" do - consts = ["TCP_NODELAY"] - platform_is_not :windows do - consts << "TCP_MAXSEG" - end - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - - platform_is_not :windows do - it 'defines SCM options' do - platform_is :darwin, :freebsd do - Socket::Constants.should have_constant('SCM_CREDS') - end - platform_is_not :darwin, :freebsd do - Socket::Constants.should have_constant('SCM_CREDENTIALS') - end - end - - it 'defines error options' do - consts = ["EAI_ADDRFAMILY", "EAI_NODATA"] - - # FreeBSD (11.1, at least) obsoletes EAI_ADDRFAMILY and EAI_NODATA - platform_is :freebsd do - consts = %w(EAI_MEMORY) - end - - consts.each do |c| - Socket::Constants.should have_constant(c) - end - end - end -end Property changes on: spec/ruby/library/socket/constants/constants_spec.rb ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -LF \ No newline at end of property Index: spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb =================================================================== --- spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb (revision 64268) +++ spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb (nonexistent) @@ -1,44 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb#L0 -require_relative '../spec_helper' -require_relative '../fixtures/classes' - -describe 'Addrinfo#getnameinfo' do - describe 'using an IP Addrinfo' do - SocketSpecs.each_ip_protocol do |family, ip_address| - before do - @addr = Addrinfo.tcp(ip_address, 80) - end - - it 'returns the node and service names' do - host, service = @addr.getnameinfo - - host.should be_an_instance_of(String) - service.should == 'http' - end - - it 'accepts flags as a Fixnum as the first argument' do - host, service = @addr.getnameinfo(Socket::NI_NUMERICSERV) - - host.should be_an_instance_of(String) - service.should == '80' - end - end - end - - platform_is :linux do - with_feature :unix_socket do - describe 'using a UNIX Addrinfo' do - before do - @addr = Addrinfo.unix('cats') - @host = Socket.gethostname - end - - it 'returns the hostname and UNIX socket path' do - host, path = @addr.getnameinfo - - host.should == @host - path.should == 'cats' - end - end - end - end -end Property changes on: spec/ruby/library/socket/addrinfo/getnameinfo_spec.rb ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -LF \ No newline at end of property Index: spec/ruby/library/socket/addrinfo/initialize_spec.rb =================================================================== --- spec/ruby/library/socket/addrinfo/initialize_spec.rb (revision 64268) +++ spec/ruby/library/socket/addrinfo/initialize_spec.rb (nonexistent) @@ -1,587 +0,0 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/addrinfo/initialize_spec.rb#L0 -require_relative '../spec_helper' - -describe "Addrinfo#initialize" do - - describe "with a sockaddr string" do - - describe "without a family" do - before :each do - @addrinfo = Addrinfo.new(Socket.sockaddr_in("smtp", "2001:DB8::1")) - end - - it "stores the ip address from the sockaddr" do - @addrinfo.ip_address.should == "2001:db8::1" - end - - it "stores the port number from the sockaddr" do - @addrinfo.ip_port.should == 25 - end - - it "returns the Socket::UNSPEC pfamily" do - @addrinfo.pfamily.should == Socket::PF_UNSPEC - end - - it 'returns AF_INET as the default address family' do - addr = Addrinfo.new(Socket.sockaddr_in(80, '127.0.0.1')) - - addr.afamily.should == Socket::AF_INET - end - - it "returns the INET6 afamily" do - @addrinfo.afamily.should == Socket::AF_INET6 - end - - it "returns the 0 socket type" do - @addrinfo.socktype.should == 0 - end - - it "returns the 0 protocol" do - @addrinfo.protocol.should == 0 - end - end - - describe "with a family given" do - before :each do - @addrinfo = Addrinfo.new(Socket.sockaddr_in("smtp", "2001:DB8::1"), Socket::PF_INET6) - end - - it "stores the ip address from the sockaddr" do - @addrinfo.ip_address.should == "2001:db8::1" - end - - it "stores the port number from the sockaddr" do - @addrinfo.ip_port.should == 25 - end - - it "returns the Socket::UNSPEC pfamily" do - @addrinfo.pfamily.should == Socket::PF_INET6 - end - - it "returns the INET6 afamily" do - @addrinfo.afamily.should == Socket::AF_INET6 - end - - it "returns the 0 socket type" do - @addrinfo.socktype.should == 0 - end - - it "returns the 0 protocol" do - @addrinfo.protocol.should == 0 - end - end - - describe "with a family and socket type" do - before :each do - @addrinfo = Addrinfo.new(Socket.sockaddr_in("smtp", "2001:DB8::1"), Socket::PF_INET6, Socket::SOCK_STREAM) - end - - it "stores the ip address from the sockaddr" do - @addrinfo.ip_address.should == "2001:db8::1" - end - - it "stores the port number from the sockaddr" do - @addrinfo.ip_port.should == 25 - end - - it "returns the Socket::UNSPEC pfamily" do - @addrinfo.pfamily.should == Socket::PF_INET6 - end - - it "returns the INET6 afamily" do - @addrinfo.afamily.should == Socket::AF_INET6 - end - - it "returns the 0 socket type" do - @addrinfo.socktype.should == Socket::SOCK_STREAM - end - - it "returns the 0 protocol" do - @addrinfo.protocol.should == 0 - end - end - - describe "with a family, socket type and protocol" do - before :each do - @addrinfo = Addrinfo.new(Socket.sockaddr_in("smtp", "2001:DB8::1"), Socket::PF_INET6, Socket::SOCK_STREAM, Socket::IPPROTO_TCP) - end - - it "stores the ip address from the sockaddr" do - @addrinfo.ip_address.should == "2001:db8::1" - end - - it "stores the port number from the sockaddr" do - @addrinfo.ip_port.should == 25 - end - - it "returns the Socket::UNSPEC pfamily" do - @addrinfo.pfamily.should == Socket::PF_INET6 - end - - it "returns the INET6 afamily" do - @addrinfo.afamily.should == Socket::AF_INET6 - end - - it "returns the specified socket type" do - @addrinfo.socktype.should == Socket::SOCK_STREAM - end - - it "returns the specified protocol" do - @addrinfo.protocol.should == Socket::IPPROTO_TCP - end - end - - end - - describe "with a sockaddr array" do - - describe "without a family" do - before :each do - @addrinfo = Addrinfo.new(["AF_INET", 46102, "localhost", "127.0.0.1"]) - end - - it "stores the ip address from the sockaddr" do - @addrinfo.ip_address.should == "127.0.0.1" - end - - it "stores the port number from the sockaddr" do - @addrinfo.ip_port.should == 46102 - end - - it "returns the Socket::PF_INET pfamily" do - @addrinfo.pfamily.should == Socket::PF_INET - end - - it "returns the INET6 afamily" do - @addrinfo.afamily.should == Socket::AF_INET - end - - it "returns the 0 socket type" do - @addrinfo.socktype.should == 0 - end - - it "returns the 0 protocol" do - @addrinfo.protocol.should == 0 - end - end - - describe 'with a valid IP address' do - # Uses AF_INET6 since AF_INET is the default, making it a better test - # that Addrinfo actually sets the family correctly. - before do - @sockaddr = ['AF_INET6', 80, 'hostname', '::1'] - end - - it 'returns an Addrinfo with the correct IP' do - addr = Addrinfo.new(@sockaddr) - - addr.ip_address.should == '::1' - end - - it 'returns an Addrinfo with the correct address family' do - addr = Addrinfo.new(@sockaddr) - - addr.afamily.should == Socket::AF_INET6 - end - - it 'returns an Addrinfo with the correct protocol family' do - addr = Addrinfo.new(@sockaddr) - - addr.pfamily.should == Socket::PF_INET6 - end - - it 'returns an Addrinfo with the correct port' do - addr = Addrinfo.new(@sockaddr) - - addr.ip_port.should == 80 - end - end - - describe 'with an invalid IP address' do - it 'raises SocketError' do - block = lambda { Addrinfo.new(['AF_INET6', 80, 'hostname', '127.0.0.1']) } - - block.should raise_error(SocketError) - end - end - - describe "with a family given" do - before :each do - @addrinfo = Addrinfo.new(["AF_INET", 46102, "localhost", "127.0.0.1"], Socket::PF_INET) - end - - it "stores the ip address from the sockaddr" do - @addrinfo.ip_address.should == "127.0.0.1" - end - - it "stores the port number from the sockaddr" do - @addrinfo.ip_port.should == 46102 - end - - it "returns the Socket::UNSPEC pfamily" do - @addrinfo.pfamily.should == Socket::PF_INET - end - - it "returns the INET6 afamily" do - @addrinfo.afamily.should == Socket::AF_INET - end - - it "returns the 0 socket type" do - @addrinfo.socktype.should == 0 - end - - it "returns the 0 protocol" do - @addrinfo.protocol.should == 0 - end - end - - describe "with a family and socket type" do - before :each do - @addrinfo = Addrinfo.new(["AF_INET", 46102, "localhost", "127.0.0.1"], Socket::PF_INET, Socket::SOCK_STREAM) - end - - it "stores the ip address from the sockaddr" do - @addrinfo.ip_address.should == "127.0.0.1" - end - - it "stores the port number from the sockaddr" do - @addrinfo.ip_port.should == 46102 - end - - it "returns the Socket::UNSPEC pfamily" do - @addrinfo.pfamily.should == Socket::PF_INET - end - - it "returns the INET6 afamily" do - @addrinfo.afamily.should == Socket::AF_INET - end - - it "returns the 0 socket type" do - @addrinfo.socktype.should == Socket::SOCK_STREAM - end - - it "returns the 0 protocol" do - @addrinfo.protocol.should == 0 - end - - [:SOCK_STREAM, :SOCK_DGRAM, :SOCK_RAW].each do |type| - it "overwrites the socket type #{type}" do - sockaddr = ['AF_INET', 80, 'hostname', '127.0.0.1'] - - value = Socket.const_get(type) - addr = Addrinfo.new(sockaddr, nil, value) - - addr.socktype.should == value - end - end - - with_feature :sock_packet do - [:SOCK_SEQPACKET].each do |type| - it "overwrites the socket type #{type}" do - sockaddr = ['AF_INET', 80, 'hostname', '127.0.0.1'] - - value = Socket.const_get(type) - addr = Addrinfo.new(sockaddr, nil, value) - - addr.socktype.should == value - end - end - end - - it "raises SocketError when using SOCK_RDM" do - sockaddr = ['AF_INET', 80, 'hostname', '127.0.0.1'] - value = Socket::SOCK_RDM - block = lambda { Addrinfo.new(sockaddr, nil, value) } - - block.should raise_error(SocketError) - end - end - - describe "with a family, socket type and protocol" do - before :each do - @addrinfo = Addrinfo.new(["AF_INET", 46102, "localhost", "127.0.0.1"], Socket::PF_INET, Socket::SOCK_STREAM, Socket::IPPROTO_TCP) - end - - it "stores the ip address from the sockaddr" do - @addrinfo.ip_address.should == "127.0.0.1" - end - - it "stores the port number from the sockaddr" do - @addrinfo.ip_port.should == 46102 - end - - it "returns the Socket::UNSPEC pfamily" do - @addrinfo.pfamily.should == Socket::PF_INET - end - - it "returns the INET6 afamily" do - @addrinfo.afamily.should == Socket::AF_INET - end - - it "returns the 0 socket type" do - @addrinfo.socktype.should == Socket::SOCK_STREAM - end - - it "returns the specified protocol" do - @addrinfo.protocol.should == Socket::IPPROTO_TCP - end - end - end - - describe 'using an Array with extra arguments' do - describe 'with the AF_INET6 address family and an explicit protocol family' do - before do - @sockaddr = ['AF_INET6', 80, 'hostname', '127.0.0.1'] - end - - it "raises SocketError when using any Socket constant except except AF_INET(6)/PF_INET(6)" do - Socket.constants.grep(/(^AF_|^PF_)(?!INET)/).each do |constant| - value = Socket.const_get(constant) - -> { - Addrinfo.new(@sockaddr, value) - }.should raise_error(SocketError) - end - end - end - - describe 'with the AF_INET address family and an explicit socket protocol' do - before do - @sockaddr = ['AF_INET', 80, 'hostname', '127.0.0.1'] - end - - describe 'and no socket type is given' do - valid = [:IPPROTO_IP, :IPPROTO_UDP, :IPPROTO_HOPOPTS] - - valid.each do |type| - it "overwrites the protocol when using #{type}" do - value = Socket.const_get(type) - addr = Addrinfo.new(@sockaddr, nil, nil, value) - - addr.protocol.should == value - end - end - - platform_is_not :windows do - (Socket.constants.grep(/^IPPROTO/) - valid).each do |type| - it "raises SocketError when using #{type}" do - value = Socket.const_get(type) - block = lambda { Addrinfo.new(@sockaddr, nil, nil, value) } - - block.should raise_error(SocketError) - end - end - end - end - - describe 'and the socket type is set to SOCK_DGRAM' do - before do - @socktype = Socket::SOCK_DGRAM - end - - valid = [:IPPROTO_IP, :IPPROTO_UDP, :IPPROTO_HOPOPTS] - - valid.each do |type| - it "overwrites the protocol when using #{type}" do - value = Socket.const_get(type) - addr = Addrinfo.new(@sockaddr, nil, @socktype, value) - - addr.protocol.should == value - end - end - - platform_is_not :windows do - (Socket.constants.grep(/^IPPROTO/) - valid).each do |type| - it "raises SocketError when using #{type}" do - value = Socket.const_get(type) - block = lambda { Addrinfo.new(@sockaddr, nil, @socktype, value) } - - block.should raise_error(SocketError) - end - end - end - end - - with_feature :sock_packet do - describe 'and the socket type is set to SOCK_PACKET' do - before do - @socktype = Socket::SOCK_PACKET - end - - Socket.constants.grep(/^IPPROTO/).each do |type| - it "raises SocketError when using #{type}" do - value = Socket.const_get(type) - block = lambda { Addrinfo.new(@sockaddr, nil, @socktype, value) } - - block.should raise_error(SocketError) - end - end - end - end - - describe 'and the socket type is set to SOCK_RAW' do - before do - @socktype = Socket::SOCK_RAW - end - - Socket.constants.grep(/^IPPROTO/).each do |type| - it "overwrites the protocol when using #{type}" do - value = Socket.const_get(type) - addr = Addrinfo.new(@sockaddr, nil, @socktype, value) - - addr.protocol.should == value - end - end - end - - describe 'and the socket type is set to SOCK_RDM' do - before do - @socktype = Socket::SOCK_RDM - end - - Socket.constants.grep(/^IPPROTO/).each do |type| - it "raises SocketError when using #{type}" do - value = Socket.const_get(type) - block = lambda { Addrinfo.new(@sockaddr, nil, @socktype, value) } - - block.should raise_error(SocketError) - end - end - end - - platform_is_not :windows do - describe 'and the socket type is set to SOCK_SEQPACKET' do - before do - @socktype = Socket::SOCK_SEQPACKET - end - - valid = [:IPPROTO_IP, :IPPROTO_HOPOPTS] - - valid.each do |type| - it "overwrites the protocol when using #{type}" do - value = Socket.const_get(type) - addr = Addrinfo.new(@sockaddr, nil, @socktype, value) - - addr.protocol.should == value - end - end - - (Socket.constants.grep(/^IPPROTO/) - valid).each do |type| - it "raises SocketError when using #{type}" do - value = Socket.const_get(type) - block = lambda { Addrinfo.new(@sockaddr, nil, @socktype, value) } - - block.should raise_error(SocketError) - end - end - end - end - - describe 'and t (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/