summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-15 20:39:40 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-15 20:39:40 (GMT)
commit1d0aa1a4beb25c12aa52099b1de6c4227578333a (patch)
treeaffaa72bf1bfcf15eb92c0b19b32e208a0fed824
parent5fdb3151b9ad85b063a3e12ede968dd1efe74ea8 (diff)
downloadtcl-1d0aa1a4beb25c12aa52099b1de6c4227578333a.zip
tcl-1d0aa1a4beb25c12aa52099b1de6c4227578333a.tar.gz
tcl-1d0aa1a4beb25c12aa52099b1de6c4227578333a.tar.bz2
* Improved constraints to protect /tmp. [Bug 581403]
-rw-r--r--ChangeLog5
-rw-r--r--tests/unixInit.test12
2 files changed, 12 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index b8cb980..f06e632 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-15 Don Porter <dgp@users.sourceforge.net>
+
+ * tests/unixInit.test: Improved constraints to protect /tmp.
+ [Bug 581403]
+
2002-07-15 Vince Darley <vincentdarley@users.sourceforge.net>
* tests/winFCmd.test: renamed 'win2000' and 'notWin2000' to
diff --git a/tests/unixInit.test b/tests/unixInit.test
index dc5336d..a5f5303 100644
--- a/tests/unixInit.test
+++ b/tests/unixInit.test
@@ -10,12 +10,11 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: unixInit.test,v 1.27 2002/07/10 11:56:45 dgp Exp $
+# RCS: @(#) $Id: unixInit.test,v 1.28 2002/07/15 20:39:42 dgp Exp $
package require tcltest 2
namespace import -force ::tcltest::*
-testConstraint notInstalledInTmp [string match /tmp/lib/* [info library]]
if {[info exists env(TCL_LIBRARY)]} {
set oldlibrary $env(TCL_LIBRARY)
unset env(TCL_LIBRARY)
@@ -197,7 +196,10 @@ test unixInit-2.7 {TclpInitLibraryPath: compiled-in library path} \
# these tests need paths near the "root" of the file system to present
# themselves.
#
-test unixInit-2.8 {TclpInitLibraryPath: all absolute pathtype} {unixOnly notInstalledInTmp} {
+testConstraint noSparkly [expr {![file exists [file join /tmp sparkly]]}]
+testConstraint noTmpInstall [expr {![file exists \
+ [file join /tmp lib tcl[info tclversion]]]}]
+test unixInit-2.8 {TclpInitLibraryPath: all absolute pathtype} {unix noSparkly noTmpInstall} {
# Checking for Bug 219416
# When a program that embeds the Tcl library, like tcltest, is
# installed near the "root" of the file system, there was a problem
@@ -246,8 +248,8 @@ test unixInit-2.8 {TclpInitLibraryPath: all absolute pathtype} {unixOnly notInst
if {$deletelib} {file delete -force /tmp/lib}
set allAbsolute
} 1
-test unixInit-2.9 {TclpInitLibraryPath: paths relative to executable} {
- unixOnly} {
+testConstraint noTmpBuild [expr {![file exists [file join /tmp library]]}]
+test unixInit-2.9 {TclpInitLibraryPath: paths relative to executable} {unix noSparkly noTmpBuild} {
# Checking for Bug 438014
file delete -force /tmp/sparkly
file delete -force /tmp/library