Skip to content

Add additional Fiber scheduler hooks #9275

@headius

Description

@headius

Ruby 4.0 has expanded the callbacks for the Fiber scheduler, and we are missing some. At the very least, the following tests fail, probably because read and write are not fully hooked up to the scheduler:

  6) Failure:
TestFiberScheduler#test_io_read_error [/home/runner/work/jruby/jruby/test/mri/fiber/test_scheduler.rb:339]:
Expected #<SystemCallError: Unknown error (SystemCallError) - /tmp/ruby_test_io_read_error_60db71be21beca0fb478a5f9aca41e06> to be a kind of Errno::EBADF, not SystemCallError.

  7) Failure:
TestFiberScheduler#test_io_write_error [/home/runner/work/jruby/jruby/test/mri/fiber/test_scheduler.rb:360]:
Expected #<SystemCallError: Unknown error (SystemCallError) - /tmp/ruby_test_io_write_error_4c68306821923f764cae5d5dbee9cc2a> to be a kind of Errno::EINVAL, not SystemCallError.

  8) Failure:
TestFiberScheduler#test_io_write_on_flush [/home/runner/work/jruby/jruby/test/mri/fiber/test_scheduler.rb:312]:
<[[:io_write, 55, "foo"], [:io_write, 55, "bar"]]> expected but was
<[]>.

  9) Failure:
TestFiberScheduler#test_io_write_flush_error [/home/runner/work/jruby/jruby/test/mri/fiber/test_scheduler.rb:381]:
Expected nil to be a kind of Errno::EINVAL, not NilClass.

These need to be hooked up and made to pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions