ruby1.9.1 (1.9.2.0-2) 100731_disable-tests.diff

Summary

 bootstraptest/test_io.rb     |   44 +++++++++++++++++++++----------------------
 bootstraptest/test_thread.rb |   30 ++++++++++++++---------------
 2 files changed, 37 insertions(+), 37 deletions(-)

    
download this patch

Patch contents

Author: Lucas Nussbaum <lucas@lucas-nussbaum.net>
Description: Disable two tests that are problematic on FreeBSD
Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=590002

First test is discussed in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=543805
and upstream bug http://redmine.ruby-lang.org/issues/show/2008

Second test is discussed in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542927
and upstream bug http://redmine.ruby-lang.org/issues/show/2025
It was fixed, but is now timing dependent.

--- a/bootstraptest/test_io.rb
+++ b/bootstraptest/test_io.rb
@@ -8,28 +8,28 @@ assert_finish 5, %q{
   w.write "a"
 }, '[ruby-dev:31866]'
 
-assert_finish 10, %q{
-  begin
-    require "io/nonblock"
-    require "timeout"
-    timeout(3) do
-      r, w = IO.pipe
-      w.nonblock?
-      w.nonblock = true
-      w.write_nonblock("a" * 100000)
-      w.nonblock = false
-      t1 = Thread.new { w.write("b" * 4096) }
-      t2 = Thread.new { w.write("c" * 4096) }
-      sleep 0.5
-      r.sysread(4096).length
-      sleep 0.5
-      r.sysread(4096).length
-      t1.join
-      t2.join
-    end
-  rescue LoadError, TimeoutError, NotImplementedError
-  end
-}, '[ruby-dev:32566]'
+#assert_finish 10, %q{
+#  begin
+#    require "io/nonblock"
+#    require "timeout"
+#    timeout(3) do
+#      r, w = IO.pipe
+#      w.nonblock?
+#      w.nonblock = true
+#      w.write_nonblock("a" * 100000)
+#      w.nonblock = false
+#      t1 = Thread.new { w.write("b" * 4096) }
+#      t2 = Thread.new { w.write("c" * 4096) }
+#      sleep 0.5
+#      r.sysread(4096).length
+#      sleep 0.5
+#      r.sysread(4096).length
+#      t1.join
+#      t2.join
+#    end
+#  rescue LoadError, TimeoutError, NotImplementedError
+#  end
+#}, '[ruby-dev:32566]'
 
 assert_finish 1, %q{
   r, w = IO.pipe
--- a/bootstraptest/test_thread.rb
+++ b/bootstraptest/test_thread.rb
@@ -216,21 +216,21 @@ assert_equal 'true', %{
   end
 }
 
-assert_equal 'ok', %{
-  open("zzz.rb", "w") do |f|
-    f.puts <<-END
-      begin
-        Thread.new { fork { GC.start } }.join
-        pid, status = Process.wait2
-        $result = status.success? ? :ok : :ng
-      rescue NotImplementedError
-        $result = :ok
-      end
-    END
-  end
-  require "./zzz.rb"
-  $result
-}
+#assert_equal 'ok', %{
+#  open("zzz.rb", "w") do |f|
+#    f.puts <<-END
+#      begin
+#        Thread.new { fork { GC.start } }.join
+#        pid, status = Process.wait2
+#        $result = status.success? ? :ok : :ng
+#      rescue NotImplementedError
+#        $result = :ok
+#      end
+#    END
+#  end
+#  require "./zzz.rb"
+#  $result
+#}
 
 assert_finish 3, %{
   th = Thread.new {sleep 2}