summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-27 02:11:36 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-27 02:11:36 +0000
commit33201294eb59f10ccb98752207c2cc9d1c8757cc (patch)
tree2a5d9ab0c7a4f6c81bc7198ae5ad5048f821ba33 /test
parent9f1c00ce65ed8762d5ab9f133145e19d1951a7f3 (diff)
Ignore failures related to threading.
* test/lib/tracepointchecker.rb: ignore "deletion trace" check when there are threads other than the main thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/lib/tracepointchecker.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/lib/tracepointchecker.rb b/test/lib/tracepointchecker.rb
index 2fa40546b2a..47822ecef54 100644
--- a/test/lib/tracepointchecker.rb
+++ b/test/lib/tracepointchecker.rb
@@ -6,9 +6,16 @@ module TracePointChecker
}
module ZombieTraceHunter
- def before_setup
- @tracepoint_captured_stat = TracePoint.stat.map{|k, (activated, deleted)| [k, activated, deleted]}
+ def tracepoint_capture_stat_get
+ TracePoint.stat.map{|k, (activated, deleted)|
+ deleted = 0 unless @tracepoint_captured_singlethread
+ [k, activated, deleted]
+ }
+ end
+ def before_setup
+ @tracepoint_captured_singlethread = (Thread.list.size == 1)
+ @tracepoint_captured_stat = tracepoint_capture_stat_get()
super
end
@@ -18,7 +25,7 @@ module TracePointChecker
# detect zombie traces.
assert_equal(
@tracepoint_captured_stat,
- TracePoint.stat.map{|k, (activated, deleted)| [k, activated, deleted]},
+ tracepoint_capture_stat_get(),
"The number of active/deleted trace events was changed"
)
# puts "TracePoint - deleted: #{deleted}" if deleted > 0