Test script changes to support testing sqlite3_interrupt().

FossilOrigin-Name: 0cede9f898bcd13dab51b25cb0e72213d988d3d2
This commit is contained in:
dan 2013-08-20 16:08:39 +00:00
parent 9b47ee3f09
commit 4044906210
3 changed files with 35 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Performance\soptimizations\sin\sthe\sVDBE\sand\sespecially\sto\sthe\sOP_Next\sand\nrelated\sopcodes\sand\sin\sthe\ssqlite3BtreeNext()\sand\ssqlite3BtreePrevious()\nroutines.\s\sThis\sis\sa\scherrypick\sof\s[6f99b54aedeb],\s[d2efea1682a7],\sand\n[d78c5d89de4b].
D 2013-08-20T03:13:51.513
C Test\sscript\schanges\sto\ssupport\stesting\ssqlite3_interrupt().
D 2013-08-20T16:08:39.938
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5e41da95d92656a5004b03d3576e8b226858a28e
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -661,7 +661,7 @@ F test/mallocH.test 79b65aed612c9b3ed2dcdaa727c85895fd1bfbdb
F test/mallocI.test a88c2b9627c8506bf4703d8397420043a786cdb6
F test/mallocJ.test b5d1839da331d96223e5f458856f8ffe1366f62e
F test/mallocK.test d79968641d1b70d88f6c01bdb9a7eb4a55582cc9
F test/malloc_common.tcl 9a98856549bfb3fab205edbc1317216edc52e70d
F test/malloc_common.tcl 05b53b004b4ee09f3bb1d34166a8b8ce0ad2dd09
F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e
F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f
F test/memdb.test db5260330676de007be8530d6ecc7c9ab2b06ad3
@ -1105,10 +1105,7 @@ F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/wherecosttest.c f407dc4c79786982a475261866a161cd007947ae
F tool/win/sqlite.vsix 97894c2790eda7b5bce3cc79cb2a8ec2fde9b3ac
P dc65ad8c4c67b21e3b042b8df6580d02b634a90b
Q +6f99b54aedeb91e46d52f65504d02a9cc61c0062
Q +d2efea1682a7e708000c1f5d36370aaf1199b3be
Q +d78c5d89de4b840351b026c9db1952fc24e689d0
R 539c71750e964e780f11bfb1b59ee716
U drh
Z feae42d544c0a4532e8cd3cb8461eca6
P 7f72fc4f47445a2c01910b268335873de9f75059
R d7254aa102bedab4ec8ef3b2a2896635
U dan
Z e9a2c8620ce0b09ce68b2f2f4880d098

View File

@ -1 +1 @@
7f72fc4f47445a2c01910b268335873de9f75059
0cede9f898bcd13dab51b25cb0e72213d988d3d2

View File

@ -93,6 +93,16 @@ set FAULTSIM(cantopen-persistent) [list \
-injectuninstall cantopen_injectuninstall \
]
set ::default_faults_arg [array names FAULTSIM]
set FAULTSIM(interrupt) [list \
-injectinstall interrupt_injectinstall \
-injectstart interrupt_injectstart \
-injectstop interrupt_injectstop \
-injecterrlist {{1 interrupted} {1 interrupt}} \
-injectuninstall interrupt_injectuninstall \
]
#--------------------------------------------------------------------------
@ -113,7 +123,7 @@ set FAULTSIM(cantopen-persistent) [list \
proc do_faultsim_test {name args} {
global FAULTSIM
set DEFAULT(-faults) [array names FAULTSIM]
set DEFAULT(-faults) $::default_faults_arg
set DEFAULT(-prep) ""
set DEFAULT(-body) ""
set DEFAULT(-test) ""
@ -255,6 +265,22 @@ proc cantopen_injectstop {} {
shmfault cantopen
}
# The following procs are used as [do_one_faultsim_test] callbacks
# when injecting SQLITE_INTERRUPT error faults into test cases.
#
proc interrupt_injectinstall {} {
}
proc interrupt_injectuninstall {} {
}
proc interrupt_injectstart {iFail} {
set ::sqlite_interrupt_count $iFail
}
proc interrupt_injectstop {} {
set res [expr $::sqlite_interrupt_count<=0]
set ::sqlite_interrupt_count 0
set res
}
# This command is not called directly. It is used by the
# [faultsim_test_result] command created by [do_faultsim_test] and used
# by -test scripts.