aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 07:49:03 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 07:49:03 +0000
commit8ae178683f6abba8485573d7eb5dcc2232aee29c (patch)
treefff5bc099f5af9aace1214d925b0c6903039666a /test
parentfb89004a3bb6806b3b571a0592837c0d105e3e61 (diff)
downloadruby-8ae178683f6abba8485573d7eb5dcc2232aee29c.tar.gz
check a thread on TracePoint.
* test/ruby/test_settracefunc.rb: skip if TracePoint probes are invoked by non-main thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_settracefunc.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index c274a25cac..b5777d7e58 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -925,6 +925,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
bug7774 = '[ruby-dev:46908]'
src = %q{
tp = TracePoint.new(:raise) do |tp|
+ next unless target_thread?g
tp.binding
end
tp.enable do
@@ -1492,6 +1493,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
def test_tracepoint_callee_id
events = []
capture_events = Proc.new{|tp|
+ next unless target_thread?
events << [tp.event, tp.method_id, tp.callee_id]
}
@@ -1748,6 +1750,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
define_method(:m) {}
tp = TracePoint.new(:call) do
+ next unless target_thread?
raise ''
end