summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
AgeCommit message (Collapse)Author
2015-10-30Old linux's default hard rlimit_nofile is 1024naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30use spawn's option to shorten the codenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29* test/ruby/test_io.rb (ruby): check the existence of the constant instead ofusa
checking platform. see also r52277. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-25test_io.rb: assert_separatelynobu
* test/ruby/test_io.rb (test_dup_many, test_set_lineno): use assert_separately for more descriptive messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-25fix conditions to setrlimitnobu
* test/ruby/test_io.rb (test_dup_many): limit FD only if possible. * test/ruby/test_process.rb (assert_fail_too_long_path): fix the condition for platform specific feature git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-24use rlimit_nproc other than Windowsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22limit the number of FDs in a process for stress testnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-29* test/ruby/test_io.rb (TestIO#test_open_flag_binary): typo of method name ↵usa
(test method itself, and calling method). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-29open the path instead of tempfile objectnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-29* io.c (rb_io_extract_modeenc): add option parameter `flags'naruse
to append extra oflags to normal mode. [Feature #11253] [ruby-core:69539] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30io.c: reopen OS encoding pathnobu
* io.c (rb_io_reopen): freopen(3) with OS encoding path. [ruby-core:69780] [Bug #11320] * win32/file.c (rb_freopen): wrapper of wchar version freopen(3). use _wfreopen_s() if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-30test_io.rb: skip method definitionsnobu
* test/ruby/{test_io,test_io_m17n}.rb: skip method definitions on unsupported platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-29io.c: reopen stdio streams correctly when given "w+"normal
* io.c (rb_io_oflags_modestr): handle O_TRUNC correctly * test/ruby/test_io.rb (test_reopen_stdio): new test Patch-by: cremno phobia <cremno@mail.ru> [ruby-core:69779] [Bug #11319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* test/ruby/test_io.rb: add test for IO.binread fd leak.eregon
See r50881. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-13* test/lib/envutil.rb (File.mkfifo): Defined using mkfifo command.akr
* test/ruby/test_io.rb: Ditto. * test/ruby/test_file_exhaustive.rb: Use File.mkfifo. * test/ruby/test_process.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50300 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12Test fifo without sleep.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-12* test/ruby/test_io.rb: New test that open(fifo) doesn't block otherakr
threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-30io.c: use read/write methods if possiblenobu
* io.c (copy_stream_body): use the arguments without conversion if having read, readpartial, and write methods, than conversion by to_path method. [ruby-core:68676] [Bug #11015] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-13io.c: don't raise after closenobu
* io.c (rb_io_close_read, rb_io_close_write): don't raise after close same as IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-26test_io.rb: separate platform-specific testsnobu
* test/ruby/test_io.rb: separate platform-specific tests at load time instead of runtime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-15* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-15* io.c (rb_io_close_m): Don't raise when the IO object is closed.akr
[ruby-core:67444] [Feature #10718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-05* test/ruby/test_io.rb: added timeout for AIX environment.hsbt
[ruby-core:62983][Bug #9917] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-23io.c: preserve encodingsnobu
* io.c (must_respond_to): preserve encodings of variable name and class name in warning message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-16test/ruby/test_io.rb: remove unnecessary begin/endnormal
Unnecessary since r47422 when the "rescue IOError" clause was removed. * test/ruby/test_io.rb (test_readpartial_locktmp): remove unnecessary begin/end git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10* win32/win32.c, include/win32/win32.h (rb_w32_set_nonblock): newusa
function to support nonblock-mode of pipes. * win32/win32.c (rb_w32_read): nonblock-mode pipe returns ERROR_NO_DATA if there is no data, but also returns it if remote-end is closed. * win32/win32.c (rb_w32_write): if cannot to write any data, it may be blocking. * io.c (rb_io_set_nonblock): use rb_w32_set_nonblock for Windows. * ext/io/nonblock/nonblock.c (rb_io_nonblock_set): use ruby's API when setting nonblock-mode. * test/ruby/test_io.rb: test nonblock pipes on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-01* test/ruby/envutil.rb (assert_join_threads): New assertion toakr
join multiple threads without exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25A test renamed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-25* io.c (io_binwrite_string): Test writev() failure.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-03* test/ruby/test_io.rb (TestIO#test_advise): avoid to infinite loop.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-03* test/ruby/test_io.rb (TestIO#test_advise): added workaround of fadvise(2)hsbt
with tmpfs and old linux kernel. [ruby-core:65355][Bug #10313] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-02test_advice show OS and filesystem when failed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05test/ruby/test_io.rb: use IO#nonblock=normal
* test/ruby/test_io.rb (test_readpartial_locktmp): use IO#nonblock= Old fcntl invocation may drop necessary flags on some platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-05test/ruby/test_io.rb: avoid EBADFnormal
* test/ruby/test_io.rb (test_readpartial_locktmp): avoid EBADF [ruby-core:64773] [ruby-core:64775] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02* test/ruby/test_io.rb (test_new_with_block): Set autoclose to avoid EBADF.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-02test_io.rb: ignore stream closed IOErrornobu
* test/ruby/test_io.rb (test_readpartial_locktmp): stream closed IOError while reading is not a matter. [Bug #10193] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-28test_io.rb: non UTF-8 patternnobu
* test/ruby/test_io.rb: (test_invalid_advise): fix pattern for non UTF-8 environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-28io.c: preserve encodingsnobu
* io.c (advice_arg_check): preserve encodings in warning messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-28io.c: preserve encodingsnobu
* io.c (rb_io_s_new): preserve encodings in warning messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-26io.c: do not swallow exceptions at end of blocknobu
* io.c (io_close): ignore only "closed stream" IOError and NoMethodError, do not swallow other exceptions at the end of block. [ruby-core:64463] [Bug #10153] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-14test_io.rb: investigationnobu
* test/ruby/test_io.rb (test_readpartial_locktmp): check if the reader thread is alive before write. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-09test_io.rb: fix tempfile leaksnobu
* test/ruby/test_io.rb (test_flush_in_finalizer2): cannot unlink opened file on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-09test_io.rb: fix assertionnobu
* test/ruby/test_io.rb (test_advise): fix inverted arguments order by assert_nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-02test_io.rb: fix leaked threadsnobu
* test/ruby/test_io.rb (test_readpartial_locktmp): ensure reading thread is dead to fix leaked threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-06io.c: not shorten buffer unless succeedednobu
* io.c (io_setstrbuf, io_read): should not shorten the given buffer until read succeeds. [ruby-core:55951] [Bug #8625] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-29* io.c (rb_io_s_pipe): Close pipes if io_encoding_set() raises anakr
exception. (io_encoding_set_v): New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-28* test/ruby/test_io.rb (test_flush_in_finalizer1): Useakr
ObjectSpace.each_object to close files. GC.start is not reliable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-27* test/lib/minitest/unit.rb: Use Tempfile#close! instead ofakr
Tempfile#unlink to close file descriptors. * test/openssl/test_config.rb: Ditto. * test/ruby/test_io.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-27* test/ruby/test_io.rb (test_flush_in_finalizer1): some opened fds areusa
remain before GC, so unlink the tempfile is failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e