summaryrefslogtreecommitdiff
path: root/test/ruby/test_process.rb
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-05 08:56:57 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-05 08:56:57 +0000
commit14d13bc13d28c1ba98e6c672340b72860e81892c (patch)
tree49625af4a129a7e446c6439f0b90c2547feb1750 /test/ruby/test_process.rb
parentb3aa256c4d43d3d7e9975ec18eb127f45f623c9b (diff)
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
Diffstat (limited to 'test/ruby/test_process.rb')
-rw-r--r--test/ruby/test_process.rb6
1 files changed, 5 insertions, 1 deletions
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