summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-22 23:43:28 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-09-22 23:45:54 +0900
commitea5f8e123cb04f995ffd1f893a22e45d5693a8ea (patch)
tree098ce190fa210371c2afa2e863420f7d57266ec6 /test
parent416a8202bc20dab6b6cae1de656f03f90e6da239 (diff)
Magical wait to get rid of deadlock on macOS
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 5787f2dbe2..f180b6368d 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -715,6 +715,10 @@ class TestProcess < Test::Unit::TestCase
sleep 0.2 # wait for the child to stop at opening "fifo"
Process.kill(:USR1, io.pid)
assert_equal("trap\n", io.readpartial(8))
+ sleep 0.2 # wait for the child to return to opening "fifo".
+ # On arm64-darwin22, often deadlocks while the child is
+ # opening "fifo". Not sure to where "ok" line being written
+ # at the next has gone.
File.write("fifo", "ok\n")
assert_equal("ok\n", io.read)
}