From e000d687b3c964232974f2cdd9946ef8e01cf4b9 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 24 Dec 2014 13:25:28 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_gc.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 32b05a89f7..e9e4bdc75f 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -341,6 +341,7 @@ class TestGc < Test::Unit::TestCase 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 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