[前][次][番号順一覧][スレッド一覧]

ruby-changes:40295

From: naruse <ko1@a...>
Date: Fri, 30 Oct 2015 10:58:34 +0900 (JST)
Subject: [ruby-changes:40295] naruse:r52376 (trunk): show child and parent signal mask

naruse	2015-10-30 10:58:13 +0900 (Fri, 30 Oct 2015)

  New Revision: 52376

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52376

  Log:
    show child and parent signal mask

  Modified files:
    trunk/test/ruby/test_gc.rb
Index: test/ruby/test_gc.rb
===================================================================
--- test/ruby/test_gc.rb	(revision 52375)
+++ test/ruby/test_gc.rb	(revision 52376)
@@ -331,16 +331,27 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L331
     end;
   end
 
+  def get_signal_info
+    if RUBY_PLATFORM.include?('solaris')
+      `/usr/bin/psig #{$$}`
+    elsif File.exist?('/proc/self/status')
+      IO.read('/proc/self/status')
+    else
+      ''
+    end
+  end
+
   def test_interrupt_in_finalizer
     bug10595 = '[ruby-core:66825] [Bug #10595]'
     src = <<-'end;'
       pid = $$
-      $stderr.puts `/usr/bin/psig #{$$}` if RUBY_PLATFORM.include?('solaris')
       Thread.start do
         10.times {
           sleep 0.1
           Process.kill("INT", pid) rescue break
         }
+        $stderr.puts `/usr/bin/psig #{$$}` if RUBY_PLATFORM.include?('solaris')
+        $stderr.puts IO.read('/proc/self/status') if File.exist?('/proc/self/status')
       end
       f = proc {1000.times {}}
       loop do
@@ -353,7 +364,7 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L364
     unless /mswin|mingw/ =~ RUBY_PLATFORM
       assert_equal("INT", Signal.signame(status.termsig), bug10595)
     end
-    assert_match(/Interrupt/, err.first, proc {err.join("\n")})
+    assert_match(/Interrupt/, err.first, proc {err.join("\n")}+get_signal_info)
     assert_empty(out)
   end
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]