mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-24 14:17:58 +03:00
Modify the OS layer so that I/O routines are called through a virtual function
table. The os_test.c module has been replaced by test6.c. The crash tests are busted now and need to be fixed. (CVS 2785) FossilOrigin-Name: 1f69aec285dd8e26bd739d5e44bb50fe03a9682a
This commit is contained in:
@@ -12,15 +12,12 @@
|
||||
#
|
||||
# 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 special test
|
||||
# module "crashtest" compiled with the special "os_test.c" backend is used.
|
||||
# The os_test.c simulates the kind of file corruption that can occur
|
||||
# when writes are happening at the moment of power loss.
|
||||
#
|
||||
# The special crash-test module with its os_test.c backend only works
|
||||
# on Unix.
|
||||
# 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.19 2005/09/17 17:05:19 drh Exp $
|
||||
# $Id: crash.test,v 1.20 2005/11/26 00:25:04 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@@ -62,7 +59,7 @@ proc crashsql {crashdelay crashfile sql} {
|
||||
close $f
|
||||
|
||||
set r [catch {
|
||||
exec [file join . crashtest] crash.tcl >@stdout
|
||||
exec [info nameofexec] crash.tcl >@stdout
|
||||
} msg]
|
||||
lappend r $msg
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# This file implements some common TCL routines used for regression
|
||||
# testing the SQLite library
|
||||
#
|
||||
# $Id: tester.tcl,v 1.51 2005/11/04 22:03:30 drh Exp $
|
||||
# $Id: tester.tcl,v 1.52 2005/11/26 00:25:04 drh Exp $
|
||||
|
||||
# Make sure tclsqlite3 was compiled correctly. Abort now with an
|
||||
# error message if not.
|
||||
@@ -281,7 +281,7 @@ proc crashsql {crashdelay crashfile sql} {
|
||||
close $f
|
||||
|
||||
set r [catch {
|
||||
exec [file join . crashtest] crash.tcl >@stdout
|
||||
exec [info nameofexec] crash.tcl >@stdout
|
||||
} msg]
|
||||
lappend r $msg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user