From ea5f8e123cb04f995ffd1f893a22e45d5693a8ea Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 22 Sep 2023 23:43:28 +0900 Subject: [PATCH] Magical wait to get rid of deadlock on macOS --- test/ruby/test_process.rb | 4 ++++ 1 file changed, 4 insertions(+) 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) }