diff options
| author | dgp@users.sourceforge.net <dgp> | 2014-05-09 17:35:12 (GMT) |
|---|---|---|
| committer | dgp@users.sourceforge.net <dgp> | 2014-05-09 17:35:12 (GMT) |
| commit | 65b859739ed3b36ab239a3334d8efda38519a1c5 (patch) | |
| tree | be7a30d98e0fdf4aa3e24e22e2a8c348365c9bdd | |
| parent | 9c57c4957bbeedf6858de423903a9d3e6a5863ab (diff) | |
| parent | d67305a759f4e86214a3ee673810b7e2341d6249 (diff) | |
| download | tcl-65b859739ed3b36ab239a3334d8efda38519a1c5.zip tcl-65b859739ed3b36ab239a3334d8efda38519a1c5.tar.gz tcl-65b859739ed3b36ab239a3334d8efda38519a1c5.tar.bz2 | |
Correct namespace bugs in normally skipped tests. Constrain them as "knownBug" rather than "unknownFailure".
| -rw-r--r-- | tests/iogt.test | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/tests/iogt.test b/tests/iogt.test index 33a6425..dd58df0 100644 --- a/tests/iogt.test +++ b/tests/iogt.test @@ -310,7 +310,7 @@ proc counter_audit {var vtrail op data} { } proc rblocks {var vtrail n op data} { - namespace upvar [namespace current] $var n $vtrail trail + namespace upvar [namespace current] $var buf $vtrail trail set res {} @@ -604,7 +604,7 @@ test iogt-3.0 {Tcl_Channel valid after stack/unstack, fevent handling} -setup { proc DoneCopy {n {err {}}} { variable copy 1 } -} -constraints {testchannel hangs} -body { +} -constraints {testchannel knownBug} -body { # This test to check the validity of aquired Tcl_Channel references is not # possible because even a backgrounded fcopy will immediately start to # copy data, without waiting for the event loop. This is done only in case @@ -615,6 +615,7 @@ test iogt-3.0 {Tcl_Channel valid after stack/unstack, fevent handling} -setup { # delay, causing the fcopy to underflow immediately. set fin [open $path(dummy) r] fevent 1000 500 {20 20 20 10 1 1} { + variable copy close $fin set fout [open dummyout w] flush $sock; # now, or fcopy will error us out @@ -648,23 +649,30 @@ test iogt-4.0 {fileevent readable, after transform} -setup { proc Done {args} { variable stop 1 } -} -constraints {testchannel hangs} -body { + proc Get {sock} { + variable trail + variable got + if {[eof $sock]} { + Done + lappend trail "xxxxxxxxxxxxx" + close $sock + return + } + lappend trail "vvvvvvvvvvvvv" + lappend trail "\tgot: [lappend got "\[\[[read $sock]\]\]"]" + lappend trail "=============" + #puts stdout $__ ; flush stdout + #read $sock + } + +} -constraints {testchannel knownBug} -body { fevent 1000 500 {20 20 20 10 1} { + variable stop audit_flow trail -attach $sock rblocks_t rbuf trail 23 -attach $sock - fileevent $sock readable [namespace code { - if {[eof $sock]} { - Done - lappend trail "xxxxxxxxxxxxx" - close $sock - } else { - lappend trail "vvvvvvvvvvvvv" - lappend trail "\tgot: [lappend got "\[\[[read $sock]\]\]"]" - lappend trail "=============" - #puts stdout $__; flush stdout - #read $sock - } - }] + + fileevent $sock readable [namespace code [list Get $sock]] + flush $sock; # Now, or fcopy will error us out # But the 1 second delay should be enough to initialize everything # else here. @@ -673,6 +681,7 @@ test iogt-4.0 {fileevent readable, after transform} -setup { join [list [join $got \n] ~~~~~~~~ [join $trail \n]] \n } -cleanup { rename Done {} + rename Get {} } -result {[[]] [[abcdefghijklmnopqrstuvw]] [[xyz0123456789,./?><;'\|]] @@ -760,7 +769,7 @@ test iogt-5.0 {EOF simulation} -setup { set fin [open $path(dummy) r] set fout [open $path(dummyout) w] set trail [list] -} -constraints {testchannel unknownFailure} -result { +} -constraints {testchannel knownBug} -result { audit_flow trail -attach $fin stopafter_audit d trail 20 -attach $fin audit_flow trail -attach $fout |
