1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2014-12-24 13:25:28 +00:00
parent b9b8f1ded2
commit e000d687b3

View file

@ -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