From 14d13bc13d28c1ba98e6c672340b72860e81892c Mon Sep 17 00:00:00 2001 From: normal Date: Sun, 5 Aug 2018 08:56:57 +0000 Subject: [PATCH] test/ruby/test_process.rb (test_wait_and_sigchld): allow extra SIGCHLD MJIT way generate an extra SIGCHLD, so we'll have to deal with it. Any realistic Ruby program may hit unexpected SIGCHLD, too, since any spawned subprocess could have extra grandchildren which get reaped by the main Ruby process, and SIGCHLD may be sent spuriously by an external process using kill(2) syscall (via kill(1) or Process.kill). cf. http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1194620 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_process.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 45af7ae1f7..a0b08dd110 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1605,7 +1605,11 @@ class TestProcess < Test::Unit::TestCase Process.wait pid assert sig_r.wait_readable(5), 'self-pipe not readable' end - assert_equal [true], signal_received, " [ruby-core:19744]" + if RubyVM::MJIT.enabled? # MJIT may trigger extra SIGCHLD + assert_equal [true], signal_received.uniq, "[ruby-core:19744]" + else + assert_equal [true], signal_received, "[ruby-core:19744]" + end rescue NotImplementedError, ArgumentError ensure begin