diff options
author | dgp <dgp@users.sourceforge.net> | 2011-09-19 15:26:24 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-09-19 15:26:24 (GMT) |
commit | 98beddd6429070e487cb053456b80c32fc6a46a8 (patch) | |
tree | e91f2e8f8427917f28cc952585d0118d448a7010 /tests/ioCmd.test | |
parent | 3e92af7b9846335e56bd6ff8e360b717dd752b7d (diff) | |
download | tcl-98beddd6429070e487cb053456b80c32fc6a46a8.zip tcl-98beddd6429070e487cb053456b80c32fc6a46a8.tar.gz tcl-98beddd6429070e487cb053456b80c32fc6a46a8.tar.bz2 |
Constrain test iocmd.tf-32.1 to be skipped during valgrinding. It contains a
memory leak that cannot be plugged while testing what the test aims to test.
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r-- | tests/ioCmd.test | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test index d45f7aa..4c08229 100644 --- a/tests/ioCmd.test +++ b/tests/ioCmd.test @@ -3510,7 +3510,6 @@ test iocmd.tf-31.8 {chan postevent, bad input} -match glob -body { # B. Must not crash, must return proper errors. test iocmd.tf-32.0 {origin thread of moved channel gone} -match glob -body { -#LEAKS! #puts <<$tcltest::mainThread>>main set tida [thread::create -preserved];#puts <<$tida>> @@ -3548,8 +3547,20 @@ test iocmd.tf-32.0 {origin thread of moved channel gone} -match glob -body { } -constraints {testchannel thread} \ -result {1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost} 1 {Owner lost}} + +# The test iocmd.tf-32.1 unavoidably exhibits a memory leak. We are testing +# the ability of the reflected channel system to react to the situation where +# the thread in which the driver routines runs exits during driver operations. +# In this case, thread exit handlers signal back to the owner thread so that the +# channel operation does not hang. There's no way to test this without actually +# exiting a thread in mid-operation, and that action is unavoidably leaky (which +# is why [thread::exit] is advised against). +# +# Use constraints to skip this test while valgrinding so this expected leak +# doesn't prevent a finding of "leak-free". +# +testConstraint notValgrind [expr {![testConstraint valgrind]}] test iocmd.tf-32.1 {origin thread of moved channel destroyed during access} -match glob -body { -#LEAKS! #puts <<$tcltest::mainThread>>main set tida [thread::create -preserved];#puts <<$tida>> @@ -3564,7 +3575,7 @@ test iocmd.tf-32.1 {origin thread of moved channel destroyed during access} -mat oninit; onfinal; track; # destroy thread during channel access thread::exit - return} + } set chan [chan create {r w} foo] fconfigure $chan -buffering none set chan @@ -3592,7 +3603,7 @@ test iocmd.tf-32.1 {origin thread of moved channel destroyed during access} -mat catch {thread::release $tida} thread::release $tidb set res -} -constraints {testchannel thread} \ +} -constraints {testchannel thread notValgrind} \ -result {Owner lost} # ### ### ### ######### ######### ######### |