1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Changes to crash-test io backend (test6.c) so that it works with the sqlite3_vfs interface. (CVS 4247)

FossilOrigin-Name: 40f66ada815fa1043d24c9cd6d898e1797e7044a
This commit is contained in:
danielk1977
2007-08-20 14:23:44 +00:00
parent abddb0c8c4
commit 967a4a1c96
11 changed files with 145 additions and 176 deletions

View File

@ -17,7 +17,7 @@
# These routines allow us to simulate the kind of file damage that
# occurs after a power failure.
#
# $Id: crash.test,v 1.24 2007/05/23 06:25:13 danielk1977 Exp $
# $Id: crash.test,v 1.25 2007/08/20 14:23:44 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -28,7 +28,7 @@ ifcapable !crashtest {
}
set repeats 100
# set repeats 10
#set repeats 10
# The following procedure computes a "signature" for table "abc". If
# abc changes in any way, the signature should change.

View File

@ -11,7 +11,7 @@
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
# $Id: tester.tcl,v 1.83 2007/08/16 13:01:45 drh Exp $
# $Id: tester.tcl,v 1.84 2007/08/20 14:23:44 danielk1977 Exp $
# Make sure tclsqlite3 was compiled correctly. Abort now with an
# error message if not.
@ -359,7 +359,7 @@ proc crashsql {args} {
if {$n>1 && [string first $z -delay]==0} {set crashdelay $z2} \
elseif {$n>1 && [string first $z -file]==0} {set crashfile $z2} \
elseif {$n>1 && [string first $z -blocksize]==0} {set blocksize $z2} \
elseif {$n>1 && [string first $z -blocksize]==0} {set blocksize "-s $z2" } \
else { error "Unrecognized option: $z" }
}
@ -370,7 +370,7 @@ proc crashsql {args} {
set cfile [file join [pwd] $crashfile]
set f [open crash.tcl w]
puts $f "sqlite3_crashparams $crashdelay $cfile $blocksize"
puts $f "sqlite3_crashparams $blocksize $crashdelay $cfile"
puts $f "set sqlite_pending_byte $::sqlite_pending_byte"
puts $f "sqlite3 db test.db"