diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-30 01:58:13 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-30 01:58:13 +0000 |
commit | d8c053b139d8aefaa7a4dcda3ac233b63a8f3a9b (patch) | |
tree | e7f3d9f646554815be79b26ec19f80b3d606f2a2 | |
parent | f7cbd78bc802d65e3cfb88b515277bbbba498b0f (diff) | |
download | ruby-d8c053b139d8aefaa7a4dcda3ac233b63a8f3a9b.tar.gz |
show child and parent signal mask
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_gc.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 6f5aab5ced..c90e7f45e8 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -331,16 +331,27 @@ class TestGc < Test::Unit::TestCase 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 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 |