diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb index e3bd1cd075..dbffd24370 100644 --- a/test/ruby/test_argf.rb +++ b/test/ruby/test_argf.rb @@ -257,13 +257,13 @@ class TestArgf < Test::Unit::TestCase def test_inplace_nonascii ext = Encoding.default_external or - skip "no default external encoding" + omit "no default external encoding" t = nil ["\u{3042}", "\u{e9}"].any? do |n| t = make_tempfile(n.encode(ext)) rescue Encoding::UndefinedConversionError end - t or skip "no name to test" + t or omit "no name to test" assert_in_out_err(["-i.bak", "-", t.path], "#{<<~"{#"}\n#{<<~'};'}") {# diff --git a/test/ruby/test_array.rb b/test/ruby/test_array.rb index a97a9c2558..b100cf334c 100644 --- a/test/ruby/test_array.rb +++ b/test/ruby/test_array.rb @@ -3270,7 +3270,7 @@ class TestArray < Test::Unit::TestCase end EOS rescue Timeout::Error => e - skip e.message + omit e.message end end diff --git a/test/ruby/test_bignum.rb b/test/ruby/test_bignum.rb index 3ffe7114b5..53a2b20cc8 100644 --- a/test/ruby/test_bignum.rb +++ b/test/ruby/test_bignum.rb @@ -644,7 +644,7 @@ class TestBignum < Test::Unit::TestCase thread.raise thread.join time = Time.now - time - skip "too fast cpu" if end_flag + omit "too fast cpu" if end_flag assert_operator(time, :<, 10) end @@ -675,7 +675,7 @@ class TestBignum < Test::Unit::TestCase return end end - skip "cannot create suitable test case" + omit "cannot create suitable test case" ensure Signal.trap(:INT, oldtrap) if oldtrap end diff --git a/test/ruby/test_complex2.rb b/test/ruby/test_complex2.rb index 594fc3f45a..b89e83efb2 100644 --- a/test/ruby/test_complex2.rb +++ b/test/ruby/test_complex2.rb @@ -4,7 +4,7 @@ require 'test/unit' class Complex_Test2 < Test::Unit::TestCase def test_kumi - skip unless defined?(Rational) + omit unless defined?(Rational) assert_equal(Complex(1, 0), +Complex(1, 0)) assert_equal(Complex(-1, 0), -Complex(1, 0)) diff --git a/test/ruby/test_complexrational.rb b/test/ruby/test_complexrational.rb index bf4e2b1809..31d11fe317 100644 --- a/test/ruby/test_complexrational.rb +++ b/test/ruby/test_complexrational.rb @@ -4,7 +4,7 @@ require 'test/unit' class ComplexRational_Test < Test::Unit::TestCase def test_rat_srat - skip unless defined?(Rational) + omit unless defined?(Rational) c = SimpleRat(1,3) cc = Rational(3,2) @@ -89,7 +89,7 @@ class ComplexRational_Test < Test::Unit::TestCase end def test_comp_srat - skip unless defined?(Rational) + omit unless defined?(Rational) c = Complex(SimpleRat(2,3),SimpleRat(1,2)) cc = Complex(Rational(3,2),Rational(2,1)) diff --git a/test/ruby/test_default_gems.rb b/test/ruby/test_default_gems.rb index 3c4aea1561..467e5ecf83 100644 --- a/test/ruby/test_default_gems.rb +++ b/test/ruby/test_default_gems.rb @@ -4,7 +4,7 @@ require 'rubygems' class TestDefaultGems < Test::Unit::TestCase def test_validate_gemspec - skip "git not found" unless system("git", "rev-parse", %i[out err]=>IO::NULL) + omit "git not found" unless system("git", "rev-parse", %i[out err]=>IO::NULL) srcdir = File.expand_path('../../..', __FILE__) Dir.glob("#{srcdir}/{lib,ext}/**/*.gemspec").map do |src| assert_nothing_raised do diff --git a/test/ruby/test_dir.rb b/test/ruby/test_dir.rb index 9474c6e927..514c6e5921 100644 --- a/test/ruby/test_dir.rb +++ b/test/ruby/test_dir.rb @@ -152,7 +152,7 @@ class TestDir < Test::Unit::TestCase end def test_chroot_nodir - skip if RUBY_PLATFORM =~ /android/ + omit if RUBY_PLATFORM =~ /android/ assert_raise(NotImplementedError, Errno::ENOENT, Errno::EPERM ) { Dir.chroot(File.join(@nodir, "")) } end @@ -490,9 +490,9 @@ class TestDir < Test::Unit::TestCase def test_glob_legacy_short_name bug10819 = '[ruby-core:67954] [Bug #10819]' bug11206 = '[ruby-core:69435] [Bug #11206]' - skip unless /\A\w:/ =~ ENV["ProgramFiles"] + omit unless /\A\w:/ =~ ENV["ProgramFiles"] short = "#$&/PROGRA~1" - skip unless File.directory?(short) + omit unless File.directory?(short) entries = Dir.glob("#{short}/Common*") assert_not_empty(entries, bug10819) long = File.expand_path(short) diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 4ddd6011b9..2985f75fd6 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -561,7 +561,7 @@ end.join end def test_ensure_after_nomemoryerror - skip "Forcing NoMemoryError causes problems in some environments" + omit "Forcing NoMemoryError causes problems in some environments" assert_separately([], "$_ = 'a' * 1_000_000_000_000_000_000") rescue NoMemoryError assert_raise(NoMemoryError) do @@ -1064,7 +1064,7 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| end def test_warn_deprecated_backwards_compatibility_category - skip "no method to test" + omit "no method to test" warning = capture_warning_warn { } @@ -1072,7 +1072,7 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| end def test_warn_deprecated_category - skip "no method to test" + omit "no method to test" warning = capture_warning_warn(category: true) { } diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index 3aad5dd09c..83717651ea 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -34,7 +34,7 @@ class TestFiber < Test::Unit::TestCase end def test_many_fibers - skip 'This is unstable on GitHub Actions --jit-wait. TODO: debug it' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit 'This is unstable on GitHub Actions --jit-wait. TODO: debug it' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? max = 1000 assert_equal(max, max.times{ Fiber.new{} @@ -381,7 +381,7 @@ class TestFiber < Test::Unit::TestCase def test_fork_from_fiber - skip 'fork not supported' unless Process.respond_to?(:fork) + omit 'fork not supported' unless Process.respond_to?(:fork) pid = nil bug5700 = '[ruby-core:41456]' assert_nothing_raised(bug5700) do diff --git a/test/ruby/test_file.rb b/test/ruby/test_file.rb index d570b6f6fb..905416911a 100644 --- a/test/ruby/test_file.rb +++ b/test/ruby/test_file.rb @@ -273,7 +273,7 @@ class TestFile < Test::Unit::TestCase begin File.symlink(tst, a) rescue Errno::EACCES, Errno::EPERM - skip "need privilege" + omit "need privilege" end assert_equal(File.join(realdir, tst), File.realpath(a)) File.unlink(a) @@ -317,7 +317,7 @@ class TestFile < Test::Unit::TestCase Dir.mktmpdir('rubytest-realpath') {|tmpdir| Dir.chdir(tmpdir) do Dir.mkdir('foo') - skip "cannot run mklink" unless system('mklink /j bar foo > nul') + omit "cannot run mklink" unless system('mklink /j bar foo > nul') assert_equal(File.realpath('foo'), File.realpath('bar')) end } @@ -475,11 +475,11 @@ class TestFile < Test::Unit::TestCase begin io = File.open(tmpdir, File::RDWR | File::TMPFILE) rescue Errno::EINVAL - skip 'O_TMPFILE not supported (EINVAL)' + omit 'O_TMPFILE not supported (EINVAL)' rescue Errno::EISDIR - skip 'O_TMPFILE not supported (EISDIR)' + omit 'O_TMPFILE not supported (EISDIR)' rescue Errno::EOPNOTSUPP - skip 'O_TMPFILE not supported (EOPNOTSUPP)' + omit 'O_TMPFILE not supported (EOPNOTSUPP)' end io.write "foo" diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb index 03675eaebc..2b274862c0 100644 --- a/test/ruby/test_file_exhaustive.rb +++ b/test/ruby/test_file_exhaustive.rb @@ -640,7 +640,7 @@ class TestFileExhaustive < Test::Unit::TestCase end def test_birthtime - skip if RUBY_PLATFORM =~ /android/ + omit if RUBY_PLATFORM =~ /android/ [regular_file, utf8_file].each do |file| t1 = File.birthtime(file) t2 = File.open(file) {|f| f.birthtime} @@ -773,7 +773,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_readlink_junction base = File.basename(nofile) err = IO.popen(%W"cmd.exe /c mklink /j #{base} .", chdir: @dir, err: %i[child out], &:read) - skip err unless $?.success? + omit err unless $?.success? assert_equal(@dir, File.readlink(nofile)) end @@ -1119,7 +1119,7 @@ class TestFileExhaustive < Test::Unit::TestCase def test_expand_path_for_existent_username user = ENV['USER'] - skip "ENV['USER'] is not set" unless user + omit "ENV['USER'] is not set" unless user assert_equal(ENV['HOME'], File.expand_path("~#{user}")) end unless DRIVE diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index baf9971c48..b7f906bbdd 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -54,7 +54,7 @@ class TestGc < Test::Unit::TestCase def test_start_full_mark return unless use_rgengc? - skip 'stress' if GC.stress + omit 'stress' if GC.stress 3.times { GC.start } # full mark and next time it should be minor mark GC.start(full_mark: false) @@ -65,7 +65,7 @@ class TestGc < Test::Unit::TestCase end def test_start_immediate_sweep - skip 'stress' if GC.stress + omit 'stress' if GC.stress GC.start(immediate_sweep: false) assert_equal false, GC.latest_gc_info(:immediate_sweep) @@ -117,7 +117,7 @@ class TestGc < Test::Unit::TestCase end def test_stat_single - skip 'stress' if GC.stress + omit 'stress' if GC.stress stat = GC.stat assert_equal stat[:count], GC.stat(:count) @@ -125,7 +125,7 @@ class TestGc < Test::Unit::TestCase end def test_stat_constraints - skip 'stress' if GC.stress + omit 'stress' if GC.stress stat = GC.stat assert_equal stat[:total_allocated_pages], stat[:heap_allocated_pages] + stat[:total_freed_pages] @@ -140,7 +140,7 @@ class TestGc < Test::Unit::TestCase end def test_latest_gc_info - skip 'stress' if GC.stress + omit 'stress' if GC.stress assert_separately %w[--disable-gem], __FILE__, __LINE__, <<-'eom' GC.start @@ -280,7 +280,7 @@ class TestGc < Test::Unit::TestCase end def test_profiler_clear - skip "for now" + omit "for now" assert_separately %w[--disable-gem], __FILE__, __LINE__, <<-'eom', timeout: 30 GC::Profiler.enable diff --git a/test/ruby/test_gc_compact.rb b/test/ruby/test_gc_compact.rb index 42ad028530..50abd28ad3 100644 --- a/test/ruby/test_gc_compact.rb +++ b/test/ruby/test_gc_compact.rb @@ -11,7 +11,7 @@ end class TestGCCompact < Test::Unit::TestCase module SupportsCompact def setup - skip "autocompact not supported on this platform" unless supports_auto_compact? + omit "autocompact not supported on this platform" unless supports_auto_compact? super end @@ -78,7 +78,7 @@ class TestGCCompact < Test::Unit::TestCase n.times do break if count < GC.stat(:compact_count) list2 << Object.new - end and skip "implicit compaction didn't happen within #{n} objects" + end and omit "implicit compaction didn't happen within #{n} objects" compact_stats = GC.latest_compact_info refute_predicate compact_stats[:considered], :empty? refute_predicate compact_stats[:moved], :empty? @@ -92,7 +92,7 @@ class TestGCCompact < Test::Unit::TestCase end def setup - skip "autocompact not supported on this platform" unless supports_auto_compact? + omit "autocompact not supported on this platform" unless supports_auto_compact? super end diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 4f54052d3b..ed0198321d 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -655,8 +655,8 @@ class TestIO < Test::Unit::TestCase if have_nonblock? def test_copy_stream_no_busy_wait - skip "MJIT has busy wait on GC. This sometimes fails with --jit." if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? - skip "multiple threads already active" if Thread.list.size > 1 + omit "MJIT has busy wait on GC. This sometimes fails with --jit." if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit "multiple threads already active" if Thread.list.size > 1 msg = 'r58534 [ruby-core:80969] [Backport #13533]' IO.pipe do |r,w| @@ -675,7 +675,7 @@ class TestIO < Test::Unit::TestCase begin w2.nonblock = true rescue Errno::EBADF - skip "nonblocking IO for pipe is not implemented" + omit "nonblocking IO for pipe is not implemented" end s = w2.syswrite("a" * 100000) t = Thread.new { sleep 0.1; r2.read } @@ -779,7 +779,7 @@ class TestIO < Test::Unit::TestCase r1.nonblock = true w2.nonblock = true rescue Errno::EBADF - skip "nonblocking IO for pipe is not implemented" + omit "nonblocking IO for pipe is not implemented" end t1 = Thread.new { w1 << megacontent; w1.close } t2 = Thread.new { r2.read } @@ -843,7 +843,7 @@ class TestIO < Test::Unit::TestCase assert_equal("bcd", r.read) end) rescue NotImplementedError - skip "pread(2) is not implemtented." + omit "pread(2) is not implemtented." end } end @@ -947,7 +947,7 @@ class TestIO < Test::Unit::TestCase begin s1.nonblock = true rescue Errno::EBADF - skip "nonblocking IO for pipe is not implemented" + omit "nonblocking IO for pipe is not implemented" end t1 = Thread.new { s2.read } t2 = Thread.new { @@ -971,7 +971,7 @@ class TestIO < Test::Unit::TestCase begin s1.nonblock = true rescue Errno::EBADF - skip "nonblocking IO for pipe is not implemented" + omit "nonblocking IO for pipe is not implemented" end trapping_usr2 do |rd| nr = 30 @@ -1631,7 +1631,7 @@ class TestIO < Test::Unit::TestCase end if have_nonblock? def test_read_nonblock_no_exceptions - skip '[ruby-core:90895] MJIT worker may leave fd open in a forked child' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # TODO: consider acquiring GVL from MJIT worker. + omit '[ruby-core:90895] MJIT worker may leave fd open in a forked child' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? # TODO: consider acquiring GVL from MJIT worker. with_pipe {|r, w| assert_equal :wait_readable, r.read_nonblock(4096, exception: false) w.puts "HI!" @@ -2279,7 +2279,7 @@ class TestIO < Test::Unit::TestCase def test_autoclose_true_closed_by_finalizer # http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1465760 # http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1469765 - skip 'this randomly fails with MJIT' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit 'this randomly fails with MJIT' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? feature2250 = '[ruby-core:26222]' pre = 'ft2250' @@ -2291,7 +2291,7 @@ class TestIO < Test::Unit::TestCase t.close rescue Errno::EBADF end - skip "expect IO object was GC'ed but not recycled yet" + omit "expect IO object was GC'ed but not recycled yet" rescue WeakRef::RefError assert_raise(Errno::EBADF, feature2250) {t.close} end @@ -2307,7 +2307,7 @@ class TestIO < Test::Unit::TestCase begin w.close t.close - skip "expect IO object was GC'ed but not recycled yet" + omit "expect IO object was GC'ed but not recycled yet" rescue WeakRef::RefError assert_nothing_raised(Errno::EBADF, feature2250) {t.close} end @@ -2670,7 +2670,7 @@ class TestIO < Test::Unit::TestCase end def test_puts_parallel - skip "not portable" + omit "not portable" pipe(proc do |w| threads = [] 100.times do @@ -3304,7 +3304,7 @@ __END__ begin f = File.open('/dev/tty') rescue Errno::ENOENT, Errno::ENXIO => e - skip e.message + omit e.message else tiocgwinsz=0x5413 winsize="" @@ -3430,10 +3430,10 @@ __END__ with_pipe do |r,w| # Linux 2.6.15 and earlier returned EINVAL instead of ESPIPE assert_raise(Errno::ESPIPE, Errno::EINVAL) { - r.advise(:willneed) or skip "fadvise(2) is not implemented" + r.advise(:willneed) or omit "fadvise(2) is not implemented" } assert_raise(Errno::ESPIPE, Errno::EINVAL) { - w.advise(:willneed) or skip "fadvise(2) is not implemented" + w.advise(:willneed) or omit "fadvise(2) is not implemented" } end end if /linux/ =~ RUBY_PLATFORM @@ -3573,14 +3573,14 @@ __END__ f.write('1') pos = f.tell rescue Errno::ENOSPC - skip "non-sparse file system" + omit "non-sparse file system" rescue SystemCallError else assert_equal(0x1_0000_0000, pos, msg) end end; rescue Timeout::Error - skip "Timeout because of slow file writing" + omit "Timeout because of slow file writing" end } end if /mswin|mingw/ =~ RUBY_PLATFORM diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index 1ee41e6e81..2a18ff02e1 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -539,7 +539,7 @@ class TestISeq < Test::Unit::TestCase bin = assert_nothing_raised(mesg) do iseq.to_binary rescue RuntimeError => e - skip e.message if /compile with coverage/ =~ e.message + omit e.message if /compile with coverage/ =~ e.message raise end 10.times do diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index 07ac76210d..3e3da24641 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -64,7 +64,7 @@ class TestJIT < Test::Unit::TestCase def setup unless JITSupport.supported? - skip 'JIT seems not supported on this platform' + omit 'JIT seems not supported on this platform' end self.class.setup end @@ -321,7 +321,7 @@ class TestJIT < Test::Unit::TestCase end def test_compile_insn_reput - skip "write test" + omit "write test" end def test_compile_insn_setn @@ -352,11 +352,11 @@ class TestJIT < Test::Unit::TestCase end def test_compile_insn_tracecoverage - skip "write test" + omit "write test" end def test_compile_insn_defineclass - skip "support this in mjit_compile (low priority)" + omit "support this in mjit_compile (low priority)" end def test_compile_insn_send @@ -709,7 +709,7 @@ class TestJIT < Test::Unit::TestCase if RUBY_PLATFORM.match?(/mswin/) # "Permission Denied" error is preventing to remove so file on AppVeyor/RubyCI. - skip 'Removing so file is randomly failing on AppVeyor/RubyCI mswin due to Permission Denied.' + omit 'Removing so file is randomly failing on AppVeyor/RubyCI mswin due to Permission Denied.' else # verify .c files are deleted on unload_units assert_send([Dir, :empty?, dir], debug_info) @@ -996,7 +996,7 @@ class TestJIT < Test::Unit::TestCase def test_clean_so if RUBY_PLATFORM.match?(/mswin/) - skip 'Removing so file is randomly failing on AppVeyor/RubyCI mswin due to Permission Denied.' + omit 'Removing so file is randomly failing on AppVeyor/RubyCI mswin due to Permission Denied.' end Dir.mktmpdir("jit_test_clean_so_") do |dir| code = "x = 0; 10.times {|i|x+=i}" @@ -1010,7 +1010,7 @@ class TestJIT < Test::Unit::TestCase def test_clean_objects_on_exec if /mswin|mingw/ =~ RUBY_PLATFORM # TODO: check call stack and close handle of code which is not on stack, and remove objects on best-effort basis - skip 'Removing so file being used does not work on Windows' + omit 'Removing so file being used does not work on Windows' end Dir.mktmpdir("jit_test_clean_objects_on_exec_") do |dir| eval_with_jit({"TMPDIR"=>dir}, "#{<<~"begin;"}\n#{<<~"end;"}", min_calls: 1) diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index c793520ac4..c00bf59e18 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -300,7 +300,7 @@ class TestM17N < Test::Unit::TestCase orig_int, Encoding.default_internal = Encoding.default_internal, nil orig_ext = Encoding.default_external - skip "https://bugs.ruby-lang.org/issues/18338" + omit "https://bugs.ruby-lang.org/issues/18338" o = Object.new diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb index d6de330dff..0da69fd4e4 100644 --- a/test/ruby/test_method.rb +++ b/test/ruby/test_method.rb @@ -1207,7 +1207,7 @@ class TestMethod < Test::Unit::TestCase def test_splat_long_array if File.exist?('/etc/os-release') && File.read('/etc/os-release').include?('openSUSE Leap') # For RubyCI's openSUSE machine http://rubyci.s3.amazonaws.com/opensuseleap/ruby-trunk/recent.html, which tends to die with NoMemoryError here. - skip 'do not exhaust memory on RubyCI openSUSE Leap machine' + omit 'do not exhaust memory on RubyCI openSUSE Leap machine' end n = 10_000_000 assert_equal n , rest_parameter(*(1..n)).size, '[Feature #10440]' diff --git a/test/ruby/test_optimization.rb b/test/ruby/test_optimization.rb index 43795d150c..80c3c3860b 100644 --- a/test/ruby/test_optimization.rb +++ b/test/ruby/test_optimization.rb @@ -510,7 +510,7 @@ class TestRubyOptimization < Test::Unit::TestCase end def test_tailcall_not_to_grow_stack - skip 'currently JIT-ed code always creates a new stack frame' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + omit 'currently JIT-ed code always creates a new stack frame' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? bug16161 = '[ruby-core:94881]' tailcall("#{<<-"begin;"}\n#{<<~"end;"}") diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 91d554ea32..c4888598a8 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -169,7 +169,7 @@ class TestProcess < Test::Unit::TestCase end def test_execopts_pgroup - skip "system(:pgroup) is not supported" if windows? + omit "system(:pgroup) is not supported" if windows? assert_nothing_raised { system(*TRUECOMMAND, :pgroup=>false) } io = IO.popen([RUBY, "-e", "print Process.getpgrp"]) @@ -511,7 +511,7 @@ class TestProcess < Test::Unit::TestCase UMASK = [RUBY, '-e', 'printf "%04o\n", File.umask'] def test_execopts_umask - skip "umask is not supported" if windows? + omit "umask is not supported" if windows? IO.popen([*UMASK, :umask => 0]) {|io| assert_equal("0000", io.read.chomp) } @@ -837,7 +837,7 @@ class TestProcess < Test::Unit::TestCase STDERR=>"out", STDOUT=>[:child, STDERR]) assert_equal("errout", File.read("out")) - skip "inheritance of fd other than stdin,stdout and stderr is not supported" if windows? + omit "inheritance of fd other than stdin,stdout and stderr is not supported" if windows? Process.wait spawn(RUBY, "-e", "STDERR.print 'err'; STDOUT.print 'out'", STDOUT=>"out", STDERR=>[:child, 3], @@ -889,7 +889,7 @@ class TestProcess < Test::Unit::TestCase end def test_execopts_popen_extra_fd - skip "inheritance of fd other than stdin,stdout and stderr is not supported" if windows? + omit "inheritance of fd other than stdin,stdout and stderr is not supported" if windows? with_tmpchdir {|d| with_pipe {|r, w| IO.popen([RUBY, '-e', 'IO.new(3, "w").puts("a"); puts "b"', 3=>w]) {|io| @@ -918,7 +918,7 @@ class TestProcess < Test::Unit::TestCase end def test_fd_inheritance - skip "inheritance of fd other than stdin,stdout and stderr is not supported" if windows? + omit "inheritance of fd other than stdin,stdout and stderr is not supported" if windows? with_pipe {|r, w| system(RUBY, '-e', 'IO.new(ARGV[0].to_i, "w").puts(:ba)', w.fileno.to_s, w=>w) w.close @@ -964,7 +964,7 @@ class TestProcess < Test::Unit::TestCase end def test_execopts_close_others - skip "inheritance of fd other than stdin,stdout and stderr is not supported" if windows? + omit "inheritance of fd other than stdin,stdout and stderr is not supported" if windows? with_tmpchdir {|d| with_pipe {|r, w| system(RUBY, '-e', 'STDERR.reopen("err", "w"); IO.new(ARGV[0].to_i, "w").puts("ma")', w.fileno.to_s, :close_others=>true) @@ -1058,7 +1058,7 @@ class TestProcess < Test::Unit::TestCase } } rescue NotImplementedError - skip "IO#close_on_exec= is not supported" + omit "IO#close_on_exec= is not supported" end end unless windows? # passing non-stdio fds is not supported on Windows @@ -1610,7 +1610,7 @@ class TestProcess < Test::Unit::TestCase else assert_kind_of(Integer, max) assert_predicate(max, :positive?) - skip "not limited to NGROUPS_MAX" if /darwin/ =~ RUBY_PLATFORM + omit "not limited to NGROUPS_MAX" if /darwin/ =~ RUBY_PLATFORM gs = Process.groups assert_operator(gs.size, :<=, max) gs[0] ||= 0 @@ -1637,7 +1637,7 @@ class TestProcess < Test::Unit::TestCase end def test_setegid - skip "root can use Process.egid on Android platform" if RUBY_PLATFORM =~ /android/ + omit "root can use Process.egid on Android platform" if RUBY_PLATFORM =~ /android/ assert_nothing_raised(TypeError) {Process.egid += 0} rescue NotImplementedError end @@ -1698,7 +1698,7 @@ class TestProcess < Test::Unit::TestCase if /freebsd|openbsd/ =~ RUBY_PLATFORM # this relates #4173 # When ruby can use 2 cores, signal and wait4 may miss the signal. - skip "this fails on FreeBSD and OpenBSD on multithreaded environment" + omit "this fails on FreeBSD and OpenBSD on multithreaded environment" end signal_received = [] IO.pipe do |sig_r, sig_w| @@ -1733,7 +1733,7 @@ class TestProcess < Test::Unit::TestCase def test_no_curdir if /solaris/i =~ RUBY_PLATFORM - skip "Temporary skip to avoid CI failures after commit to use realpath on required files" + omit "Temporary omit to avoid CI failures after commit to use realpath on required files" end with_tmpchdir {|d| Dir.mkdir("vd") @@ -1775,7 +1775,7 @@ class TestProcess < Test::Unit::TestCase def test_aspawn_too_long_path if /solaris/i =~ RUBY_PLATFORM && !defined?(Process::RLIMIT_NPROC) - skip "Too exhaustive test on platforms without Process::RLIMIT_NPROC such as Solaris 10" + omit "Too exhaustive test on platforms without Process::RLIMIT_NPROC such as Solaris 10" end bug4315 = '[ruby-core:34833] #7904 [ruby-core:52628] #11613' assert_fail_too_long_path(%w"echo |", bug4315) @@ -1958,7 +1958,7 @@ class TestProcess < Test::Unit::TestCase end def test_execopts_uid - skip "root can use uid option of Kernel#system on Android platform" if RUBY_PLATFORM =~ /android/ + omit "root can use uid option of Kernel#system on Android platform" if RUBY_PLATFORM =~ /android/ feature6975 = '[ruby-core:47414]' [30000, [Process.uid, ENV["USER"]]].each do |uid, user| @@ -1989,8 +1989,8 @@ class TestProcess < Test::Unit::TestCase end def test_execopts_gid - skip "Process.groups not implemented on Windows platform" if windows? - skip "root can use Process.groups on Android platform" if RUBY_PLATFORM =~ /android/ + omit "Process.groups not implemented on Windows platform" if windows? + omit "root can use Process.groups on Android platform" if RUBY_PLATFORM =~ /android/ feature6975 = '[ruby-core:47414]' groups = Process.groups.map do |g| @@ -2511,7 +2511,7 @@ EOS end def test_forked_child_handles_signal - skip "fork not supported" unless Process.respond_to?(:fork) + omit "fork not supported" unless Process.respond_to?(:fork) assert_normal_exit(<<-"end;", '[ruby-core:82883] [Bug #13916]') require 'timeout' pid = fork { sleep } diff --git a/test/ruby/test_refinement.rb b/test/ruby/test_refinement.rb index e409abe6ca..202da13645 100644 --- a/test/ruby/test_refinement.rb +++ b/test/ruby/test_refinement.rb @@ -225,7 +225,7 @@ class TestRefinement < Test::Unit::TestCase end end def test_method_should_use_refinements - skip if Test::Unit::Runner.current_repeat_count > 0 + omit if Test::Unit::Runner.current_repeat_count > 0 foo = Foo.new assert_raise(NameError) { foo.method(:z) } @@ -248,7 +248,7 @@ class TestRefinement < Test::Unit::TestCase end end def test_instance_method_should_use_refinements - skip if Test::Unit::Runner.current_repeat_count > 0 + omit if Test::Unit::Runner.current_repeat_count > 0 foo = Foo.new assert_raise(NameError) { Foo.instance_method(:z) } @@ -819,7 +819,7 @@ class TestRefinement < Test::Unit::TestCase def test_prepend_after_refine_wb_miss if /\A(arm|mips)/ =~ RUBY_PLATFORM - skip "too slow cpu" + omit "too slow cpu" end assert_normal_exit %Q{ GC.stress = true diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index 77cdae64d9..5a24cb1ba5 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -93,7 +93,7 @@ class TestRequire < Test::Unit::TestCase begin require_path = File.join(tmp, dir, 'foo.rb').encode(encoding) rescue - skip "cannot convert path encoding to #{encoding}" + omit "cannot convert path encoding to #{encoding}" end Dir.mkdir(File.dirname(require_path)) open(require_path, "wb") {|f| f.puts '$:.push __FILE__'} @@ -175,7 +175,7 @@ class TestRequire < Test::Unit::TestCase t.close path = File.expand_path(t.path).sub(/\A(\w):/, '//127.0.0.1/\1$') - skip "local drive #$1: is not shared" unless File.exist?(path) + omit "local drive #$1: is not shared" unless File.exist?(path) args = ['--disable-gems', "-I#{File.dirname(path)}"] assert_in_out_err(args, "#{<<~"END;"}", [path], []) begin @@ -460,7 +460,7 @@ class TestRequire < Test::Unit::TestCase result = IO.popen([EnvUtil.rubybin, "b/tst.rb"], &:read) assert_equal("a/lib.rb\n", result, "[ruby-dev:40040]") rescue NotImplementedError, Errno::EACCES - skip "File.symlink is not implemented" + omit "File.symlink is not implemented" end } } @@ -486,7 +486,7 @@ class TestRequire < Test::Unit::TestCase result = IO.popen([EnvUtil.rubybin, "c.rb"], &:read) assert_equal("1", result, "bug17885 [ruby-core:104010]") rescue NotImplementedError, Errno::EACCES - skip "File.symlink is not implemented" + omit "File.symlink is not implemented" end } } @@ -850,7 +850,7 @@ class TestRequire < Test::Unit::TestCase end if File.respond_to?(:mkfifo) def test_loading_fifo_fd_leak - skip if RUBY_PLATFORM =~ /android/ # https://rubyci.org/logs/rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200419T124100Z.fail.html.gz + omit if RUBY_PLATFORM =~ /android/ # https://rubyci.org/logs/rubyci.s3.amazonaws.com/android29-x86_64/ruby-master/log/20200419T124100Z.fail.html.gz Tempfile.create(%w'fifo .rb') {|f| f.close @@ -911,7 +911,7 @@ class TestRequire < Test::Unit::TestCase begin File.symlink "real", File.join(tmp, "symlink") rescue NotImplementedError, Errno::EACCES - skip "File.symlink is not implemented" + omit "File.symlink is not implemented" end File.write(File.join(tmp, "real/test_symlink_load_path.rb"), "print __FILE__") result = IO.popen([EnvUtil.rubybin, "-I#{tmp}/symlink", "-e", "require 'test_symlink_load_path.rb'"], &:read) diff --git a/test/ruby/test_require_lib.rb b/test/ruby/test_require_lib.rb index 6b2846c8fd..95fa3f29e1 100644 --- a/test/ruby/test_require_lib.rb +++ b/test/ruby/test_require_lib.rb @@ -18,7 +18,7 @@ class TestRequireLib < Test::Unit::TestCase begin require #{lib.dump} rescue Exception - skip $! + omit $! end assert_equal n, Thread.list.size end; diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 665d93fc16..c3dbef1b5e 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -674,7 +674,7 @@ class TestRubyOptions < Test::Unit::TestCase end def test_set_program_name - skip "platform dependent feature" unless defined?(PSCMD) and PSCMD + omit "platform dependent feature" unless defined?(PSCMD) and PSCMD with_tmpchdir do write_file("test-script", "$0 = 'hello world'; /test-script/ =~ Process.argv0 or $0 = 'Process.argv0 changed!'; sleep 60") @@ -697,7 +697,7 @@ class TestRubyOptions < Test::Unit::TestCase end def test_setproctitle - skip "platform dependent feature" unless defined?(PSCMD) and PSCMD + omit "platform dependent feature" unless defined?(PSCMD) and PSCMD assert_separately([], "#{<<-"{#"}\n#{<<-'};'}") {# @@ -772,7 +772,7 @@ class TestRubyOptions < Test::Unit::TestCase end def assert_segv(args, message=nil) - skip if ENV['RUBY_ON_BUG'] + omit if ENV['RUBY_ON_BUG'] test_stdin = "" opt = SEGVTest::ExecOptions.dup @@ -857,7 +857,7 @@ class TestRubyOptions < Test::Unit::TestCase Process.wait pid } rescue RuntimeError - skip $! + omit $! end } assert_equal("", result, '[ruby-dev:37798]') @@ -907,7 +907,7 @@ class TestRubyOptions < Test::Unit::TestCase name = c.chr(Encoding::UTF_8) expected = name.encode("locale") rescue nil } - skip "can't make locale name" + omit "can't make locale name" end name << ".rb" expected << ".rb" @@ -1115,7 +1115,7 @@ class TestRubyOptions < Test::Unit::TestCase end def test_null_script - skip "#{IO::NULL} is not a character device" unless File.chardev?(IO::NULL) + omit "#{IO::NULL} is not a character device" unless File.chardev?(IO::NULL) assert_in_out_err([IO::NULL], success: true) end diff --git a/test/ruby/test_rubyvm_jit.rb b/test/ruby/test_rubyvm_jit.rb index a3558d791c..5449c6226d 100644 --- a/test/ruby/test_rubyvm_jit.rb +++ b/test/ruby/test_rubyvm_jit.rb @@ -9,7 +9,7 @@ class TestRubyVMJIT < Test::Unit::TestCase def setup unless JITSupport.supported? - skip 'JIT seems not supported on this platform' + omit 'JIT seems not supported on this platform' end end diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index c25debb38e..e973e3a384 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -2371,7 +2371,7 @@ CODE } assert_equal [], events, 'script_compiled event should not be invoked on compile error' - skip "TODO: test for requires" + omit "TODO: test for requires" events.clear tp.enable{ diff --git a/test/ruby/test_signal.rb b/test/ruby/test_signal.rb index a62537d59d..1af40e9c5b 100644 --- a/test/ruby/test_signal.rb +++ b/test/ruby/test_signal.rb @@ -323,7 +323,7 @@ class TestSignal < Test::Unit::TestCase end def test_sigchld_ignore - skip 'no SIGCHLD' unless Signal.list['CHLD'] + omit 'no SIGCHLD' unless Signal.list['CHLD'] old = trap(:CHLD, 'IGNORE') cmd = [ EnvUtil.rubybin, '--disable=gems', '-e' ] assert(system(*cmd, 'exit!(0)'), 'no ECHILD') diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index ddfeb8b7a8..2c91eca583 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -500,7 +500,7 @@ class TestThread < Test::Unit::TestCase def test_ignore_deadlock if /mswin|mingw/ =~ RUBY_PLATFORM - skip "can't trap a signal from another process on Windows" + omit "can't trap a signal from another process on Windows" end assert_in_out_err([], <<-INPUT, %w(false :sig), [], :signal=>:INT, timeout: 1, timeout_error: nil) p Thread.ignore_deadlock @@ -731,7 +731,7 @@ class TestThread < Test::Unit::TestCase end def test_no_valid_cfp - skip 'with win32ole, cannot run this testcase because win32ole redefines Thread#initialize' if defined?(WIN32OLE) + omit 'with win32ole, cannot run this testcase because win32ole redefines Thread#initialize' if defined?(WIN32OLE) bug5083 = '[ruby-dev:44208]' assert_equal([], Thread.new(&Module.method(:nesting)).value, bug5083) assert_instance_of(Thread, Thread.new(:to_s, &Class.new.method(:undef_method)).join, bug5083) @@ -1256,7 +1256,7 @@ q.pop end if Process.respond_to?(:fork) def test_fork_while_parent_locked - skip 'needs fork' unless Process.respond_to?(:fork) + omit 'needs fork' unless Process.respond_to?(:fork) m = Thread::Mutex.new nr = 1 thrs = [] @@ -1277,7 +1277,7 @@ q.pop end def test_fork_while_mutex_locked_by_forker - skip 'needs fork' unless Process.respond_to?(:fork) + omit 'needs fork' unless Process.respond_to?(:fork) m = Thread::Mutex.new m.synchronize do pid = fork do @@ -1345,7 +1345,7 @@ q.pop end def test_thread_native_thread_id - skip "don't support native_thread_id" unless Thread.method_defined?(:native_thread_id) + omit "don't support native_thread_id" unless Thread.method_defined?(:native_thread_id) assert_instance_of Integer, Thread.main.native_thread_id th1 = Thread.start{sleep} @@ -1384,7 +1384,7 @@ q.pop def test_signal_at_join if /mswin|mingw/ =~ RUBY_PLATFORM - skip "can't trap a signal from another process on Windows" + omit "can't trap a signal from another process on Windows" # opt = {new_pgroup: true} end assert_separately([], "#{<<~"{#"}\n#{<<~'};'}", timeout: 120) diff --git a/test/ruby/test_thread_queue.rb b/test/ruby/test_thread_queue.rb index 3fa0eae2c1..69cb40711c 100644 --- a/test/ruby/test_thread_queue.rb +++ b/test/ruby/test_thread_queue.rb @@ -580,10 +580,10 @@ class TestThreadQueue < Test::Unit::TestCase def test_queue_with_trap if ENV['APPVEYOR'] == 'True' && RUBY_PLATFORM.match?(/mswin/) - skip 'This test fails too often on AppVeyor vs140' + omit 'This test fails too often on AppVeyor vs140' end if RUBY_PLATFORM.match?(/mingw/) - skip 'This test fails too often on MinGW' + omit 'This test fails too often on MinGW' end assert_in_out_err([], <<-INPUT, %w(INT INT exit), []) diff --git a/test/ruby/test_time.rb b/test/ruby/test_time.rb index 2fdf0c2010..445518ab57 100644 --- a/test/ruby/test_time.rb +++ b/test/ruby/test_time.rb @@ -116,7 +116,7 @@ class TestTime < Test::Unit::TestCase assert_equal(946684800, Time.utc(2000, 1, 1, 0, 0, 0).tv_sec) # Giveup to try 2nd test because some state is changed. - skip if Test::Unit::Runner.current_repeat_count > 0 + omit if Test::Unit::Runner.current_repeat_count > 0 assert_equal(0x7fffffff, Time.utc(2038, 1, 19, 3, 14, 7).tv_sec) assert_equal(0x80000000, Time.utc(2038, 1, 19, 3, 14, 8).tv_sec) @@ -1183,7 +1183,7 @@ class TestTime < Test::Unit::TestCase def test_2038 # Giveup to try 2nd test because some state is changed. - skip if Test::Unit::Runner.current_repeat_count > 0 + omit if Test::Unit::Runner.current_repeat_count > 0 if no_leap_seconds? assert_equal(0x80000000, Time.utc(2038, 1, 19, 3, 14, 8).tv_sec) @@ -1308,8 +1308,8 @@ class TestTime < Test::Unit::TestCase def test_memsize # Time objects are common in some code, try to keep them small - skip "Time object size test" if /^(?:i.?86|x86_64)-linux/ !~ RUBY_PLATFORM - skip "GC is in debug" if GC::INTERNAL_CONSTANTS[:DEBUG] + omit "Time object size test" if /^(?:i.?86|x86_64)-linux/ !~ RUBY_PLATFORM + omit "GC is in debug" if GC::INTERNAL_CONSTANTS[:DEBUG] require 'objspace' t = Time.at(0) size = GC::INTERNAL_CONSTANTS[:RVALUE_SIZE] @@ -1323,6 +1323,6 @@ class TestTime < Test::Unit::TestCase end assert_equal expect, ObjectSpace.memsize_of(t) rescue LoadError => e - skip "failed to load objspace: #{e.message}" + omit "failed to load objspace: #{e.message}" end end diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb index fdc9e114b5..6ae12dea5d 100644 --- a/test/ruby/test_time_tz.rb +++ b/test/ruby/test_time_tz.rb @@ -112,7 +112,7 @@ class TestTimeTZ < Test::Unit::TestCase t = with_tz("America/Los_Angeles") { Time.local(2000, 1, 1) } - skip "force_tz_test is false on this environment" unless t + omit "force_tz_test is false on this environment" unless t z1 = t.zone z2 = with_tz(tz="Asia/Singapore") { t.localtime.zone diff --git a/test/ruby/test_vm_dump.rb b/test/ruby/test_vm_dump.rb index 679ce94b91..9c06ec14fb 100644 --- a/test/ruby/test_vm_dump.rb +++ b/test/ruby/test_vm_dump.rb @@ -3,7 +3,7 @@ require 'test/unit' class TestVMDump < Test::Unit::TestCase def assert_darwin_vm_dump_works(args) - skip if RUBY_PLATFORM !~ /darwin/ + omit if RUBY_PLATFORM !~ /darwin/ assert_in_out_err(args, "", [], /^\[IMPORTANT\]/) end