diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 09:43:49 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-21 09:43:49 +0000 |
| commit | 90890ef0232a734f3eb6f38b1551ef5d505deb90 (patch) | |
| tree | 3579c93be2e42a1b984e82e01637195c8a957540 /bootstraptest | |
| parent | e22e926cdf8992fc44888bc5da7ed2f7b3fac7c2 (diff) | |
| download | ruby-90890ef0232a734f3eb6f38b1551ef5d505deb90.tar.gz ruby-90890ef0232a734f3eb6f38b1551ef5d505deb90.tar.xz ruby-90890ef0232a734f3eb6f38b1551ef5d505deb90.zip | |
* io.c: write() should be in blocking region.
* bootstraptest/test_io.rb, test_knownbug.rb: move a fixed test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
| -rw-r--r-- | bootstraptest/test_io.rb | 16 | ||||
| -rw-r--r-- | bootstraptest/test_knownbug.rb | 15 |
2 files changed, 16 insertions, 15 deletions
diff --git a/bootstraptest/test_io.rb b/bootstraptest/test_io.rb index e62b9d15a..20a441de9 100644 --- a/bootstraptest/test_io.rb +++ b/bootstraptest/test_io.rb @@ -7,3 +7,19 @@ assert_finish 5, %q{ sleep 0.1 w.write "a" }, '[ruby-dev:31866]' + +assert_finish 10, %q{ + require "io/nonblock" + r, w = IO.pipe + w.nonblock = true + w.write_nonblock("a" * 100000) + w.nonblock = false + t1 = Thread.new { w.write("b" * 4096) } + t2 = Thread.new { w.write("c" * 4096) } + sleep 0.5 + r.sysread(4096).length + sleep 0.5 + r.sysread(4096).length + t1.join + t2.join +}, '[ruby-dev:32566]' diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 3d3f4dbd2..b97a08d92 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -3,18 +3,3 @@ # So all tests will cause failure. # -assert_finish 2, %q{ - require "io/nonblock" - r, w = IO.pipe - w.nonblock = true - w.write_nonblock("a" * 100000) - w.nonblock = false - t1 = Thread.new { w.write("b" * 4096) } - t2 = Thread.new { w.write("c" * 4096) } - sleep 0.5 - r.sysread(4096).length - sleep 0.5 - r.sysread(4096).length - t1.join - t2.join -}, '[ruby-dev:32566]' |
