summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 04:55:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 04:55:46 +0000
commit2eb3c2c52850690a3fd2bc2267f8eafdab62c950 (patch)
treed49d1115a701657b41660de936cc3a7be90a10e9
parentf662d31b6bd229501456b9aaff45b26c4163f928 (diff)
* test/ruby/test_io.rb: New test that open(fifo) doesn't block other
threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_io.rb14
2 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 56615e4817..1964936c2d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Apr 12 13:54:05 2015 Tanaka Akira <akr@fsij.org>
+
+ * test/ruby/test_io.rb: New test that open(fifo) doesn't block other
+ threads.
+
Sun Apr 12 13:52:18 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* ext/coverage/coverage.c: Remove extension from require argument.
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index c37d14c47f..11ef5252e6 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -3178,4 +3178,18 @@ End
assert_raise(IOError) { io.close }
end
+ def test_open_fifo_does_not_block_other_threads
+ mkcdtmpdir {
+ assert(system("mkfifo", "fifo"), "mkfifo fails")
+ assert_separately([], <<-'EOS')
+ t = Thread.new {
+ open("fifo") {}
+ }
+ sleep 0.1 until t.status == "sleep"
+ sleep 0.1
+ assert(true)
+ EOS
+ }
+ end if /mswin|mingw|bccwin/ !~ RUBY_PLATFORM
+
end