summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-10-15 10:12:55 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-10-15 10:12:55 (GMT)
commitfead0fac7d5a920009e8dd9cc9a3a9992151c9a0 (patch)
tree16c23308c397ee3c97add1bf98936de9e6b7be71 /tests
parent8c2f47321dea1fe813bb8ca865d2cff1a9b08236 (diff)
downloadtcl-fead0fac7d5a920009e8dd9cc9a3a9992151c9a0.zip
tcl-fead0fac7d5a920009e8dd9cc9a3a9992151c9a0.tar.gz
tcl-fead0fac7d5a920009e8dd9cc9a3a9992151c9a0.tar.bz2
Fix zipfs long path memory leaks [9525f4c8bc]
Diffstat (limited to 'tests')
-rw-r--r--tests/zipfs.test12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/zipfs.test b/tests/zipfs.test
index 025d4c1..a7a6a1d 100644
--- a/tests/zipfs.test
+++ b/tests/zipfs.test
@@ -694,8 +694,8 @@ namespace eval test_ns_zipfs {
cleanup
} -body {
# Primarily verifies that drive letters are stripped and paths maintained
- lsort [zipfs list]
- } -result {//zipfs:/testmount //zipfs:/testmount/filename.txt //zipfs:/testmount/src //zipfs:/testmount/src/tcltk //zipfs:/testmount/src/tcltk/wip //zipfs:/testmount/src/tcltk/wip/tcl //zipfs:/testmount/src/tcltk/wip/tcl/tests //zipfs:/testmount/src/tcltk/wip/tcl/tests/zipfiles //zipfs:/testmount/src/tcltk/wip/tcl/tests/zipfiles/abspath.txt //zipfs:/testmount/src/tcltk/wip/tcl/tests/zipfiles/fullpath.txt}
+ lsort [zipfs find $defMountPt]
+ } -result {//zipfs:/testmount/filename.txt //zipfs:/testmount/src //zipfs:/testmount/src/tcltk //zipfs:/testmount/src/tcltk/wip //zipfs:/testmount/src/tcltk/wip/tcl //zipfs:/testmount/src/tcltk/wip/tcl/tests //zipfs:/testmount/src/tcltk/wip/tcl/tests/zipfiles //zipfs:/testmount/src/tcltk/wip/tcl/tests/zipfiles/abspath.txt //zipfs:/testmount/src/tcltk/wip/tcl/tests/zipfiles/fullpath.txt}
#
# zipfs list
@@ -1917,6 +1917,14 @@ namespace eval test_ns_zipfs {
read $fd
close $fd
} -result ""
+
+ # Following will only show a leak with valgrind
+ test bug-9525f4c8bc "Memory leak with long mount paths" -body {
+ set mt //zipfs:[string repeat /x 240]
+ zipfs mount [zippath test.zip] $mt
+ zipfs unmount $mt
+ } -result ""
+
}