summaryrefslogtreecommitdiff
path: root/test/io/wait
Commit message (Collapse)AuthorAgeFilesLines
* Remove `require 'io/wait'` where it's no longer necessary. (#6932)Samuel Williams2022-12-153-6/+3
| | | | | | | * Remove `require 'io/wait'` as it's part of core now. * Update ruby specs using version gates. * Add note about why it's conditional.
* Skip test_wait on MinGW CITakashi Kokubun2022-09-171-0/+1
| | | | | | This test has been unstable, and it seems like we're not interested in fixing that for MinGW. https://github.com/ruby/ruby/actions/runs/3073317191/jobs/4965373284
* [ruby/io-wait] Fix usage of `assert_raises` -> `assert_raise`. ↵Samuel Williams2022-06-251-2/+2
| | | | | | (https://github.com/ruby/io-wait/pull/20) https://github.com/ruby/io-wait/commit/c5c6abbb5c
* * remove trailing spaces. [ci skip]git2022-06-251-2/+2
|
* [ruby/io-wait] Don't add `IO#wait*` methods when `RUBY_IO_WAIT_METHODS` is ↵Samuel Williams2022-06-251-0/+28
| | | | | | | | | | defined by Ruby. (https://github.com/ruby/io-wait/pull/19) * Fix return value compatibility with Ruby 2.x. * Don't add `IO#wait*` methods in Ruby 3.2+. https://github.com/ruby/io-wait/commit/54c504d089
* [ruby/io-wait] Use omit instead of skip for test-unitHiroshi SHIBATA2022-01-121-1/+1
| | | | https://github.com/ruby/io-wait/commit/75543ab1bc
* [ruby/io-wait] Disable ractor test which is meaningless on earlier versionsNobuyoshi Nakada2021-11-161-5/+1
| | | | https://github.com/ruby/io-wait/commit/e8e1e99d4c
* [ruby/io-wait] Use `omit` as per test-unitNobuyoshi Nakada2021-11-161-1/+1
| | | | https://github.com/ruby/io-wait/commit/1f59f7b02f
* [ruby/io-wait] Declare as Ractor-safeNobuyoshi Nakada2021-03-071-0/+22
| | | | | | Fixes https://bugs.ruby-lang.org/issues/17659 https://github.com/ruby/io-wait/commit/ba338b4764
* [ruby/io-wait] Refined uncommon device type testsNobuyoshi Nakada2021-03-071-17/+16
| | | | https://github.com/ruby/io-wait/commit/0c73ebcf5d
* Add explicitly require for Dir.mktmpdirHiroshi SHIBATA2020-07-301-0/+1
|
* Scale sleeping times to wait for the OS operationsNobuyoshi Nakada2019-12-241-0/+4
|
* Synchronize with a Queue instead of sleepingNobuyoshi Nakada2019-12-241-4/+12
|
* Revert "Scale sleeping times"Koichi Sasada2019-12-241-4/+0
| | | | | | | | This reverts commit e57d6194218efc73c30f3fed9dd321d2e357030b. Test fails: http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2518563 http://ci.rvm.jp/results/trunk-gc_compact@silicon-docker/2518533
* Scale sleeping timesNobuyoshi Nakada2019-12-241-0/+4
|
* test_io_wait.rb: try to stabilize test_wait_readablek0kubun2018-12-311-1/+1
| | | | | | | that randomly fails https://rubyci.org/logs/mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/log/20181231T103312Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/io/wait/test_io_wait_uncommon.rb: relax /dev/random checknormal2018-08-251-1/+7
| | | | | | | | | | Too many machines lack entropy to have a usable /dev/random. I had similar problems on my system until I started using haveged(8), but we can't require that for CI. cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-trunk/log/20180825T213003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/io/wait/test_io_wait_uncommon.rb (test_tty_wait): increase timeoutnormal2018-08-091-1/+1
| | | | | | | Apparently my tty can't keep up when I run test-all with TESTS='-v --no-retry' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_wait_uncommon: new test for uncommon file typesnormal2018-05-151-0/+72
| | | | | | | | This should make portability problems more apparent when we try using ppoll with rb_wait_for_single_fd on FreeBSD or other non-Linux platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb (test_wait_readwrite_timeout):odaira2016-03-091-1/+8
| | | | | | | | select(2) in AIX returns "readable" for the write-side fd of a pipe, so it is not possible to use a pipe to test the read-write timeout of IO#wait on AIX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test: use assert_not_*nobu2016-02-191-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* wait readable/writablenobu2016-01-241-0/+12
| | | | | | | | * ext/io/wait/wait.c (io_wait_readwrite): [EXPERIMENTAL] allow to wait for multiple modes, readable and writable, at once. the arguments may change in the future. [Feature #12013] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_wait.rb: wait_readablenobu2016-01-241-0/+31
| | | | | | | * test/io/wait/test_io_wait.rb: add tests for IO#wait_readable, same as IO#wait. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/io/wait/test_io_wait.rb (test_wait_eof): test return valuenormal2015-10-221-1/+3
| | | | | | | I wrote some code which relies on this nowadays, but Ruby <=2.2 and earlier behaved differently... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use assert_raisenobu2015-06-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_wait.rb: no EOF testnobu2015-04-121-1/+3
| | | | | | | * test/io/wait/test_io_wait.rb (test_wait_eof): just test timeout. follow r50263. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io/wait: fix return value for buffered readnormal2015-03-011-1/+1
| | | | | | | | | | * ext/io/wait/wait.c (io_nread): wrap return value with INT2FIX Thanks to Yura Sokolov <funny.falcon@gmail.com> [ruby-core:68369] [Bug#10923] * test/io/wait/test_io_wait.rb (test_nread_buffered): fix broken test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Join threads.akr2014-05-301-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb (TestIOWait#test_wait_writable_timeout): giveusa2013-01-111-3/+3
| | | | | | | OS more time to clean up the file descriptor. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io_wait.rb: Bug #7420nobu2012-11-291-1/+1
| | | | | | | | | * test/io/wait/test_io_wait.rb (TestIOWait#fill_pipe): Errno::EWOULDBLOCK may not be the same as Errno::EAGAIN. patch by phasis68 (Heesob Park) at [ruby-core:49894]. [Bug #7420] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io/wait: add IO#wait_writable methodnobu2012-11-211-0/+36
| | | | | | | | | | * ext/io/wait/wait.c (io_wait_writable): this is easier to use than IO.select for a single IO object and is immune to the limitations/innefficiency of select() on platforms where poll/ppoll is available. patched by Eric Wong. [Feature #4646] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb (TestIOWait#setup): of course, theusa2011-09-211-1/+1
| | | | | | | behavior of mingw is just same with mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb (TestIOWait#{test_nread,test_ready?,usa2011-05-311-2/+5
| | | | | | | test_wait}: give system some time to process the written data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb: Linux socketpair(2) only supportkosaki2011-05-071-1/+5
| | | | | | | | | AF_UNIX, but windows socketpair doesn't support it. we can't avoid platform check. sigh! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb: use Socket.pair instaed of pipe.kosaki2011-05-071-8/+2
| | | | | | | | Windows can only treat a socket. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/io/wait/test_io_wait.rb: skip tests if the platform iskosaki2011-05-071-0/+7
| | | | | | | | mswin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix commit mistake of r31389.kosaki2011-04-301-0/+64
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e