summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNARUSE, Yui <naruse@airemix.jp>2023-03-02 09:28:58 +0900
committerNARUSE, Yui <naruse@airemix.jp>2023-03-02 09:29:38 +0900
commit53f6173cfc085a7422b4a76c85e6c35969209327 (patch)
tree64ffea351625f7655e038fdaad39c4c937adc699 /test
parent65ab2c1ef23bd4a02120a27c371dce12ea9024d4 (diff)
merge revision(s) 8ce2fb9bbbaea14737c84385b1573f743a30f773,3a0f6ce1d31eefd8af01b50f3632a64d64e8f8c1: [Backport #19415]
Only emit circular dependency warning for owned thread shields [Bug #19415] If multiple threads attemps to load the same file concurrently it's not a circular dependency issue. So we check that the existing ThreadShield is owner by the current fiber before warning about circular dependencies. --- internal/thread.h | 1 + load.c | 3 ++- spec/ruby/core/kernel/shared/require.rb | 11 +++++++++++ spec/ruby/fixtures/code/concurrent_require_fixture.rb | 4 ++++ test/ruby/test_require.rb | 3 --- thread.c | 11 +++++++++++ 6 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 spec/ruby/fixtures/code/concurrent_require_fixture.rb Use Thread.pass until thread.stop? to wait for thread to block [Bug #19415] It should be more reliable --- spec/ruby/fixtures/code/concurrent_require_fixture.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_require.rb3
1 files changed, 0 insertions, 3 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index 604ddf09d8..e0cfc8c914 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -562,9 +562,6 @@ class TestRequire < Test::Unit::TestCase
assert_equal(true, (t1_res ^ t2_res), bug5754 + " t1:#{t1_res} t2:#{t2_res}")
assert_equal([:pre, :post], scratch, bug5754)
-
- assert_match(/circular require/, output)
- assert_match(/in #{__method__}'$/o, output)
}
ensure
$VERBOSE = verbose