From d3665a6491b9913cae733ded8f9cc8189fe820a4 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 2 Apr 2025 14:38:50 +0900 Subject: [PATCH 1/3] Removed Solaris conditions from core directory --- core/dir/home_spec.rb | 8 +------- core/dir/shared/delete.rb | 18 ++++------------- core/file/empty_spec.rb | 6 ------ core/file/flock_spec.rb | 32 ------------------------------- core/file/lchmod_spec.rb | 2 +- core/file/setuid_spec.rb | 4 ---- core/file/stat/rdev_major_spec.rb | 13 +++---------- core/file/stat/rdev_minor_spec.rb | 13 +++---------- core/file/zero_spec.rb | 6 ------ core/filetest/zero_spec.rb | 6 ------ core/process/fixtures/clocks.rb | 2 +- core/process/setrlimit_spec.rb | 28 ++++++++++++--------------- core/rational/exponent_spec.rb | 8 +++----- 13 files changed, 28 insertions(+), 118 deletions(-) diff --git a/core/dir/home_spec.rb b/core/dir/home_spec.rb index 3cf745ab46..6abd1a65df 100644 --- a/core/dir/home_spec.rb +++ b/core/dir/home_spec.rb @@ -60,13 +60,7 @@ end describe "when called with the current user name" do - platform_is :solaris do - it "returns the named user's home directory from the user database" do - Dir.home(ENV['USER']).should == `getent passwd #{ENV['USER']}|cut -d: -f6`.chomp - end - end - - platform_is_not :windows, :solaris, :android, :wasi do + platform_is_not :windows, :android, :wasi do it "returns the named user's home directory, from the user database" do Dir.home(ENV['USER']).should == `echo ~#{ENV['USER']}`.chomp end diff --git a/core/dir/shared/delete.rb b/core/dir/shared/delete.rb index 49e88360e8..a81b059759 100644 --- a/core/dir/shared/delete.rb +++ b/core/dir/shared/delete.rb @@ -17,20 +17,10 @@ Dir.send(@method, p) end - platform_is_not :solaris do - it "raises an Errno::ENOTEMPTY when trying to remove a nonempty directory" do - -> do - Dir.send @method, DirSpecs.mock_rmdir("nonempty") - end.should raise_error(Errno::ENOTEMPTY) - end - end - - platform_is :solaris do - it "raises an Errno::EEXIST when trying to remove a nonempty directory" do - -> do - Dir.send @method, DirSpecs.mock_rmdir("nonempty") - end.should raise_error(Errno::EEXIST) - end + it "raises an Errno::ENOTEMPTY when trying to remove a nonempty directory" do + -> do + Dir.send @method, DirSpecs.mock_rmdir("nonempty") + end.should raise_error(Errno::ENOTEMPTY) end it "raises an Errno::ENOENT when trying to remove a non-existing directory" do diff --git a/core/file/empty_spec.rb b/core/file/empty_spec.rb index 77f132303e..e8c9941676 100644 --- a/core/file/empty_spec.rb +++ b/core/file/empty_spec.rb @@ -4,10 +4,4 @@ describe "File.empty?" do it_behaves_like :file_zero, :empty?, File it_behaves_like :file_zero_missing, :empty?, File - - platform_is :solaris do - it "returns false for /dev/null" do - File.empty?('/dev/null').should == true - end - end end diff --git a/core/file/flock_spec.rb b/core/file/flock_spec.rb index 070d830bc4..23ddf89ed8 100644 --- a/core/file/flock_spec.rb +++ b/core/file/flock_spec.rb @@ -72,35 +72,3 @@ end end end - -platform_is :solaris do - describe "File#flock on Solaris" do - before :each do - @name = tmp("flock_test") - touch(@name) - - @read_file = File.open @name, "r" - @write_file = File.open @name, "w" - end - - after :each do - @read_file.flock File::LOCK_UN - @read_file.close - @write_file.flock File::LOCK_UN - @write_file.close - rm_r @name - end - - it "fails with EBADF acquiring exclusive lock on read-only File" do - -> do - @read_file.flock File::LOCK_EX - end.should raise_error(Errno::EBADF) - end - - it "fails with EBADF acquiring shared lock on read-only File" do - -> do - @write_file.flock File::LOCK_SH - end.should raise_error(Errno::EBADF) - end - end -end diff --git a/core/file/lchmod_spec.rb b/core/file/lchmod_spec.rb index 7420b95e4a..3c44374983 100644 --- a/core/file/lchmod_spec.rb +++ b/core/file/lchmod_spec.rb @@ -1,7 +1,7 @@ require_relative '../../spec_helper' describe "File.lchmod" do - platform_is_not :linux, :windows, :openbsd, :solaris, :aix do + platform_is_not :linux, :windows, :openbsd, :aix do before :each do @fname = tmp('file_chmod_test') @lname = @fname + '.lnk' diff --git a/core/file/setuid_spec.rb b/core/file/setuid_spec.rb index 281ef01ab9..9e5e86df61 100644 --- a/core/file/setuid_spec.rb +++ b/core/file/setuid_spec.rb @@ -26,10 +26,6 @@ platform_is_not :windows do it "returns true when the gid bit is set" do - platform_is :solaris do - # Solaris requires execute bit before setting suid - system "chmod u+x #{@name}" - end system "chmod u+s #{@name}" File.setuid?(@name).should == true diff --git a/core/file/stat/rdev_major_spec.rb b/core/file/stat/rdev_major_spec.rb index f8a8d1b107..e08d19c03a 100644 --- a/core/file/stat/rdev_major_spec.rb +++ b/core/file/stat/rdev_major_spec.rb @@ -2,19 +2,12 @@ describe "File::Stat#rdev_major" do before :each do - platform_is :solaris do - @name = "/dev/zfs" - end - platform_is_not :solaris do - @name = tmp("file.txt") - touch(@name) - end + @name = tmp("file.txt") + touch(@name) end after :each do - platform_is_not :solaris do - rm_r @name - end + rm_r @name end platform_is_not :windows do diff --git a/core/file/stat/rdev_minor_spec.rb b/core/file/stat/rdev_minor_spec.rb index dc30c1f56c..ace5b8a732 100644 --- a/core/file/stat/rdev_minor_spec.rb +++ b/core/file/stat/rdev_minor_spec.rb @@ -2,19 +2,12 @@ describe "File::Stat#rdev_minor" do before :each do - platform_is :solaris do - @name = "/dev/zfs" - end - platform_is_not :solaris do - @name = tmp("file.txt") - touch(@name) - end + @name = tmp("file.txt") + touch(@name) end after :each do - platform_is_not :solaris do - rm_r @name - end + rm_r @name end platform_is_not :windows do diff --git a/core/file/zero_spec.rb b/core/file/zero_spec.rb index 63dd85ee46..01c7505ef2 100644 --- a/core/file/zero_spec.rb +++ b/core/file/zero_spec.rb @@ -4,10 +4,4 @@ describe "File.zero?" do it_behaves_like :file_zero, :zero?, File it_behaves_like :file_zero_missing, :zero?, File - - platform_is :solaris do - it "returns false for /dev/null" do - File.zero?('/dev/null').should == true - end - end end diff --git a/core/filetest/zero_spec.rb b/core/filetest/zero_spec.rb index dd6a164ec9..92cab67f1b 100644 --- a/core/filetest/zero_spec.rb +++ b/core/filetest/zero_spec.rb @@ -4,10 +4,4 @@ describe "FileTest.zero?" do it_behaves_like :file_zero, :zero?, FileTest it_behaves_like :file_zero_missing, :zero?, FileTest - - platform_is :solaris do - it "returns false for /dev/null" do - File.zero?('/dev/null').should == true - end - end end diff --git a/core/process/fixtures/clocks.rb b/core/process/fixtures/clocks.rb index f043f6ac1f..5757e280be 100644 --- a/core/process/fixtures/clocks.rb +++ b/core/process/fixtures/clocks.rb @@ -2,7 +2,7 @@ module ProcessSpecs def self.clock_constants clocks = [] - platform_is_not :windows, :solaris do + platform_is_not :windows do clocks += Process.constants.select { |c| c.to_s.start_with?('CLOCK_') } # These require CAP_WAKE_ALARM and are not documented in diff --git a/core/process/setrlimit_spec.rb b/core/process/setrlimit_spec.rb index b92f98fd40..ba8d1e04ca 100644 --- a/core/process/setrlimit_spec.rb +++ b/core/process/setrlimit_spec.rb @@ -73,20 +73,18 @@ Process.setrlimit(:STACK, *Process.getrlimit(Process::RLIMIT_STACK)).should be_nil end - platform_is_not :solaris, :aix do + platform_is_not :aix do it "coerces :MEMLOCK into RLIMIT_MEMLOCK" do Process.setrlimit(:MEMLOCK, *Process.getrlimit(Process::RLIMIT_MEMLOCK)).should be_nil end end - platform_is_not :solaris do - it "coerces :NPROC into RLIMIT_NPROC" do - Process.setrlimit(:NPROC, *Process.getrlimit(Process::RLIMIT_NPROC)).should be_nil - end + it "coerces :NPROC into RLIMIT_NPROC" do + Process.setrlimit(:NPROC, *Process.getrlimit(Process::RLIMIT_NPROC)).should be_nil + end - it "coerces :RSS into RLIMIT_RSS" do - Process.setrlimit(:RSS, *Process.getrlimit(Process::RLIMIT_RSS)).should be_nil - end + it "coerces :RSS into RLIMIT_RSS" do + Process.setrlimit(:RSS, *Process.getrlimit(Process::RLIMIT_RSS)).should be_nil end platform_is :netbsd, :freebsd do @@ -155,20 +153,18 @@ Process.setrlimit("STACK", *Process.getrlimit(Process::RLIMIT_STACK)).should be_nil end - platform_is_not :solaris, :aix do + platform_is_not :aix do it "coerces 'MEMLOCK' into RLIMIT_MEMLOCK" do Process.setrlimit("MEMLOCK", *Process.getrlimit(Process::RLIMIT_MEMLOCK)).should be_nil end end - platform_is_not :solaris do - it "coerces 'NPROC' into RLIMIT_NPROC" do - Process.setrlimit("NPROC", *Process.getrlimit(Process::RLIMIT_NPROC)).should be_nil - end + it "coerces 'NPROC' into RLIMIT_NPROC" do + Process.setrlimit("NPROC", *Process.getrlimit(Process::RLIMIT_NPROC)).should be_nil + end - it "coerces 'RSS' into RLIMIT_RSS" do - Process.setrlimit("RSS", *Process.getrlimit(Process::RLIMIT_RSS)).should be_nil - end + it "coerces 'RSS' into RLIMIT_RSS" do + Process.setrlimit("RSS", *Process.getrlimit(Process::RLIMIT_RSS)).should be_nil end platform_is :netbsd, :freebsd do diff --git a/core/rational/exponent_spec.rb b/core/rational/exponent_spec.rb index f9fdbcb33e..65fbf2ed1c 100644 --- a/core/rational/exponent_spec.rb +++ b/core/rational/exponent_spec.rb @@ -228,11 +228,9 @@ -> { Rational(0, 1) ** Rational(-3, 2) }.should raise_error(ZeroDivisionError, "divided by 0") end - platform_is_not :solaris do # See https://github.com/ruby/spec/issues/134 - it "returns Infinity for Rational(0, 1) passed a negative Float" do - [-1.0, -3.0, -3.14].each do |exponent| - (Rational(0, 1) ** exponent).infinite?.should == 1 - end + it "returns Infinity for Rational(0, 1) passed a negative Float" do + [-1.0, -3.0, -3.14].each do |exponent| + (Rational(0, 1) ** exponent).infinite?.should == 1 end end end From 8e250c5039b1eb1650ef01151df2262aebf77aa7 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 2 Apr 2025 14:52:22 +0900 Subject: [PATCH 2/3] Removed Solaris conditions from library directory --- library/socket/addrinfo/getaddrinfo_spec.rb | 16 ++--- library/socket/addrinfo/initialize_spec.rb | 6 +- library/socket/addrinfo/marshal_dump_spec.rb | 6 +- library/socket/addrinfo/udp_spec.rb | 6 +- .../socket/ancillarydata/initialize_spec.rb | 2 +- .../socket/ancillarydata/unix_rights_spec.rb | 2 +- library/socket/basicsocket/recv_spec.rb | 36 ++++++------ library/socket/basicsocket/send_spec.rb | 2 +- library/socket/constants/constants_spec.rb | 2 +- library/socket/shared/pack_sockaddr.rb | 31 +++------- .../socket/socket/connect_nonblock_spec.rb | 58 +++++++++---------- library/socket/socket/getaddrinfo_spec.rb | 2 +- library/socket/socket/gethostbyaddr_spec.rb | 7 +-- library/socket/socket/getifaddrs_spec.rb | 2 +- library/syslog/constants_spec.rb | 2 +- library/syslog/log_spec.rb | 2 +- library/syslog/shared/log.rb | 2 +- 17 files changed, 77 insertions(+), 107 deletions(-) diff --git a/library/socket/addrinfo/getaddrinfo_spec.rb b/library/socket/addrinfo/getaddrinfo_spec.rb index 67fad73815..e05fe9967a 100644 --- a/library/socket/addrinfo/getaddrinfo_spec.rb +++ b/library/socket/addrinfo/getaddrinfo_spec.rb @@ -73,19 +73,15 @@ end end - platform_is_not :'solaris2.10' do # i386-solaris - it 'sets a custom socket protocol of the Addrinfo instances' do - array = Addrinfo.getaddrinfo('127.0.0.1', 80, nil, nil, Socket::IPPROTO_UDP) + it 'sets a custom socket protocol of the Addrinfo instances' do + array = Addrinfo.getaddrinfo('127.0.0.1', 80, nil, nil, Socket::IPPROTO_UDP) - array[0].protocol.should == Socket::IPPROTO_UDP - end + array[0].protocol.should == Socket::IPPROTO_UDP end - 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) + 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) - end + array[0].canonname.should be_an_instance_of(String) end end diff --git a/library/socket/addrinfo/initialize_spec.rb b/library/socket/addrinfo/initialize_spec.rb index d8885c5d62..b7477efc79 100644 --- a/library/socket/addrinfo/initialize_spec.rb +++ b/library/socket/addrinfo/initialize_spec.rb @@ -362,7 +362,7 @@ end end - platform_is_not :windows, :aix, :solaris do + platform_is_not :windows, :aix do (Socket.constants.grep(/^IPPROTO/) - valid).each do |type| it "raises SocketError when using #{type}" do value = Socket.const_get(type) @@ -390,7 +390,7 @@ end end - platform_is_not :windows, :aix, :solaris do + platform_is_not :windows, :aix do (Socket.constants.grep(/^IPPROTO/) - valid).each do |type| it "raises SocketError when using #{type}" do value = Socket.const_get(type) @@ -495,7 +495,7 @@ end end - platform_is_not :windows, :aix, :solaris do + platform_is_not :windows, :aix do (Socket.constants.grep(/^IPPROTO/) - valid).each do |type| it "raises SocketError when using #{type}" do value = Socket.const_get(type) diff --git a/library/socket/addrinfo/marshal_dump_spec.rb b/library/socket/addrinfo/marshal_dump_spec.rb index c4220a6f3e..2d69a33b53 100644 --- a/library/socket/addrinfo/marshal_dump_spec.rb +++ b/library/socket/addrinfo/marshal_dump_spec.rb @@ -32,10 +32,8 @@ @array[3].should == 'SOCK_STREAM' end - platform_is_not :'solaris2.10' do # i386-solaris - it 'includes the protocol as the 5th value' do - @array[4].should == 'IPPROTO_TCP' - end + it 'includes the protocol as the 5th value' do + @array[4].should == 'IPPROTO_TCP' end it 'includes the canonical name as the 6th value' do diff --git a/library/socket/addrinfo/udp_spec.rb b/library/socket/addrinfo/udp_spec.rb index b05cbf9b0b..ac02e76ef5 100644 --- a/library/socket/addrinfo/udp_spec.rb +++ b/library/socket/addrinfo/udp_spec.rb @@ -27,10 +27,8 @@ Addrinfo.udp(ip_address, 80).socktype.should == Socket::SOCK_DGRAM end - platform_is_not :solaris do - it 'sets the socket protocol' do - Addrinfo.udp(ip_address, 80).protocol.should == Socket::IPPROTO_UDP - end + it 'sets the socket protocol' do + Addrinfo.udp(ip_address, 80).protocol.should == Socket::IPPROTO_UDP end end end diff --git a/library/socket/ancillarydata/initialize_spec.rb b/library/socket/ancillarydata/initialize_spec.rb index 344d1485c5..eca45599d7 100644 --- a/library/socket/ancillarydata/initialize_spec.rb +++ b/library/socket/ancillarydata/initialize_spec.rb @@ -106,7 +106,7 @@ Socket::AncillaryData.new(:INET, :SOCKET, :RIGHTS, '').type.should == Socket::SCM_RIGHTS end - platform_is_not :"solaris2.10", :aix do + platform_is_not :aix do it 'sets the type to SCM_TIMESTAMP when using :TIMESTAMP as the type argument' do Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '').type.should == Socket::SCM_TIMESTAMP end diff --git a/library/socket/ancillarydata/unix_rights_spec.rb b/library/socket/ancillarydata/unix_rights_spec.rb index 65ffcb01af..95052fd91c 100644 --- a/library/socket/ancillarydata/unix_rights_spec.rb +++ b/library/socket/ancillarydata/unix_rights_spec.rb @@ -50,7 +50,7 @@ -> { data.unix_rights }.should raise_error(TypeError) end - platform_is_not :"solaris2.10", :aix do + platform_is_not :aix do it 'raises TypeError when the type is not SCM_RIGHTS' do data = Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '') diff --git a/library/socket/basicsocket/recv_spec.rb b/library/socket/basicsocket/recv_spec.rb index e20c571922..40033a5f5d 100644 --- a/library/socket/basicsocket/recv_spec.rb +++ b/library/socket/basicsocket/recv_spec.rb @@ -32,28 +32,26 @@ ScratchPad.recorded.should == 'hello' end - platform_is_not :solaris do - it "accepts flags to specify unusual receiving behaviour" do - t = Thread.new do - client = @server.accept + it "accepts flags to specify unusual receiving behaviour" do + t = Thread.new do + client = @server.accept - # in-band data (TCP), doesn't receive the flag. - ScratchPad.record client.recv(10) + # in-band data (TCP), doesn't receive the flag. + ScratchPad.record client.recv(10) - # this recv is important (TODO: explain) - client.recv(10) - client.close - end - Thread.pass while t.status and t.status != "sleep" - t.status.should_not be_nil - - socket = TCPSocket.new('127.0.0.1', @port) - socket.send('helloU', Socket::MSG_OOB) - socket.shutdown(1) - t.join - socket.close - ScratchPad.recorded.should == 'hello' + # this recv is important (TODO: explain) + client.recv(10) + client.close end + Thread.pass while t.status and t.status != "sleep" + t.status.should_not be_nil + + socket = TCPSocket.new('127.0.0.1', @port) + socket.send('helloU', Socket::MSG_OOB) + socket.shutdown(1) + t.join + socket.close + ScratchPad.recorded.should == 'hello' end it "gets lines delimited with a custom separator" do diff --git a/library/socket/basicsocket/send_spec.rb b/library/socket/basicsocket/send_spec.rb index 36da125279..25ba3f5655 100644 --- a/library/socket/basicsocket/send_spec.rb +++ b/library/socket/basicsocket/send_spec.rb @@ -38,7 +38,7 @@ data.should == 'hello' end - platform_is_not :solaris, :windows do + platform_is_not :windows do it "accepts flags to specify unusual sending behaviour" do data = nil peek_data = nil diff --git a/library/socket/constants/constants_spec.rb b/library/socket/constants/constants_spec.rb index 637bc6740a..b9a9d42725 100644 --- a/library/socket/constants/constants_spec.rb +++ b/library/socket/constants/constants_spec.rb @@ -68,7 +68,7 @@ end end - platform_is_not :solaris, :windows, :aix, :android do + platform_is_not :windows, :aix, :android do it "defines multicast options" do consts = ["IP_MAX_MEMBERSHIPS"] consts.each do |c| diff --git a/library/socket/shared/pack_sockaddr.rb b/library/socket/shared/pack_sockaddr.rb index 26fdf682b1..f309aa02c7 100644 --- a/library/socket/shared/pack_sockaddr.rb +++ b/library/socket/shared/pack_sockaddr.rb @@ -22,11 +22,9 @@ Socket.unpack_sockaddr_in(sockaddr_in).should == [80, '0.0.0.0'] end - platform_is_not :solaris do - it 'resolves the service name to a port' do - sockaddr_in = Socket.public_send(@method, 'http', '127.0.0.1') - Socket.unpack_sockaddr_in(sockaddr_in).should == [80, '127.0.0.1'] - end + it 'resolves the service name to a port' do + sockaddr_in = Socket.public_send(@method, 'http', '127.0.0.1') + Socket.unpack_sockaddr_in(sockaddr_in).should == [80, '127.0.0.1'] end describe 'using an IPv4 address' do @@ -38,25 +36,12 @@ end end - platform_is_not :solaris do - describe 'using an IPv6 address' do - it 'returns a String of 28 bytes' do - str = Socket.public_send(@method, 80, '::1') + describe 'using an IPv6 address' do + it 'returns a String of 28 bytes' do + str = Socket.public_send(@method, 80, '::1') - str.should be_an_instance_of(String) - str.bytesize.should == 28 - end - end - end - - platform_is :solaris do - describe 'using an IPv6 address' do - it 'returns a String of 32 bytes' do - str = Socket.public_send(@method, 80, '::1') - - str.should be_an_instance_of(String) - str.bytesize.should == 32 - end + str.should be_an_instance_of(String) + str.bytesize.should == 28 end end end diff --git a/library/socket/socket/connect_nonblock_spec.rb b/library/socket/socket/connect_nonblock_spec.rb index 3cf667fc4a..359b8719fb 100644 --- a/library/socket/socket/connect_nonblock_spec.rb +++ b/library/socket/socket/connect_nonblock_spec.rb @@ -16,42 +16,40 @@ @thread.join if @thread end - platform_is_not :solaris do - it "connects the socket to the remote side" do - port = nil - accept = false - @thread = Thread.new do - server = TCPServer.new(@hostname, 0) - port = server.addr[1] - Thread.pass until accept - conn = server.accept - conn << "hello!" - conn.close - server.close - end - - Thread.pass until port + it "connects the socket to the remote side" do + port = nil + accept = false + @thread = Thread.new do + server = TCPServer.new(@hostname, 0) + port = server.addr[1] + Thread.pass until accept + conn = server.accept + conn << "hello!" + conn.close + server.close + end - addr = Socket.sockaddr_in(port, @hostname) - begin - @socket.connect_nonblock(addr) - rescue Errno::EINPROGRESS - end + Thread.pass until port - accept = true - IO.select nil, [@socket] + addr = Socket.sockaddr_in(port, @hostname) + begin + @socket.connect_nonblock(addr) + rescue Errno::EINPROGRESS + end - begin - @socket.connect_nonblock(addr) - rescue Errno::EISCONN - # Not all OS's use this errno, so we trap and ignore it - end + accept = true + IO.select nil, [@socket] - @socket.read(6).should == "hello!" + begin + @socket.connect_nonblock(addr) + rescue Errno::EISCONN + # Not all OS's use this errno, so we trap and ignore it end + + @socket.read(6).should == "hello!" end - platform_is_not :freebsd, :solaris, :aix do + platform_is_not :freebsd, :aix do it "raises Errno::EINPROGRESS when the connect would block" do -> do @socket.connect_nonblock(@addr) @@ -135,7 +133,7 @@ end end - platform_is_not :freebsd, :solaris do + platform_is_not :freebsd do it 'raises IO:EINPROGRESSWaitWritable when the connection would block' do @server.bind(@sockaddr) diff --git a/library/socket/socket/getaddrinfo_spec.rb b/library/socket/socket/getaddrinfo_spec.rb index e0eff3cef4..9f049597d0 100644 --- a/library/socket/socket/getaddrinfo_spec.rb +++ b/library/socket/socket/getaddrinfo_spec.rb @@ -11,7 +11,7 @@ BasicSocket.do_not_reverse_lookup = @do_not_reverse_lookup end - platform_is_not :solaris, :windows do + platform_is_not :windows do it "gets the address information" do expected = [] # The check for AP_INET6's class is needed because ipaddr.rb adds diff --git a/library/socket/socket/gethostbyaddr_spec.rb b/library/socket/socket/gethostbyaddr_spec.rb index a4c8355520..5d936046f5 100644 --- a/library/socket/socket/gethostbyaddr_spec.rb +++ b/library/socket/socket/gethostbyaddr_spec.rb @@ -18,11 +18,8 @@ @array = suppress_warning { Socket.gethostbyaddr(@addr) } end - # RubyCI Solaris 11x defines 127.0.0.1 as unstable11x - platform_is_not :"solaris2.11" do - it 'includes the hostname as the first value' do - @array[0].should == SocketSpecs.hostname_reverse_lookup - end + it 'includes the hostname as the first value' do + @array[0].should == SocketSpecs.hostname_reverse_lookup end it 'includes the aliases as the 2nd value' do diff --git a/library/socket/socket/getifaddrs_spec.rb b/library/socket/socket/getifaddrs_spec.rb index 7df542abe6..839854ea27 100644 --- a/library/socket/socket/getifaddrs_spec.rb +++ b/library/socket/socket/getifaddrs_spec.rb @@ -1,6 +1,6 @@ require_relative '../spec_helper' -platform_is_not :aix, :"solaris2.10" do +platform_is_not :aix do describe 'Socket.getifaddrs' do before do @ifaddrs = Socket.getifaddrs diff --git a/library/syslog/constants_spec.rb b/library/syslog/constants_spec.rb index 2b9524c53d..fc9db47dd8 100644 --- a/library/syslog/constants_spec.rb +++ b/library/syslog/constants_spec.rb @@ -4,7 +4,7 @@ require 'syslog' describe "Syslog::Constants" do - platform_is_not :windows, :solaris, :aix do + platform_is_not :windows, :aix do before :all do @constants = %w(LOG_AUTHPRIV LOG_USER LOG_LOCAL2 LOG_NOTICE LOG_NDELAY LOG_SYSLOG LOG_ALERT LOG_FTP LOG_LOCAL5 LOG_ERR LOG_AUTH diff --git a/library/syslog/log_spec.rb b/library/syslog/log_spec.rb index 8589fb1f73..0c855b8257 100644 --- a/library/syslog/log_spec.rb +++ b/library/syslog/log_spec.rb @@ -4,7 +4,7 @@ require 'syslog' describe "Syslog.log" do - platform_is_not :windows, :darwin, :solaris, :aix, :android do + platform_is_not :windows, :darwin, :aix, :android do before :each do Syslog.opened?.should be_false diff --git a/library/syslog/shared/log.rb b/library/syslog/shared/log.rb index 12e4ea8366..9f9302b214 100644 --- a/library/syslog/shared/log.rb +++ b/library/syslog/shared/log.rb @@ -1,5 +1,5 @@ describe :syslog_log, shared: true do - platform_is_not :windows, :darwin, :solaris, :aix, :android do + platform_is_not :windows, :darwin, :aix, :android do before :each do Syslog.opened?.should be_false end From d2451f68c88c06926ece89948f8bc540dc9e8405 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 2 Apr 2025 14:53:03 +0900 Subject: [PATCH 3/3] Removed Solaris conditions from optional and shared directories --- optional/capi/kernel_spec.rb | 6 ++---- shared/file/sticky.rb | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/optional/capi/kernel_spec.rb b/optional/capi/kernel_spec.rb index ba301ec172..d915a72c22 100644 --- a/optional/capi/kernel_spec.rb +++ b/optional/capi/kernel_spec.rb @@ -242,10 +242,8 @@ class CApiKernelSpecs::Exc < StandardError @s.rb_yield(1) { break 73 }.should == 73 end - platform_is_not :"solaris2.10" do # NOTE: i386-pc-solaris2.10 - it "rb_yield through a callback to a block that breaks with a value returns the value" do - @s.rb_yield_indirected(1) { break 73 }.should == 73 - end + it "rb_yield through a callback to a block that breaks with a value returns the value" do + @s.rb_yield_indirected(1) { break 73 }.should == 73 end it "rb_yield to block passed to enumerator" do diff --git a/shared/file/sticky.rb b/shared/file/sticky.rb index 38bb6ed26b..e07fa22fd7 100644 --- a/shared/file/sticky.rb +++ b/shared/file/sticky.rb @@ -8,7 +8,7 @@ Dir.rmdir(@dir) if File.exist?(@dir) end - platform_is_not :windows, :darwin, :freebsd, :netbsd, :openbsd, :solaris, :aix do + platform_is_not :windows, :darwin, :freebsd, :netbsd, :openbsd, :aix do it "returns true if the named file has the sticky bit, otherwise false" do Dir.mkdir @dir, 01755