From 6aa2bc6d5c78c18a1562bdae776914890037f24f Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Fri, 20 Oct 2023 16:53:14 +0000 Subject: Add test to trigger bug 33b2486199 --- tests/zipfs.test | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/zipfs.test b/tests/zipfs.test index c1cde5e..d8817f8 100644 --- a/tests/zipfs.test +++ b/tests/zipfs.test @@ -19,6 +19,7 @@ if {"::tcltest" ni [namespace children]} { source [file join [file dirname [info script]] tcltests.tcl] testConstraint zipfs [expr {[llength [info commands zipfs]]}] +testConstraint thread [expr {0 == [catch {package require Thread 2.8-}]}] set ziproot [zipfs root] @@ -1923,6 +1924,14 @@ namespace eval test_ns_zipfs { zipfs unmount $mt } -result "" + test bug-33b2486199 "zipfs unmounted on thread exit" -constraints { + thread + } -body { + set before [lsort [zipfs mount]] + thread::release [thread::create] + after 100; # Needed to allow the spawned thread to exit to trigger bug + string equal $before [lsort [zipfs mount]] + } -result 1 } -- cgit v0.12