Issue #6228 has been updated by jonforums (Jon Forums).


Haven't found root cause, but these commits also have `Errno::EBADF` errors:

commit    revision  patch
-------   --------  -----
b1bcb82   r34865    p154
1b21d03   r34811    p146
7e2e3dc   r34806    p144

In the above commits, the failures are at a different location in `ruby/test_io.rb` likely because I'm not building deps in order to speed things up:

  5) Error:
test_invalid_advise(TestIO):
Errno::EBADF: Bad file descriptor - C:/Users/Jon/AppData/Local/Temp/test_io20120330-6868-1lqi3p9
    c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:1119:in `make_tempfile'
    c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:1848:in `block (2 levels) in test_invalid_advise'
    c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:1847:in `each'
    c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:1847:in `block in test_invalid_advise'
    c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:1846:in `each'
    c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:1846:in `test_invalid_advise'
    ../../../../Users/Jon/Documents/RubyDev/ruby-git/test/runner.rb:15:in `<main>'

I suspect this testing difference isn't relevant since EBADF errors persist, but it is a difference.

Time permitting this weekend, I'll try again using `git bisect`
----------------------------------------
Bug #6228: [mingw] Errno::EBADF in ruby/test_io.rb on ruby_1_9_3
https://bugs.ruby-lang.org/issues/6228#change-25480

Author: jonforums (Jon Forums)
Status: Open
Priority: Normal
Assignee: 
Category: test
Target version: 1.9.3
ruby -v: ruby 1.9.3p172 (2012-03-30 revision 35179) [i386-mingw32]


On Win7 32bit built with MinGW 4.6.2 using the RubyInstaller build recipes, I get the following test error:


sh-3.1$ ruby --version
ruby 1.9.3p172 (2012-03-30 revision 35179) [i386-mingw32]

sh-3.1$ make test-all TESTS='openssl fiddle psych zlib io json mkmf pathname stringio erb 
fileutils ruby/test_io.rb ruby/test_io_m17n.rb ruby/test_file.rb'

  7) Error:
test_lines(TestIO):
Errno::EBADF: Bad file descriptor
    c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:33:in `close'
    c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:33:in `rescue in block in pipe'
    c:/Users/Jon/Documents/RubyDev/ruby-git/test/ruby/test_io.rb:30:in `block in pipe'


-- 
http://bugs.ruby-lang.org/