From 47f3c4d1477ebc479a5e0ab4342e1d86604caeb9 Mon Sep 17 00:00:00 2001 From: normal Date: Fri, 29 Jun 2018 22:20:12 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_thread.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 98a7d15c6a..eb08a22ef7 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -1286,7 +1286,12 @@ q.pop 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