Skip to content

Commit 99ce009

Browse files
committed
Fix multi-ractor tests after rebase
1 parent f8bf3cb commit 99ce009

9 files changed

Lines changed: 18 additions & 2 deletions

File tree

ext/-test-/io_buffer/io_buffer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ io_buffer_for_writing_modify_string(VALUE self, VALUE string)
9292
void
9393
Init_io_buffer(void)
9494
{
95+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
96+
rb_ext_ractor_safe(true);
97+
#endif
9598
VALUE mBug = rb_define_module("Bug");
9699
VALUE mIOBuffer = rb_define_module_under(mBug, "IOBuffer");
97100

ext/-test-/regexp/new.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ reg_new_binary(VALUE self, VALUE src)
1010
void
1111
Init_new(VALUE klass)
1212
{
13+
#ifdef HAVE_RB_EXT_RACTOR_SAFE
14+
rb_ext_ractor_safe(true);
15+
#endif
1316
rb_define_singleton_method(klass, "new_binary", reg_new_binary, 1);
1417
}

test/.excludes-ractor/TestFileExhaustive.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
exclude(:test_flock_exclusive, "subprocess")
1111
exclude(:test_flock_shared, "subprocess")
1212
exclude(:test_stat_dotted_prefix_ractor_unsafe, "Dir.chdir")
13+
exclude(:test_symlink_to_relative_directory, "Dir.chdir")
1314
exclude(:test_utime_ractor_unsafe, "Dir.chdir")
1415
exclude(:test_umask, "global side effects")

test/.excludes-ractor/TestProc.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
exclude(:test_refined_memo_avoids_recopy, "GC.disable")
2+
exclude(:test_refined_once_regexp, "FIXME: once option not working correctly under Ractors")

test/.excludes-ractor/TestProcess.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414
exclude(:test_popen_fork, "fork")
1515
exclude(:test_popen_fork_ensure, "fork")
1616
exclude(:test_execopts_env_popen, "ENV changes")
17+
exclude(:test_execopts_redirect_pipe, "expects closed fd to not be reused")
1718
exclude(:test_execopts_unsetenv_others, "ENV changes")
1819
exclude(:test_process_detach, "fork")
1920
exclude(:test_seteuid_name, "unsafe Etc method")
2021
exclude(:test_signals_work_after_exec_fail, "fork")
2122
exclude(:test_threading_works_after_exec_fail, "fork")
2223
exclude(:test_to_hash_on_arguments, "separate processes")
2324
exclude(:test_waitall, "global side effects")
25+
exclude(:test_wait_and_sigchild, "global side effects")
2426
exclude(:test_uid_from_name_ractor_unsafe, "Etc.getpwuid")
2527
exclude(:test_gid_from_name_ractor_unsafe, "Etc.getgrgid")
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
exclude(:test_getter, "gvars")
22
exclude(:test_ignorecase, "gvars")
3+
exclude(:test_once_multithread, "FIXME: not working correctly in Ractors")

test/.excludes-ractor/TestVariable.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
exclude(:test_cloned_classes_copy_cvar_cache, "cvars")
33
exclude(:test_cvar_overtaken_by_module, "cvars")
44
exclude(:test_cvar_overtaken_by_parent_class, "cvars")
5+
exclude(:test_cvar_cache_invalidated_by_parent_class_variable_set, "cvars")
6+
exclude(:test_cvar_cache_invalidated_by_module_class_variable_set, "cvars")
57
exclude(:test_global_variable_popped, "gvars")
68
exclude(:test_global_variables, "gvars")
79
exclude(:test_include_refined_module_class_variable, "cvars")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# FIXME: when ractor-local GC (rlgc) lands, see if it's fixed.
2+
exclude(:test_compaction, "GC.compact crashes")

test/ruby/test_syntax.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def test_cmd_symbol_singleton_class
627627
def test_cmd_symbol_superclass
628628
bug6347 = '[ruby-dev:45563]'
629629
@not_label = Object
630-
assert_not_label(:foo, 'class Foo < not_label:foo; end', bug6347)
630+
assert_not_label(:foo, "class Foo#{self.class}#{Ractor.current.object_id} < not_label:foo; end", bug6347)
631631
end
632632

633633
def test_no_label_with_percent
@@ -2091,7 +2091,7 @@ def foo(*args) = super
20912091
assert_equal(1, b.new.foo(1), bug21256)
20922092
end
20932093

2094-
BUG_21669 = '[Bug #21669]'
2094+
BUG_21669 = '[Bug #21669]'.freeze
20952095

20962096
def test_value_expr_in_block
20972097
assert_syntax_error("#{<<~"{#"}\n#{<<~'};'}", /void value expression/, nil, "#{BUG_21669} 2.1")

0 commit comments

Comments
 (0)