From 4945572f3cc6dcd55ffac4876ae23f27e19120ad Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 13 Jun 2014 09:01:21 +0000 Subject: * 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 --- test/runner.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/runner.rb') 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 -- cgit v1.2.3