introduce check code for mysterious EBADF
parallel test randomly failed with EBADF. This patch checks wich suite causes this error. ex) http://ci.rvm.jp/results/trunk@ruby-iga/3690219 ``` /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:88:in `close': Bad file descriptor (Errno::EBADF) /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:88:in `ensure in _run_suite' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:89:in `_run_suite' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:30:in `block in _run_suites' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:29:in `map' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:29:in `_run_suites' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:128:in `run' /tmp/ruby/v3/src/trunk/tool/lib/test/unit/parallel.rb:211:in `<main>' ```
This commit is contained in:
parent
b74f9d656a
commit
7864efa105
@ -85,8 +85,21 @@ module Test
|
||||
Test::Unit::Runner.output = orig_stdout
|
||||
$stdin = orig_stdin if orig_stdin
|
||||
$stdout = orig_stdout if orig_stdout
|
||||
o.close if o && !o.closed?
|
||||
i.close if i && !i.closed?
|
||||
|
||||
# To figure out which suite raises EBADF error.
|
||||
begin
|
||||
o.close if o && !o.closed?
|
||||
rescue Exception => e
|
||||
STDERR.puts "#{e} at #{suite.name} (o)"
|
||||
raise
|
||||
end
|
||||
|
||||
begin
|
||||
i.close if i && !i.closed?
|
||||
rescue Exception => e
|
||||
STDERR.puts "#{e} at #{suite.name} (i)"
|
||||
raise
|
||||
end
|
||||
end
|
||||
|
||||
def run(args = []) # :nodoc:
|
||||
|
Loading…
x
Reference in New Issue
Block a user