ruby-changes:36893
From: nobu <ko1@a...>
Date: Wed, 24 Dec 2014 22:25:41 +0900 (JST)
Subject: [ruby-changes:36893] nobu:r48974 (trunk): test_gc.rb: termsig
nobu 2014-12-24 22:25:28 +0900 (Wed, 24 Dec 2014) New Revision: 48974 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48974 Log: test_gc.rb: termsig * test/ruby/test_gc.rb (test_interrupt_in_finalizer): also check termsig to ensure killed by SIGINT. and try SIGSEGV to dump something. Modified files: trunk/test/ruby/test_gc.rb Index: test/ruby/test_gc.rb =================================================================== --- test/ruby/test_gc.rb (revision 48973) +++ test/ruby/test_gc.rb (revision 48974) @@ -341,6 +341,7 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L341 Process.kill("INT", pid) rescue break } sleep 5 + Process.kill("SEGV", pid) rescue nil Process.kill("KILL", pid) rescue nil end f = proc {1000.times {}} @@ -348,7 +349,10 @@ class TestGc < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_gc.rb#L349 ObjectSpace.define_finalizer(Object.new, f) end end; - assert_in_out_err(["-e", src], "", [], /Interrupt/, bug10595) + status = assert_in_out_err(["-e", src], "", [], /Interrupt/, bug10595) + unless /mswin|mingw/ =~ RUBY_PLATFORM + assert_equal("INT", Signal.signame(status.termsig)) + end end def test_verify_internal_consistency -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/