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

ruby-changes:51583

From: normal <ko1@a...>
Date: Sat, 30 Jun 2018 07:20:17 +0900 (JST)
Subject: [ruby-changes:51583] normal:r63794 (trunk): test_thread.rb (test_thread_interrupt_for_killed_thread): reprieve for MJIT

normal	2018-06-30 07:20:12 +0900 (Sat, 30 Jun 2018)

  New Revision: 63794

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

  Log:
    test_thread.rb (test_thread_interrupt_for_killed_thread): reprieve for MJIT
    
    With MJIT enabled, the exit (from SIGTERM) may take a long time
    to complete.  Prevent EnvUtil.invoke_ruby from falling back to
    other signals (SIGABRT) when Process.wait takes longer than the
    default 1s reprieve.

  Modified files:
    trunk/test/ruby/test_thread.rb
Index: test/ruby/test_thread.rb
===================================================================
--- test/ruby/test_thread.rb	(revision 63793)
+++ test/ruby/test_thread.rb	(revision 63794)
@@ -1286,7 +1286,12 @@ q.pop https://github.com/ruby/ruby/blob/trunk/test/ruby/test_thread.rb#L1286
   end
 
   def test_thread_interrupt_for_killed_thread
-    assert_normal_exit(<<-_end, '[Bug #8996]', timeout: 5, timeout_error: nil)
+    opts = { timeout: 5, timeout_error: nil }
+
+    # prevent SIGABRT from slow shutdown with MJIT
+    opts[:reprieve] = 3 if RubyVM::MJIT.enabled?
+
+    assert_normal_exit(<<-_end, '[Bug #8996]', opts)
       Thread.report_on_exception = false
       trap(:TERM){exit}
       while true

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

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