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

Modifications to the malloc failure tests to test transient and persistent failures. (CVS 4321)

FossilOrigin-Name: e38ef81b85feb5bff2ad8448f3438ff0ab36571e
This commit is contained in:
danielk1977
2007-08-29 12:31:25 +00:00
parent 1fee73e74a
commit a1644fd863
40 changed files with 519 additions and 308 deletions

View File

@ -12,7 +12,7 @@
# This file tests aspects of the malloc failure while parsing
# CREATE TABLE statements in auto_vacuum mode.
#
# $Id: mallocC.test,v 1.3 2007/08/22 22:04:37 drh Exp $
# $Id: mallocC.test,v 1.4 2007/08/29 12:31:29 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -61,7 +61,7 @@ proc do_mallocC_test {tn args} {
# Run the SQL. Malloc number $::n is set to fail. A malloc() failure
# may or may not be reported.
sqlite3_memdebug_fail $::n 1
sqlite3_memdebug_fail $::n -repeat 1
do_test mallocC-$tn.$::n.1 {
set res [catchsql [string trim $::mallocopts(-sql)]]
set rc [expr {
@ -76,7 +76,7 @@ proc do_mallocC_test {tn args} {
# If $::n is greater than the number of malloc() calls required to
# execute the SQL, then this test is finished. Break out of the loop.
set nFail [sqlite3_memdebug_fail -1 -1]
set nFail [sqlite3_memdebug_fail -1]
if {$nFail==0} {
break
}