From 0c863a2fc66cae2abec782232dd633e0aa561672 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 6 Mar 2017 20:02:55 +0000 Subject: zlib.test: fix sporadic errors: - zlib-9.2 hangs because of too short update, if processed another event; - zlib-8.8 wrong non-blocking pipe usage - [string length $compressed] may return sporadically values smaller as expected (< 222) --- tests/zlib.test | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/zlib.test b/tests/zlib.test index 1e69745..63bac7e 100644 --- a/tests/zlib.test +++ b/tests/zlib.test @@ -311,7 +311,7 @@ test zlib-8.8 {transformation and fconfigure} -setup { lassign [chan pipe] inSide outSide } -constraints zlib -body { zlib push compress $outSide -dictionary $spdyDict - fconfigure $outSide -blocking 0 -translation binary -buffering none + fconfigure $outSide -blocking 1 -translation binary -buffering none fconfigure $inSide -blocking 1 -translation binary puts -nonewline $outSide $spdyHeaders chan pop $outSide @@ -508,6 +508,7 @@ test zlib-9.2 "socket fcopy with push" -constraints zlib -setup { chan configure $c -translation binary -buffering none -blocking 0 puts -nonewline $c [zlib gzip [string repeat a 81920]] close $c + set ::total -1 }}} 0] set file [makeFile {} test.gz] } -body { @@ -515,7 +516,10 @@ test zlib-9.2 "socket fcopy with push" -constraints zlib -setup { set sin [socket $addr $port] chan configure $sin -translation binary zlib push gunzip $sin - update + after 1000 {set ::total timeout} + vwait ::total + after cancel {set ::total timeout} + if {$::total != -1} {error "unexpected value $::total of ::total"} set total [fcopy $sin [set fout [open $file wb]]] close $sin close $fout -- cgit v0.12 From 542acc2feab327a28153eb288b65e3508a924be6 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 6 Mar 2017 20:05:13 +0000 Subject: nre.test: add constraint for nre-0.1 (testnreunwind may be not available) --- tests/nre.test | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/nre.test b/tests/nre.test index 9df5eb1..09061d2 100644 --- a/tests/nre.test +++ b/tests/nre.test @@ -64,9 +64,11 @@ if {[testConstraint testnrelevels]} { namespace import testnre::* } -test nre-0.1 {levels while unwinding} { +test nre-0.1 {levels while unwinding} -body { testnreunwind -} {0 0 0} +} -constraints { + testnrelevels +} -result {0 0 0} test nre-1.1 {self-recursive procs} -setup { proc a i [makebody {a $i}] -- cgit v0.12 From 72972a21efecd282225c91662d7f83037434f63e Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 6 Mar 2017 20:07:08 +0000 Subject: chanio.test: [win] fix test case (setup set translation to "lf", because of default translation on windows "crlf") --- tests/chanio.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/chanio.test b/tests/chanio.test index 9a27233..31bef36 100644 --- a/tests/chanio.test +++ b/tests/chanio.test @@ -6775,7 +6775,7 @@ test chan-io-52.10 {TclCopyChannel & encodings} {fcopy} { } 5 test chan-io-52.11 {TclCopyChannel & encodings} -setup { set f [open $path(utf8-fcopy.txt) w] - fconfigure $f -encoding utf-8 + fconfigure $f -encoding utf-8 -translation lf puts $f "\u0410\u0410" close $f } -constraints {fcopy} -body { -- cgit v0.12