aboutsummaryrefslogtreecommitdiffstats
path: root/test/runner.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-13 09:01:21 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-13 09:01:21 +0000
commit4945572f3cc6dcd55ffac4876ae23f27e19120ad (patch)
tree2531fc0c5d73a0488401366e7668f45bbf11853b /test/runner.rb
parentddae6a05d7442f25ac04eb3338ffa8a8b4895d3f (diff)
downloadruby-4945572f3cc6dcd55ffac4876ae23f27e19120ad.tar.gz
* vm_trace.c: add new method TracePoint.stat to debug
TracePoint mechanism. Ruby users should not use this method. So I don't note this method in the NEWS file. * test/runner.rb: detect zombie active TracePoints with TracePoint.stat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/runner.rb')
-rw-r--r--test/runner.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/runner.rb b/test/runner.rb
index 2956b85df8..e7bff26e8c 100644
--- a/test/runner.rb
+++ b/test/runner.rb
@@ -22,6 +22,12 @@ module Test::Unit
def after_teardown
super
assert_empty(Process.waitall)
+
+ # detect zombie traces.
+ TracePoint.stat.each{|key, (activated, deleted)|
+ assert_equal(0, activated, 'The number of active trace events should be zero.')
+ # puts "TracePoint - deleted: #{deleted}" if deleted > 0
+ }
end
end
class TestCase