summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2004-07-10 20:38:43 (GMT)
committerKevin B Kenny <kennykb@acm.org>2004-07-10 20:38:43 (GMT)
commit7609e2c3a04295aac611eb1a860eeb060bbfc4fd (patch)
treec796ed532919c3a950dcf8120ea715ed84f50d97
parent5f7664fb28c03bce899572a39a9e3b343c223f3a (diff)
downloadtcl-7609e2c3a04295aac611eb1a860eeb060bbfc4fd.zip
tcl-7609e2c3a04295aac611eb1a860eeb060bbfc4fd.tar.gz
tcl-7609e2c3a04295aac611eb1a860eeb060bbfc4fd.tar.bz2
clock.test: Changed clock-2.11 so that it isn't an infinite loop when
run on a slow virtual machine.
-rw-r--r--ChangeLog8
-rw-r--r--tests/clock.test13
2 files changed, 17 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 29fb3ba..f8ce13c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-10 Kevin Kenny <kennykb@acm.org>
+
+ * tests/clock.test (clock-2.11): Changed the test so that
+ it isn't an infinite loop when run under valgrind on a slow
+ virtual machine. Thanks to Miguel Sofer for the bug report.
+
2004-07-08 Miguel Sofer <msofer@users.sf.net>
* generic/tclBasic.c (DeleteInterpProc): reverted the modification
@@ -23,7 +29,7 @@
2004-07-07 Don Porter <dgp@users.sourceforge.net>
- * generic.tclCmdMZ.c (TclMergeReturnOptions): Simplified logic and
+ * generic/tclCmdMZ.c (TclMergeReturnOptions): Simplified logic and
removed potential memory leak. [Bug 986257].
2004-07-07 Donal K. Fellows <donal.k.fellows@man.ac.uk>
diff --git a/tests/clock.test b/tests/clock.test
index 56861ce..9f6921e 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: clock.test,v 1.31 2004/06/23 15:36:55 dkf Exp $
+# RCS: @(#) $Id: clock.test,v 1.32 2004/07/10 20:38:44 kennykb Exp $
set env(LC_TIME) POSIX
@@ -89,13 +89,20 @@ test clock-2.10 {clock clicks test, micros align with seconds} {
test clock-2.11 {clock clicks test, millis align with micros} {
set t1 [clock clicks -millis]
- while { 1 } {
+ set i 0
+ while { $i < 1000 } {
set t2 [clock clicks -micros]
set t3 [clock clicks -millis]
if { $t3 == $t1 } break
set t1 $t3
+ incr i
}
- expr { $t2 / 1000 == $t3 }
+ if { $i >= 1000 } {
+ set result {can't test millis/micros alignment, loop running too slow}
+ } else {
+ set result [expr { $t2 / 1000 == $t3 }]
+ }
+ set result
} {1}
test clock-2.12 {clock clicks test, wrong num args} {