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

ruby-changes:61713

From: Takashi <ko1@a...>
Date: Mon, 15 Jun 2020 07:02:10 +0900 (JST)
Subject: [ruby-changes:61713] 80bd3aa32b (master): Try using longer read_timeout for --jit-wait

https://git.ruby-lang.org/ruby.git/commit/?id=80bd3aa32b

From 80bd3aa32b92f952dab4330281ff049739439568 Mon Sep 17 00:00:00 2001
From: Takashi Kokubun <takashikkbn@g...>
Date: Sun, 14 Jun 2020 15:00:54 -0700
Subject: Try using longer read_timeout for --jit-wait

failure on TestFTP.

When we skip a test, the place to hang (long wait for compilation)
just moves to another test and it doesn't seem to finish.
http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3003055

diff --git a/test/net/ftp/test_ftp.rb b/test/net/ftp/test_ftp.rb
index 571338f..e75e7e5 100644
--- a/test/net/ftp/test_ftp.rb
+++ b/test/net/ftp/test_ftp.rb
@@ -735,8 +735,6 @@ class FTPTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L735
   end
 
   def test_getbinaryfile
-    # http://ci.rvm.jp/logfiles/brlog.trunk-mjit-wait.20200326-025942
-    skip 'This has been too unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
     commands = []
     binary_data = (0..0xff).map {|i| i.chr}.join * 4 * 3
     server = create_ftp_server { |sock|
@@ -764,6 +762,7 @@ class FTPTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L762
     begin
       begin
         ftp = Net::FTP.new
+        ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait
         ftp.connect(SERVER_ADDR, server.port)
         ftp.login
         assert_match(/\AUSER /, commands.shift)
@@ -808,6 +807,7 @@ class FTPTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L807
     begin
       begin
         ftp = Net::FTP.new
+        ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait
         ftp.connect(SERVER_ADDR, server.port)
         ftp.login
         assert_match(/\AUSER /, commands.shift)
@@ -2185,8 +2185,6 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2185
 
   def test_abort_tls
     return unless defined?(OpenSSL)
-    # http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/2789353
-    skip 'This is unstable with --jit-wait. TODO: debug it' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
 
     commands = []
     server = create_ftp_server { |sock|
@@ -2222,6 +2220,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2220
         ftp = Net::FTP.new(SERVER_NAME,
                            port: server.port,
                            ssl: { ca_file: CA_FILE })
+        ftp.read_timeout *= 5 if RubyVM::MJIT.enabled? # for --jit-wait
         assert_equal("AUTH TLS\r\n", commands.shift)
         assert_equal("PBSZ 0\r\n", commands.shift)
         assert_equal("PROT P\r\n", commands.shift)
@@ -2243,8 +2242,6 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2242
   end
 
   def test_getbinaryfile_command_injection
-    # http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3001181
-    skip 'This has been too unstable with --jit-wait' if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?
     skip "| is not allowed in filename on Windows" if windows?
     [false, true].each do |resume|
       commands = []
@@ -2276,7 +2273,7 @@ EOF https://github.com/ruby/ruby/blob/trunk/test/net/ftp/test_ftp.rb#L2273
           begin
             ftp = Net::FTP.new
             ftp.resume = resume
-            ftp.read_timeout = (defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?) ? 5 : 0.2 # use large timeout for --jit-wait
+            ftp.read_timeout = (defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled?) ? 300 : 0.2 # use large timeout for --jit-wait
             ftp.connect(SERVER_ADDR, server.port)
             ftp.login
             assert_match(/\AUSER /, commands.shift)
-- 
cgit v0.10.2


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

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