Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Combine the two very similar definitions of (crashsql) in the test scripts. (CVS 3694) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
eaf434d5887bf75330e1cea12be810df |
User & Date: | danielk1977 2007-03-17 07:22:43.000 |
Context
2007-03-17
| ||
10:26 | Modifications to crash-test infrastructure. (CVS 3695) (check-in: c4be8d9949 user: danielk1977 tags: trunk) | |
07:22 | Combine the two very similar definitions of (crashsql) in the test scripts. (CVS 3694) (check-in: eaf434d588 user: danielk1977 tags: trunk) | |
2007-03-16
| ||
18:30 | Out-of-memory cleanup in tokenizers. Handle NULL return from malloc/calloc/realloc appropriately, and use sizeof(var) instead of sizeof(type) to make certain that we don't get a mismatch between them as the code rots. (CVS 3693) (check-in: fbc53da8c6 user: shess tags: trunk) | |
Changes
Changes to test/crash.test.
︙ | ︙ | |||
13 14 15 16 17 18 19 | # The focus of this file is testing the ability of the database to # uses its rollback journal to recover intact (no database corruption) # from a power failure during the middle of a COMMIT. The OS interface # modules are overloaded in a separate instance of testfixture using # 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. # | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # The focus of this file is testing the ability of the database to # uses its rollback journal to recover intact (no database corruption) # from a power failure during the middle of a COMMIT. The OS interface # modules are overloaded in a separate instance of testfixture using # 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.22 2007/03/17 07:22:43 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl ifcapable !crashtest { finish_test return } # set repeats 100 set repeats 10 # The following procedure computes a "signature" for table "abc". If # abc changes in any way, the signature should change. proc signature {} { return [db eval {SELECT count(*), md5sum(a), md5sum(b), md5sum(c) FROM abc}] } proc signature2 {} { return [db eval {SELECT count(*), md5sum(a), md5sum(b), md5sum(c) FROM abc2}] |
︙ | ︙ |
Changes to test/tester.tcl.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements some common TCL routines used for regression # testing the SQLite library # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements some common TCL routines used for regression # testing the SQLite library # # $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. # if {[sqlite3 -tcl-uses-utf]} { if {"\u1234"=="u1234"} { puts stderr "***** BUILD PROBLEM *****" |
︙ | ︙ | |||
313 314 315 316 317 318 319 320 | if {$::tcl_platform(platform)!="unix"} { error "crashsql should only be used on unix" } set cfile [file join [pwd] $crashfile] set f [open crash.tcl w] puts $f "sqlite3_crashparams $crashdelay $cfile" puts $f "sqlite3 db test.db" | > | > > > > > > > | 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | if {$::tcl_platform(platform)!="unix"} { error "crashsql should only be used on unix" } 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 |
︙ | ︙ |