aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2007-03-17 07:22:42 +0000
committerdanielk1977 <danielk1977@noemail.net>2007-03-17 07:22:42 +0000
commit933bbd6c8d36f9c9e6c9852f1f6045cffb742694 (patch)
tree106507a48c02b065e5d4a9e65c259f5a286a5557
parent0d9f55a17767c3408a8ebd6278c3395abd0fef59 (diff)
downloadsqlite-933bbd6c8d36f9c9e6c9852f1f6045cffb742694.tar.gz
sqlite-933bbd6c8d36f9c9e6c9852f1f6045cffb742694.zip
Combine the two very similar definitions of (crashsql) in the test scripts. (CVS 3694)
FossilOrigin-Name: eaf434d5887bf75330e1cea12be810dfe667b62a
-rw-r--r--manifest16
-rw-r--r--manifest.uuid2
-rw-r--r--test/crash.test41
-rw-r--r--test/tester.tcl12
4 files changed, 20 insertions, 51 deletions
diff --git a/manifest b/manifest
index 98b985089..83dfad92b 100644
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Out-of-memory\scleanup\sin\stokenizers.\s\sHandle\sNULL\sreturn\sfrom\nmalloc/calloc/realloc\sappropriately,\sand\suse\ssizeof(var)\sinstead\sof\nsizeof(type)\sto\smake\scertain\sthat\swe\sdon't\sget\sa\smismatch\sbetween\nthem\sas\sthe\scode\srots.\s(CVS\s3693)
-D 2007-03-16T18:30:54
+C Combine\sthe\stwo\svery\ssimilar\sdefinitions\sof\s(crashsql)\sin\sthe\stest\sscripts.\s(CVS\s3694)
+D 2007-03-17T07:22:43
F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -183,7 +183,7 @@ F test/colmeta.test 6505c73ab58796afcb7c89ba9f429d573fbc6e53
F test/conflict.test 8a59399f61a14296a9bfed02e0570590a8a79cba
F test/corrupt.test 18c7a995b1af76a8c8600b996257f2c7b7bff083
F test/corrupt2.test 572f8df0303d0ce63ddad5c5c9101a83a345ae46
-F test/crash.test 5f5f155393c5685b3842fef79b6fbafa55197d75
+F test/crash.test 61bf6b1467e6308faeb24053731a53b9810d0ad1
F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2
F test/date.test 63cc718e1d209b10c6b7be8ce72b11addb9f1e04
F test/default.test 252298e42a680146b1dd64f563b95bdf088d94fb
@@ -305,7 +305,7 @@ F test/table.test feea6a3eb08cf166f570255eea5447e42ef82498
F test/tableapi.test 036575a98dcce7c92e9f39056839bbad8a715412
F test/tclsqlite.test 51334389283c74bcbe28645a73159b17e239e9f3
F test/temptable.test c36f3e5a94507abb64f7ba23deeb4e1a8a8c3821
-F test/tester.tcl 552d2eb0f293bcda0bc3f9bb6004196fd7d23d0f
+F test/tester.tcl 4e062859b4a4597e23894b9afa2fbd320b9513a9
F test/thread1.test 776c9e459b75ba905193b351926ac4019b049f35
F test/thread2.test 6d7b30102d600f51b4055ee3a5a19228799049fb
F test/threadtest1.c 6029d9c5567db28e6dc908a0c63099c3ba6c383b
@@ -436,7 +436,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 8153edf8bea51b9344de1b700482879190f86fb4
-R 193c48ddae813be84d567590d530cec0
-U shess
-Z 0134f9e6ffacefea1f838756fe42f156
+P fbc53da8c645935c74e49af2ab2cf447dc72ba4e
+R 9f3ee429c1669bb49f23db6678a5b730
+U danielk1977
+Z be503f1e3c0d6d60b895890cf3d106d6
diff --git a/manifest.uuid b/manifest.uuid
index 063603ec8..0801472c0 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-fbc53da8c645935c74e49af2ab2cf447dc72ba4e \ No newline at end of file
+eaf434d5887bf75330e1cea12be810dfe667b62a \ No newline at end of file
diff --git a/test/crash.test b/test/crash.test
index 6ce9bc005..e08865882 100644
--- a/test/crash.test
+++ b/test/crash.test
@@ -17,7 +17,7 @@
# the modified I/O routines found in test6.c. These routines allow us
# to simulate the kind of file damage that occurs after a power failure.
#
-# $Id: crash.test,v 1.21 2006/01/06 14:32:20 drh Exp $
+# $Id: crash.test,v 1.22 2007/03/17 07:22:43 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -30,45 +30,6 @@ ifcapable !crashtest {
# set repeats 100
set repeats 10
-# This proc execs a seperate process that crashes midway through executing
-# the SQL script $sql on database test.db.
-#
-# The crash occurs during a sync() of file $crashfile. When the crash
-# occurs a random subset of all unsynced writes made by the process are
-# written into the files on disk. Argument $crashdelay indicates the
-# number of file syncs to wait before crashing.
-#
-# The return value is a list of two elements. The first element is a
-# boolean, indicating whether or not the process actually crashed or
-# reported some other error. The second element in the returned list is the
-# error message. This is "child process exited abnormally" if the crash
-# occured.
-proc crashsql {crashdelay crashfile sql} {
- set cfile [file join [pwd] $crashfile]
-
- set f [open crash.tcl w]
- puts $f "sqlite3_crashparams $crashdelay $cfile"
- puts $f "set sqlite_pending_byte $::sqlite_pending_byte"
- puts $f {sqlite3 db test.db}
-
- # This block sets the cache size of the main database to 10
- # pages. This is done in case the build is configured to omit
- # "PRAGMA cache_size".
- puts $f {db eval {SELECT * FROM sqlite_master;}}
- puts $f {set bt [btree_from_db db]}
- puts $f {btree_set_cache_size $bt 10}
-
- puts $f "db eval {"
- puts $f "$sql"
- puts $f "}"
- close $f
-
- set r [catch {
- exec [info nameofexec] crash.tcl >@stdout
- } msg]
- lappend r $msg
-}
-
# The following procedure computes a "signature" for table "abc". If
# abc changes in any way, the signature should change.
proc signature {} {
diff --git a/test/tester.tcl b/test/tester.tcl
index 9d2f684d7..ccce39fd1 100644
--- a/test/tester.tcl
+++ b/test/tester.tcl
@@ -11,7 +11,7 @@
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
-# $Id: tester.tcl,v 1.73 2007/03/15 12:17:43 drh Exp $
+# $Id: tester.tcl,v 1.74 2007/03/17 07:22:43 danielk1977 Exp $
# Make sure tclsqlite3 was compiled correctly. Abort now with an
# error message if not.
@@ -317,8 +317,16 @@ proc crashsql {crashdelay crashfile sql} {
set f [open crash.tcl w]
puts $f "sqlite3_crashparams $crashdelay $cfile"
+ puts $f "set sqlite_pending_byte $::sqlite_pending_byte"
puts $f "sqlite3 db test.db"
- puts $f "db eval {pragma cache_size = 10}"
+
+ # This block sets the cache size of the main database to 10
+ # pages. This is done in case the build is configured to omit
+ # "PRAGMA cache_size".
+ puts $f {db eval {SELECT * FROM sqlite_master;}}
+ puts $f {set bt [btree_from_db db]}
+ puts $f {btree_set_cache_size $bt 10}
+
puts $f "db eval {"
puts $f "$sql"
puts $f "}"