summaryrefslogtreecommitdiff
path: root/spec/ruby/core/io
AgeCommit message (Collapse)Author
2018-08-20spec/ruby/core/io/select_spec.rb: workaround stuck IO.selectnormal
Under pipe page memory pressure on Linux, a pipe may only be created with a single buffer[1]. And as of Linux v4.18, the fs/pipe.c::pipe_poll callback does not account for merging done in fs/pipe::pipe_write; only the number of usable buffers in the pipe. Thus it is possible for a pipe to be writable (if only by a small amount) despite IO.select saying it is not. With the default 16384 /proc/sys/fs/pipe-user-pages-soft value and the pipe having 16 pages of buffers, this issue is trivially reproducible by creating 1024 pipes in a background process before running the spec: $ ulimit -n 2053 # or something higher $ ./miniruby -e '1024.times.map { IO.pipe }; sleep' & $ make test-spec MSPECOPT=spec/ruby/core/io/select_spec.rb So, we create a new pipe we never write to for testing writability of IO.select. This may cause the test to fail with ENFILE on an overloaded system, but at least that's an obvious failure (unlike having a test get stuck). This should reduce failures on our overloaded CI machines: http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1239426 [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/pipe.c?h=v4.18#n642 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Update to ruby/spec@9be7c7eeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Update to ruby/spec@a454137eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-13Update to ruby/spec@4bb0f25eregon
* Specs added by TruffleRuby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-04-28Update to ruby/spec@6f38a82eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-04Update to ruby/spec@c1b568beregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-27Update to ruby/spec@cbe855ceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-29Update to ruby/spec@83063a3eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-27Update to ruby/spec@0fe33aceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-18Use syswrite to avoid potential buffering in IO#select speceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-01Update to ruby/spec@bacedc5eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29Clarify what is written and read in IO#popen speceregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-29Fix spec which can fail if the pipe is closed before flushing in the subprocesseregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-28Update to ruby/spec@a6b8805eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-25io.c: write a newline togethernobu
* io.c (rb_io_puts): write a newline together at once for each argument. based on the patch by rohitpaulk (Rohit Kuruvilla) at [ruby-core:83508]. [Feature #14042] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-28Update to ruby/spec@691755deregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-20Move spec/rubyspec to spec/ruby for consistencyeregon
* Other ruby implementations use the spec/ruby directory. [Misc #13792] [ruby-core:82287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e