Граф коммитов

33 Коммитов

Автор SHA1 Сообщение Дата
Hiroshi SHIBATA bf2bd6dc22 [ruby/io-wait] Use omit instead of skip for test-unit
https://github.com/ruby/io-wait/commit/75543ab1bc
2022-01-12 10:53:57 +09:00
Nobuyoshi Nakada dc5512243b [ruby/io-wait] Disable ractor test which is meaningless on earlier versions
https://github.com/ruby/io-wait/commit/e8e1e99d4c
2021-11-16 20:25:44 +09:00
Nobuyoshi Nakada d305ae5f04 [ruby/io-wait] Use `omit` as per test-unit
https://github.com/ruby/io-wait/commit/1f59f7b02f
2021-11-16 20:25:41 +09:00
Nobuyoshi Nakada f6d5de8f33 [ruby/io-wait] Declare as Ractor-safe
Fixes https://bugs.ruby-lang.org/issues/17659

https://github.com/ruby/io-wait/commit/ba338b4764
2021-03-07 09:54:35 +09:00
Nobuyoshi Nakada ef9bde6516 [ruby/io-wait] Refined uncommon device type tests
https://github.com/ruby/io-wait/commit/0c73ebcf5d
2021-03-07 09:54:35 +09:00
Hiroshi SHIBATA ec1ab1d465
Add explicitly require for Dir.mktmpdir 2020-07-30 21:01:22 +09:00
Nobuyoshi Nakada a3c5dbf291
Scale sleeping times to wait for the OS operations 2019-12-24 18:53:14 +09:00
Nobuyoshi Nakada 81504e83e7
Synchronize with a Queue instead of sleeping 2019-12-24 15:48:08 +09:00
Koichi Sasada 47ad57f245 Revert "Scale sleeping times"
This reverts commit e57d619421.

Test fails:
http://ci.rvm.jp/results/trunk-gc-asserts@ruby-sky1/2518563
http://ci.rvm.jp/results/trunk-gc_compact@silicon-docker/2518533
2019-12-24 15:38:46 +09:00
Nobuyoshi Nakada e57d619421
Scale sleeping times 2019-12-24 14:56:17 +09:00
k0kubun 271c8f5d06 test_io_wait.rb: try to stabilize test_wait_readable
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
2018-12-31 12:54:40 +00:00
normal 32910b8781 test/io/wait/test_io_wait_uncommon.rb: relax /dev/random check
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
2018-08-25 22:32:35 +00:00
normal 15d7adf90e test/io/wait/test_io_wait_uncommon.rb (test_tty_wait): increase timeout
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
2018-08-09 08:51:22 +00:00
normal f4e451ce4b test_io_wait_uncommon: new test for uncommon file types
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
2018-05-15 00:08:33 +00:00
odaira 8f5cbc589c * test/io/wait/test_io_wait.rb (test_wait_readwrite_timeout):
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
2016-03-09 00:28:41 +00:00
nobu 311b715483 test: use assert_not_*
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-19 07:45:58 +00:00
nobu b58fac9a97 wait readable/writable
* 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
2016-01-24 07:55:05 +00:00
nobu 5320f8846b test_io_wait.rb: wait_readable
* 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
2016-01-24 05:30:54 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
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
2015-12-16 05:07:31 +00:00
normal d4fd2fb0a3 test/io/wait/test_io_wait.rb (test_wait_eof): test return value
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
2015-10-22 22:25:19 +00:00
nobu ae042f21fb use assert_raise
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02 02:18:44 +00:00
nobu 7b14512bee test_io_wait.rb: no EOF test
* 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
2015-04-12 06:46:28 +00:00
normal 26e1ebdc1e io/wait: fix return value for buffered read
* 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
2015-03-01 21:03:22 +00:00
akr ab4c6921cb Join threads.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30 13:48:06 +00:00
usa ffe2c179e4 * test/io/wait/test_io_wait.rb (TestIOWait#test_wait_writable_timeout): give
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
2013-01-11 07:11:54 +00:00
nobu 2f80fddadc test_io_wait.rb: Bug #7420
* 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
2012-11-29 08:11:10 +00:00
nobu e786aa711d io/wait: add IO#wait_writable method
* 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
2012-11-21 13:40:00 +00:00
usa f48ef8bb9e * test/io/wait/test_io_wait.rb (TestIOWait#setup): of course, the
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
2011-09-21 08:02:03 +00:00
usa 69dcd16351 * test/io/wait/test_io_wait.rb (TestIOWait#{test_nread,test_ready?,
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
2011-05-31 03:54:58 +00:00
kosaki f23fa4b011 * test/io/wait/test_io_wait.rb: Linux socketpair(2) only support
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
2011-05-07 20:21:38 +00:00
kosaki 16846eb90c * test/io/wait/test_io_wait.rb: use Socket.pair instaed of pipe.
Windows can only treat a socket.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 15:17:22 +00:00
kosaki 70e9201610 * test/io/wait/test_io_wait.rb: skip tests if the platform is
mswin.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-07 14:57:38 +00:00
kosaki e140be6956 fix commit mistake of r31389.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-30 16:02:11 +00:00