[前][次][番号順一覧][スレッド一覧]

ruby-changes:51979

From: normal <ko1@a...>
Date: Sun, 5 Aug 2018 17:57:02 +0900 (JST)
Subject: [ruby-changes:51979] normal:r64194 (trunk): test/ruby/test_process.rb (test_wait_and_sigchld): allow extra SIGCHLD

normal	2018-08-05 17:56:57 +0900 (Sun, 05 Aug 2018)

  New Revision: 64194

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64194

  Log:
    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

  Modified files:
    trunk/test/ruby/test_process.rb
Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 64193)
+++ test/ruby/test_process.rb	(revision 64194)
@@ -1605,7 +1605,11 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L1605
       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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]