Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Incomplete
-
Affects Version/s: JRuby 1.1RC2
-
Fix Version/s: None
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Latest JRuby 1.1RC2
-
Number of attachments :
Description
JRuby behaves weird/incorrect when encounters rubyspecs with output_to_fd in them. In most cases, JRuby just exits without printing any information about the test, or fails with mspec.rb:44:in `finish': Bad file descriptor.
Originally, such specs were guarded by fails_on :jruby, but since the guards are now removed, we see the failures again.
Currently, the following specs have output_to_fd:
spec/ruby/1.8/core/io/print_spec.rb
spec/ruby/1.8/core/io/printf_spec.rb
spec/ruby/1.8/core/io/puts_spec.rb
This may be related to JRUBY-2285 as well.
Issue Links
- relates to
-
JRUBY-2285
Regression: rubyspec run with -V option breaks JRuby
-
Activity
Vladimir Sizikov
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Link |
This issue relates to |
Hiro Asari
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Hiro Asari [ asari ] | |
| Resolution | Incomplete [ 4 ] |
Charles Oliver Nutter
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
This is what I get when I try:
surfboard:jruby[git:personal]$ find spec/ruby -name \*.rb -exec grep -l output_to_fd {} \; | xargs jruby spec/mspec/bin/mspec jruby 1.5.0.dev (ruby 1.8.7 patchlevel 174) (2009-11-14 da88e7c) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [x86_64-java] .....................................................rubyspec: Hello rubyspec: World Frubyspec: syslog: unknown facility/priority: 539 rubyspec: Hello FF.rubyspec: chunky bacon x 2 F 1) Syslog.log receives a priority as first argument FAILED Expected (STDERR): "rubyspec: Hello\nrubyspec: World\n" but got: "" Backtrace /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:16 /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:4 /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:55:in `load' 2) Syslog.log accepts undefined priorites FAILED Expected (STDERR): /rubyspec: Hello/ but got: "" Backtrace /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:25 /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:4 /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:55:in `load' 3) Syslog.log fails with TypeError on nil log messages FAILED Expected TypeError but got NoMethodError (undefined method `%' for nil:NilClass) /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:35 /Users/asari/personal/jruby/lib/ruby/site_ruby/shared/syslog.rb:99:in `open' /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:34 /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:4 /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:55:in `load' 4) Syslog.log accepts printf parameters FAILED Expected (STDERR): "rubyspec: chunky bacon x 2\n" but got: "" Backtrace /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:46 /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:4 /Users/asari/Development/src/jruby/spec/ruby/library/syslog/log_spec.rb:55:in `load' Finished in 2.831000 seconds 13 files, 56 examples, 116 expectations, 4 failures, 0 errorsIt appears to me that output_to_fd() is still problematic with $stderr, but it is OK with $stdout.
There is a failure of different kind, which might (or not) merit a separate ticket.