History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-2219
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Vladimir Sizikov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

Errno numeric values should be platform-specific

Created: 04/Mar/08 07:10 AM   Updated: 19/May/08 04:17 AM
Component/s: Compiler
Affects Version/s: JRuby 1.1RC2
Fix Version/s: JRuby 1.1+

Time Tracking:
Not Specified

Environment: Latest JRuby 1.1RC2
Issue Links:
Related
 


 Description  « Hide
Errno values differ from platform to platform, and currently JRuby uses hardcoded values taken on MacOS, which is wrong for all other platforms. See JRUBY-2213 for example.

For example, ENOTCONN on MacOS is 57, but is 107 on Linux.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Vladimir Sizikov - 04/Mar/08 07:10 AM
Linking to related issue.

Charles Oliver Nutter - 17/Mar/08 06:03 PM
I'm punting this to 1.1+ because the errno values differing is a pretty minor issue. In general code shouldn't be expecting errno values to be a specific number, so code written with that expectation would have to do platform checks or risk breaking. This will probably end up as wontfix.

Vladimir Sizikov - 19/May/08 04:17 AM
This leads to one rubyspec failure on Linux:
mspec -f s -t j 1.8/library/socket/unixserver/new_spec.rb

UNIXServer
- #new should create a new UNIXServer (FAILED - 1)


1)
UNIXServer #new should create a new UNIXServer FAILED
Expected Errno::ENOTCONN
but got SystemCallError (Unknown error 107 - getpeername(2))
/opt/work/mspec.git/lib/mspec/expectations/expectations.rb:10:in `fail_with'
/opt/work/mspec.git/lib/mspec/expectations/should.rb:6:in `should'
/opt/work/spec/ruby/./1.8/library/socket/unixserver/new_spec.rb:13:in `/opt/work/spec/ruby/./1.8/library/socket/unixserver/new_spec.rb'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:120:in `instance_eval'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:120:in `protect'
/opt/work/mspec.git/lib/mspec/runner/state.rb:46:in `each'
/opt/work/mspec.git/lib/mspec/runner/state.rb:46:in `protect'
/opt/work/mspec.git/lib/mspec/runner/state.rb:60:in `process'
/opt/work/mspec.git/lib/mspec/runner/state.rb:56:in `each'
/opt/work/mspec.git/lib/mspec/runner/state.rb:56:in `process'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:27:in `describe'
/opt/work/mspec.git/lib/mspec/runner/object.rb:11:in `describe'
/opt/work/spec/ruby/./1.8/library/socket/unixserver/new_spec.rb:5:in `/opt/work/spec/ruby/./1.8/library/socket/unixserver/new_spec.rb'
/opt/work/spec/ruby/./1.8/library/socket/unixserver/new_spec.rb:45:in `load'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:45:in `files'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:120:in `instance_eval'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:120:in `protect'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:45:in `files'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:42:in `each'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:42:in `files'
/opt/work/mspec.git/lib/mspec/runner/mspec.rb:34:in `process'
/opt/work/mspec.git/bin/mspec-run:76:in `run'
/opt/work/mspec.git/lib/mspec/utils/script.rb:75:in `main'
/opt/work/mspec.git/bin/mspec-run:83

Finished in 0.643000 seconds

1 file, 1 example, 3 expectations, 1 failure, 0 errors