mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
fb89004a3b
commit
8ae178683f
1 changed files with 3 additions and 0 deletions
|
@ -925,6 +925,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
bug7774 = '[ruby-dev:46908]'
|
bug7774 = '[ruby-dev:46908]'
|
||||||
src = %q{
|
src = %q{
|
||||||
tp = TracePoint.new(:raise) do |tp|
|
tp = TracePoint.new(:raise) do |tp|
|
||||||
|
next unless target_thread?g
|
||||||
tp.binding
|
tp.binding
|
||||||
end
|
end
|
||||||
tp.enable do
|
tp.enable do
|
||||||
|
@ -1492,6 +1493,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
def test_tracepoint_callee_id
|
def test_tracepoint_callee_id
|
||||||
events = []
|
events = []
|
||||||
capture_events = Proc.new{|tp|
|
capture_events = Proc.new{|tp|
|
||||||
|
next unless target_thread?
|
||||||
events << [tp.event, tp.method_id, tp.callee_id]
|
events << [tp.event, tp.method_id, tp.callee_id]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1748,6 +1750,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
define_method(:m) {}
|
define_method(:m) {}
|
||||||
|
|
||||||
tp = TracePoint.new(:call) do
|
tp = TracePoint.new(:call) do
|
||||||
|
next unless target_thread?
|
||||||
raise ''
|
raise ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue