From 2f81bb793fd217374054ee78cb5cd595cfacf9fe Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Wed, 15 Mar 2023 14:19:22 -0400 Subject: Add thread and ractor counts to bug reports This is useful for crash triaging. It also helps to hint extension developers about the misuse of `rb_thread_call_without_gvl()`. Example: $ ./miniruby -e 'Ractor.new{Ractor.receive}; Thread.new{sleep}; Process.kill:SEGV,Process.pid' -- Threading information --------------------------------------------------- Total ractor count: 2 Ruby thread count for this ractor: 2 --- test/ruby/test_rubyoptions.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 13d720be9e..64d8d93d3f 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -754,6 +754,9 @@ class TestRubyOptions < Test::Unit::TestCase \n )? )x, + %r( + (?:--\sThreading(?:.+\n)*\n)? + )x, %r( (?:--\sMachine(?:.+\n)*\n)? )x, -- cgit v1.2.3