summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-24 13:25:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-24 13:25:28 +0000
commite000d687b3c964232974f2cdd9946ef8e01cf4b9 (patch)
tree2c08b60562ea1878920418374db48eaa52004e90 /test/ruby
parentb9b8f1ded2dbbfeba07347e53cdcd5f097de6ce6 (diff)
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
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_gc.rb6
1 files changed, 5 insertions, 1 deletions
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