Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UNIXSocket#recv_io, UNIXSocket#send_io implementation using JNR #3492

Merged
merged 2 commits into from Dec 26, 2015

Conversation

Projects
None yet
3 participants
@mrbrdo
Copy link
Contributor

mrbrdo commented Nov 23, 2015

recv_io_spec.rb and send_io_spec.rb seem to now be passing. Also did a check with a script and seems to be working properly. Thorough review would be welcome, as this is my first JRuby PR.

Based on MRI code https://github.com/ruby/ruby/blob/trunk/ext/socket/unixsocket.c#L206
And on the test from jnr-posix: https://github.com/jnr/jnr-posix/blob/master/src/test/java/jnr/posix/IOTest.java#L163

I did skip this part: https://github.com/ruby/ruby/blob/af68619a6c0de0d4f08d092d65143abcf2cedce3/ext/socket/unixsocket.c#L355 (L355-L404)
I'm not sure if this is even relevant to JRuby nor do I completely understand what it is doing.

Cheers

@mrbrdo mrbrdo force-pushed the mrbrdo:unixsocket_io branch 2 times, most recently from bb4e8f0 to eb646c3 Nov 23, 2015

@kares kares added this to the JRuby 9.0.5.0 milestone Nov 24, 2015

@mrbrdo mrbrdo force-pushed the mrbrdo:unixsocket_io branch from eb646c3 to 0b66018 Nov 24, 2015

@mrbrdo

This comment has been minimized.

Copy link
Contributor Author

mrbrdo commented Dec 1, 2015

@headius do you need something else before this and #3494 can be merged?
Also could you add the 9.0.5.0 milestone to #3494 as well?

@mrbrdo

This comment has been minimized.

Copy link
Contributor Author

mrbrdo commented Dec 7, 2015

@mrbrdo

This comment has been minimized.

Copy link
Contributor Author

mrbrdo commented Dec 16, 2015

@headius @kares reping

@kares

This comment has been minimized.

Copy link
Member

kares commented Dec 16, 2015

sorry I can not decide whether its correct without any tests, try rebasing off a green build and un-exclude some of the MRI tests or add new ones

@mrbrdo

This comment has been minimized.

Copy link
Contributor Author

mrbrdo commented Dec 24, 2015

@kares @headius the MRI tests are checking IO#close_on_exec? which is not implemented on JRuby, so I cannot get those tests passing in their current form. The test_fd_passing test passes without this check. Even if we would hardcode that to false it would make the tests fail since they expect true.
PS: The method close_on_exec? is somewhat incorrectly throwing NotImplementedError: close_on_exec= (wrong method name is being shown)

Please advise?

@mrbrdo mrbrdo force-pushed the mrbrdo:unixsocket_io branch from 0b66018 to 70a0f97 Dec 24, 2015

@mrbrdo

This comment has been minimized.

Copy link
Contributor Author

mrbrdo commented Dec 24, 2015

Also the failure in the tests above can't be my fault...

@headius

This comment has been minimized.

Copy link
Member

headius commented Dec 25, 2015

Sorry for the delay on this, @mrbrdo...travel and holidays tied me up I guess. We'll get this merged right away.

@mrbrdo

This comment has been minimized.

Copy link
Contributor Author

mrbrdo commented Dec 25, 2015

Thanks @headius , don't forget about #3494 :)

headius added a commit that referenced this pull request Dec 26, 2015

Merge pull request #3492 from mrbrdo/unixsocket_io
UNIXSocket#recv_io, UNIXSocket#send_io implementation using JNR

@headius headius merged commit fe44f00 into jruby:master Dec 26, 2015

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.