diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2011-11-11 10:58:43 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2011-11-11 10:58:43 (GMT) |
commit | a907261ea1119035e5c0c7150e96c62127ec2390 (patch) | |
tree | 26d034a62a99ee9862be05b4ad377d8864692484 | |
parent | 3ad283728dbcb52ba80de264ac53c6f9bac43b87 (diff) | |
download | tcl-a907261ea1119035e5c0c7150e96c62127ec2390.zip tcl-a907261ea1119035e5c0c7150e96c62127ec2390.tar.gz tcl-a907261ea1119035e5c0c7150e96c62127ec2390.tar.bz2 |
Generalize previous fix to all of zlib.test; also, tidy up [chan configure] flags across zlib.test.
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | tests/zlib.test | 46 |
2 files changed, 24 insertions, 23 deletions
@@ -2,6 +2,7 @@ * tests/zlib.test: Use nonblocking writes in single-threaded IO tests to avoid deadlocks when going beyond OS buffers [Bug 3428756]. + Tidy up [chan configure] flags across zlib.test. 2011-11-03 Donal K. Fellows <dkf@users.sf.net> diff --git a/tests/zlib.test b/tests/zlib.test index 23f0229..236e6b6 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -130,7 +130,7 @@ test zlib-8.2 {zlib transformation} -constraints zlib -setup { } -result ok test zlib-8.3 {zlib transformation and fileevent} -constraints zlib -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { - fconfigure $c -translation binary + fconfigure $c -translation binary -buffering none -blocking 0 puts -nonewline $c [zlib gzip [string repeat a 81920]] close $c }}} 0] @@ -175,7 +175,7 @@ test zlib-9.1 "check fcopy with push" -constraints zlib -setup { } -result {copied 81920 size 81920} test zlib-9.2 "socket fcopy with push" -constraints zlib -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -encoding binary -translation binary + chan configure $c -translation binary -buffering none -blocking 0 puts -nonewline $c [zlib gzip [string repeat a 81920]] close $c }}} 0] @@ -197,7 +197,7 @@ test zlib-9.2 "socket fcopy with push" -constraints zlib -setup { test zlib-9.3 "socket fcopy bg (identity)" -constraints {tempNotWin zlib} -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { #puts "connection from $a:$p on $c" - chan configure $c -encoding binary -translation binary -blocking 0 + chan configure $c -translation binary -buffering none -blocking 0 puts -nonewline $c [string repeat a 81920] close $c }}} 0] @@ -222,7 +222,7 @@ test zlib-9.3 "socket fcopy bg (identity)" -constraints {tempNotWin zlib} -setup } -returnCodes {ok error} -result {read 81920 size 81920} test zlib-9.4 "socket fcopy bg (gzip)" -constraints zlib -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -encoding binary -translation binary + chan configure $c -translation binary -buffering none -blocking 0 puts -nonewline $c [zlib gzip [string repeat a 81920]] close $c }}} 0] @@ -247,7 +247,7 @@ test zlib-9.4 "socket fcopy bg (gzip)" -constraints zlib -setup { } -result {read 81920 size 81920} test zlib-9.5 "socket fcopy incremental (gzip)" -constraints zlib -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -encoding binary -translation binary + chan configure $c -translation binary -buffering none -blocking 0 puts -nonewline $c [zlib gzip [string repeat a 81920]] close $c }}} 0] @@ -281,7 +281,7 @@ test zlib-9.5 "socket fcopy incremental (gzip)" -constraints zlib -setup { } -result {{eof 81920} size 81920} test zlib-9.6 "bug #2818131 (gzip)" -constraints zlib -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -translation binary -buffering none + chan configure $c -translation binary -buffering none -blocking 0 zlib push gzip $c puts -nonewline $c [string repeat hello 100] close $c @@ -290,7 +290,7 @@ test zlib-9.6 "bug #2818131 (gzip)" -constraints zlib -setup { lassign [chan configure $srv -sockname] addr name port after 1000 {set ::total timeout} set s [socket $addr $port] - chan configure $s -translation binary -buffering none + chan configure $s -translation binary zlib push gunzip $s chan event $s readable [list apply {{s} { set d [read $s] @@ -308,7 +308,7 @@ test zlib-9.6 "bug #2818131 (gzip)" -constraints zlib -setup { } -result {eof 500} test zlib-9.7 "bug #2818131 (compress)" -constraints zlib -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -translation binary -buffering none + chan configure $c -translation binary -buffering none -blocking 0 zlib push compress $c puts -nonewline $c [string repeat hello 100] close $c @@ -317,7 +317,7 @@ test zlib-9.7 "bug #2818131 (compress)" -constraints zlib -setup { lassign [chan configure $srv -sockname] addr name port after 1000 {set ::total timeout} set s [socket $addr $port] - chan configure $s -translation binary -buffering none + chan configure $s -translation binary zlib push decompress $s chan event $s readable [list apply {{s} { set d [read $s] @@ -335,7 +335,7 @@ test zlib-9.7 "bug #2818131 (compress)" -constraints zlib -setup { } -result {eof 500} test zlib-9.8 "bug #2818131 (deflate)" -constraints zlib -setup { set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -translation binary -buffering none + chan configure $c -translation binary -buffering none -blocking 0 zlib push deflate $c puts -nonewline $c [string repeat hello 100] close $c @@ -344,7 +344,7 @@ test zlib-9.8 "bug #2818131 (deflate)" -constraints zlib -setup { lassign [chan configure $srv -sockname] addr name port after 1000 {set ::total timeout} set s [socket $addr $port] - chan configure $s -translation binary -buffering none + chan configure $s -translation binary zlib push inflate $s chan event $s readable [list apply {{s} { set d [read $s] @@ -363,7 +363,7 @@ test zlib-9.8 "bug #2818131 (deflate)" -constraints zlib -setup { test zlib-9.9 "bug #2818131 (gzip mismatch)" -constraints zlib -setup { proc bgerror {s} {set ::total [list error $s]} set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -translation binary -buffering none + chan configure $c -translation binary -buffering none -blocking 0 zlib push gzip $c puts -nonewline $c [string repeat hello 100] close $c @@ -373,7 +373,7 @@ test zlib-9.9 "bug #2818131 (gzip mismatch)" -constraints zlib -setup { after 1000 {set ::total timeout} set s [socket $addr $port] try { - chan configure $s -translation binary -buffering none + chan configure $s -translation binary zlib push inflate $s chan event $s readable [list apply {{s} { set d [read $s] @@ -395,7 +395,7 @@ test zlib-9.9 "bug #2818131 (gzip mismatch)" -constraints zlib -setup { test zlib-9.10 "bug #2818131 (compress mismatch)" -constraints zlib -setup { proc bgerror {s} {set ::total [list error $s]} set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -translation binary -buffering none + chan configure $c -translation binary -buffering none -blocking 0 zlib push compress $c puts -nonewline $c [string repeat hello 100] close $c @@ -405,7 +405,7 @@ test zlib-9.10 "bug #2818131 (compress mismatch)" -constraints zlib -setup { after 1000 {set ::total timeout} set s [socket $addr $port] try { - chan configure $s -translation binary -buffering none + chan configure $s -translation binary zlib push inflate $s chan event $s readable [list apply {{s} { set d [read $s] @@ -427,7 +427,7 @@ test zlib-9.10 "bug #2818131 (compress mismatch)" -constraints zlib -setup { test zlib-9.11 "bug #2818131 (deflate mismatch)" -constraints zlib -setup { proc bgerror {s} {set ::total [list error $s]} set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -translation binary -buffering none + chan configure $c -translation binary -buffering none -blocking 0 zlib push deflate $c puts -nonewline $c [string repeat hello 100] close $c @@ -437,7 +437,7 @@ test zlib-9.11 "bug #2818131 (deflate mismatch)" -constraints zlib -setup { after 1000 {set ::total timeout} set s [socket $addr $port] try { - chan configure $s -translation binary -buffering none + chan configure $s -translation binary zlib push gunzip $s chan event $s readable [list apply {{s} { set d [read $s] @@ -462,7 +462,7 @@ test zlib-10.0 "bug #2818131 (close with null interp)" -constraints { } -setup { proc bgerror {s} {set ::total [list error $s]} set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -translation binary -buffering none + chan configure $c -translation binary zlib push inflate $c chan event $c readable [list apply {{c} { set d [read $c] @@ -477,7 +477,7 @@ test zlib-10.0 "bug #2818131 (close with null interp)" -constraints { lassign [chan configure $srv -sockname] addr name port after 1000 {set ::total timeout} set s [socket $addr $port] - chan configure $s -translation binary -buffering none + chan configure $s -translation binary -buffering none -blocking 0 zlib push gzip $s chan event $s xyzzy [list apply {{s} { if {[gets $s line] < 0} { @@ -509,7 +509,7 @@ test zlib-10.1 "bug #2818131 (mismatch read)" -constraints { } } set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -translation binary -buffering none + chan configure $c -translation binary zlib push inflate $c chan event $c readable [list zlibRead $c] }}} 0] @@ -517,7 +517,7 @@ test zlib-10.1 "bug #2818131 (mismatch read)" -constraints { lassign [chan configure $srv -sockname] addr name port after 1000 {set ::total timeout} set s [socket $addr $port] - chan configure $s -translation binary -buffering none + chan configure $s -translation binary -buffering none -blocking 0 zlib push gzip $s chan event $s readable [list zlibRead $s] after idle [list apply {{s} { @@ -547,7 +547,7 @@ test zlib-10.2 "bug #2818131 (mismatch gets)" -constraints { } } set srv [socket -myaddr localhost -server {apply {{c a p} { - chan configure $c -translation binary -buffering none + chan configure $c -translation binary zlib push inflate $c chan event $c readable [list zlibRead $c] }}} 0] @@ -555,7 +555,7 @@ test zlib-10.2 "bug #2818131 (mismatch gets)" -constraints { lassign [chan configure $srv -sockname] addr name port after 1000 {set ::total timeout} set s [socket $addr $port] - chan configure $s -translation binary -buffering none + chan configure $s -translation binary -buffering none -blocking 0 zlib push gzip $s chan event $s readable [list zlibRead $s] after idle [list apply {{s} { |