Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 87a0e738a554
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b601ce5bf0d8
Choose a head ref
  • 4 commits
  • 3 files changed
  • 1 contributor

Commits on Jan 8, 2018

  1. Exclude these pesky thread+signal specs.

    I am not convinced the intermittent failures here indicate an
    issue in JRuby. Rather, I suspect there's a race, since these
    tests involve setting up a signal handler, signalling INT from a
    thread, and joining in both main and the handler itself. However
    I have been unable to come up a reason for the race, so I have
    filed #4956 to track this exclusion.
    
    An example script, which should run forever but dies:
    
    ```ruby
    loop {
      Signal.trap(:INT, "DEFAULT")
      t0 = Thread.current
      t = Thread.new {Thread.pass until t0.stop?; Process.kill(:INT, $$)}
    
      Signal.trap :INT do
        t.join
      end
    
      t.join
      print '.'
    }
    ```
    headius committed Jan 8, 2018
    Copy the full SHA
    e2206af View commit details
  2. Sleep longer for slow envs.

    headius committed Jan 8, 2018
    Copy the full SHA
    6983b58 View commit details
  3. Copy the full SHA
    d2f4f0c View commit details
  4. Copy the full SHA
    b601ce5 View commit details
Showing with 15 additions and 1 deletion.
  1. +12 −0 rakelib/test.rake
  2. +1 −1 test/jruby/test_timeout.rb
  3. +2 −0 test/mri/excludes/TestThread.rb
12 changes: 12 additions & 0 deletions rakelib/test.rake
Original file line number Diff line number Diff line change
@@ -86,23 +86,35 @@ namespace :test do

namespace :mri do
mri_test_files = File.readlines('test/mri.index').grep(/^[^#]\w+/).map(&:chomp).join(' ')

# We disable compressed oops because it can push native heap allocations beyond rlimit,
# as in https://gist.github.com/headius/88d7f5449049794e286aab364de9830d.
# See https://bugs.openjdk.java.net/browse/JDK-8187709.
# Signals are disabled to help trap-related tests succeed more reliably.
# See test/mri/ruby/test_signal.rb in test_ignored_interrupt which uses TRAP.
java_opts = "#{ENV['JAVA_OPTS']} -XX:-UseCompressedOops -Xrs"

task :int do
ENV['JRUBY_OPTS'] = "#{ENV['JRUBY_OPTS']} -Xbacktrace.style=mri -Xdebug.fullTrace -X-C"
ENV['JAVA_OPTS'] = java_opts
ruby "test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} --excludes=test/mri/excludes -q -- #{mri_test_files}"
end

task :fullint do
ENV['JRUBY_OPTS'] = "#{ENV['JRUBY_OPTS']} -Xbacktrace.style=mri -Xdebug.fullTrace -X-C -Xjit.threshold=0 -Xjit.background=false"
ENV['JAVA_OPTS'] = java_opts
ruby "test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} --excludes=test/mri/excludes -q -- #{mri_test_files}"
end

task :jit do
ENV['JRUBY_OPTS'] = "#{ENV['JRUBY_OPTS']} -Xbacktrace.style=mri -Xdebug.fullTrace -Xjit.threshold=0 -Xjit.background=false #{get_meta_size.call()}"
ENV['JAVA_OPTS'] = java_opts
ruby "test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} --excludes=test/mri/excludes -q -- #{mri_test_files}"
end

task :aot do
ENV['JRUBY_OPTS'] = "#{ENV['JRUBY_OPTS']} -Xbacktrace.style=mri -Xdebug.fullTrace -X+C -Xjit.background=false #{get_meta_size.call()}"
ENV['JAVA_OPTS'] = java_opts
ruby "test/mri/runner.rb #{ADDITIONAL_TEST_OPTIONS} --excludes=test/mri/excludes -q -- #{mri_test_files}"
end

2 changes: 1 addition & 1 deletion test/jruby/test_timeout.rb
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@ def test_net_http_timeout
http.start do |h|
h.request_get '/index.html'
# ensure we timeout even if we're fast
sleep(0.01)
sleep(1)
end
end
end
2 changes: 2 additions & 0 deletions test/mri/excludes/TestThread.rb
Original file line number Diff line number Diff line change
@@ -12,8 +12,10 @@
exclude :test_priority, "unreliably depends on thread scheduling"
exclude :test_recursive_outer, "expected to be fixed by our change based on MRI r43981 but was not"
exclude :test_safe_level, "SAFE levels are unsupported"
exclude :test_thread_join_in_trap, "fails intermittently (#4956)"
exclude :test_thread_join_main_thread, "hangs"
exclude :test_thread_setname_in_initialize, "needs investigation #4308"
exclude :test_thread_status_raise_after_kill, "aborting status does not show up as expected"
exclude :test_thread_timer_and_interrupt, "event statuses do not match expected"
exclude :test_thread_value_in_trap, "fails intermittently (#4956)"
exclude :test_thread_variable_in_enumerator, "fibers in JRuby have their own Thread.current"