Comment 30 for bug 1834072

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

If I patch test_io_console.rb like below, and that is what is in ruby2.5, then the test passes:

ubuntu@xenial-ruby23:~/deb/ruby-my-sru/ruby2.3-2.3.1$ diff -u test/io/console/test_io_console.rb{.orig,}
--- test/io/console/test_io_console.rb.orig 2019-08-30 21:47:34.815612212 +0000
+++ test/io/console/test_io_console.rb 2019-08-30 21:47:48.495619431 +0000
@@ -185,8 +185,9 @@
     skip unless IO.method_defined?("getpass")
     run_pty("p IO.console.getpass('> ')") do |r, w|
       assert_equal("> ", r.readpartial(10))
+ sleep 0.1
       w.print "asdf\n"
- sleep 1
+ sleep 0.1
       assert_equal("\r\n", r.gets)
       assert_equal("\"asdf\"", r.gets.chomp)
     end

ubuntu@xenial-ruby23:~/deb/ruby-my-sru/ruby2.3-2.3.1$ ruby2.3 test/runner.rb test/io/console/test_io_console.rb
Run options:

# Running tests:

Finished tests in 1.578071s, 12.6737 tests/s, 84.9138 assertions/s.
20 tests, 134 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.3.1p112 (2016-04-26) [s390x-linux-gnu]

So it's some kind of race.

Should I include these fixes in this SRU? Namely:
a) skip the timezone test
b) patch the console test like above

That still leaves the odd test/rdoc/test_rdoc_markup_pre_process.rb failure on amd64, but amd64 is "always failed". I could look at it next, see if I can reproduce it, or if it's a fluke.