summaryrefslogtreecommitdiff
path: root/test/fiber/test_io.rb
AgeCommit message (Collapse)Author
2023-07-22merge revision(s) 0b2613f44309bddae45562c9f3a14ed43e56959b: [Backport #19640]nagachika
`rb_io_puts` should not write zero length strings. (#7806) --- io.c | 40 ++++++++++++++++++++++++---------------- test/fiber/test_io.rb | 28 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 16 deletions(-)
2022-11-17Add support for `sockaddr_un` on Windows. (#6513)Samuel Williams
* Windows: Fix warning about undefined if_indextoname() * Windows: Fix UNIXSocket on MINGW and make .pair more reliable * Windows: Use nonblock=true for read tests with scheduler * Windows: Move socket detection from File.socket? to File.stat Add S_IFSOCK to Windows and interpret reparse points accordingly. Enable tests that work now. * Windows: Use wide-char functions to UNIXSocket This fixes behaviour with non-ASCII characters. It also fixes deletion of temporary UNIXSocket.pair files. * Windows: Add UNIXSocket tests for specifics of Windows impl. * Windows: fix VC build due to missing _snwprintf Avoid usage of _snwprintf, since it fails linking ruby.dll like so: linking shared-library x64-vcruntime140-ruby320.dll x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol snwprintf x64-vcruntime140-ruby320.def : error LNK2001: unresolved external symbol vsnwprintf_l whereas linking miniruby.exe succeeds. This patch uses snprintf on the UTF-8 string instead. Also remove branch GetWindowsDirectoryW, since it doesn't work. * Windows: Fix dangling symlink test failures Co-authored-by: Lars Kanis <kanis@comcard.de> Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-10-15Introduce `Fiber::Scheduler#io_select` hook for non-blocking `IO.select`. ↵Samuel Williams
(#6559) Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-01-11Use omit instead of skip without the default gems testsHiroshi SHIBATA
2021-12-18Introduce io_result wrapper for passing `[-errno, size]` in VALUE.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/5287 Merged-By: ioquatix <samuel@codeotaku.com>
2021-08-26Fix example fiber scheduler reg. writable eventsLars Kanis
There were two issues: 1. When an IO object is waiting for writablility only (as in test_tcp_accept) the selected hash is empty. Therefore selected[fiber] returns nil but needs to default to 0 in order to be or'ed with IO::WRITABLE. 2. When an IO object is waiting for read- or writability (as in test_tcp_connect), but only one of these two events arrive, the Fiber and IO object need to be removed from the other `@readable` or `@writable` list. Notes: Merged: https://github.com/ruby/ruby/pull/4777
2021-03-30Test incorrect behaviour of `rb_io_wait_readable/writable`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4338
2020-11-07Rename to `Fiber#set_scheduler`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3742
2020-09-14Rename `Fiber{}` to `Fiber.schedule{}`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3434
2020-07-23Suppress "assigned but unused variable" warningsYusuke Endoh
2020-07-20Remove trailing spaces [ci skip]Nobuyoshi Nakada
2020-07-20Add multi-threaded I/O test.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3323
2020-07-20Improve consistency of tests.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3323
2020-05-23Rename TestScheduler* to TestFiber for convention of the test directoryHiroshi SHIBATA
2020-05-15Move `test/scheduler` -> `test/fiber` [Bug #16892][ruby-core:98366].Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3110