Skip to content

Fix handling of ENXIO error during resource open#6852

Merged
headius merged 1 commit intojruby:masterfrom
headius:handle_enxio_on_fifo_open
Sep 24, 2021
Merged

Fix handling of ENXIO error during resource open#6852
headius merged 1 commit intojruby:masterfrom
headius:handle_enxio_on_fifo_open

Conversation

@headius
Copy link
Member

@headius headius commented Sep 24, 2021

This triggered a failure in the io/wait tests when it expected a
nonblocking write-only open call against an unread fifo to raise
ENXIO. We instead raised one of our internal anonymous errors,
preventing the logic in this test from retrying:

https://github.com/ruby/io-wait/blob/0c73ebcf5d75b0568405f5863eefaffba0ec7a0e/test/io/wait/test_io_wait_uncommon.rb#L23

The changes here promote all unraised errno exceptions to use
ErrnoException, which propagates the errno object as well as the
name and path. This allows upstream error handling to raise the
proper Ruby error.

This triggered a failure in the io/wait tests when it expected a
nonblocking write-only open call against an unread fifo to raise
ENXIO. We instead raised one of our internal anonymous errors,
preventing the logic in this test from retrying:

https://github.com/ruby/io-wait/blob/0c73ebcf5d75b0568405f5863eefaffba0ec7a0e/test/io/wait/test_io_wait_uncommon.rb#L23

The changes here promote all unraised errno exceptions to use
ErrnoException, which propagates the errno object as well as the
name and path. This allows upstream error handling to raise the
proper Ruby error.
@headius headius added this to the JRuby 9.3.1.0 milestone Sep 24, 2021
headius added a commit to headius/io-wait that referenced this pull request Sep 24, 2021
@headius headius mentioned this pull request Sep 24, 2021
@headius headius merged commit e793316 into jruby:master Sep 24, 2021
@headius headius deleted the handle_enxio_on_fifo_open branch September 24, 2021 04:50
@ahorek ahorek mentioned this pull request Sep 24, 2021
headius added a commit to headius/io-wait that referenced this pull request Nov 29, 2021
headius added a commit to headius/io-wait that referenced this pull request Feb 1, 2022
nobu pushed a commit to nobu/io-wait that referenced this pull request Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant