Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: third_party/sqlite/src/test/malloc_common.tcl

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/mallocK.test ('k') | third_party/sqlite/src/test/memdb.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/malloc_common.tcl
diff --git a/third_party/sqlite/src/test/malloc_common.tcl b/third_party/sqlite/src/test/malloc_common.tcl
index b586c88d1f0c91f6785ae2e3e2994163d640b5e7..2d0e57e4fcaf0bac561519f1723172c6a4bfe601 100644
--- a/third_party/sqlite/src/test/malloc_common.tcl
+++ b/third_party/sqlite/src/test/malloc_common.tcl
@@ -129,6 +129,8 @@ proc do_faultsim_test {name args} {
set DEFAULT(-test) ""
set DEFAULT(-install) ""
set DEFAULT(-uninstall) ""
+ set DEFAULT(-start) 1
+ set DEFAULT(-end) 0
fix_testname name
@@ -146,7 +148,8 @@ proc do_faultsim_test {name args} {
}
set testspec [list -prep $O(-prep) -body $O(-body) \
- -test $O(-test) -install $O(-install) -uninstall $O(-uninstall)
+ -test $O(-test) -install $O(-install) -uninstall $O(-uninstall) \
+ -start $O(-start) -end $O(-end)
]
foreach f [lsort -unique $faultlist] {
eval do_one_faultsim_test "$name-$f" $FAULTSIM($f) $testspec
@@ -289,7 +292,7 @@ proc faultsim_test_result_int {args} {
upvar testrc testrc testresult testresult testnfail testnfail
set t [list $testrc $testresult]
set r $args
- if { ($testnfail==0 && $t != [lindex $r 0]) || [lsearch $r $t]<0 } {
+ if { ($testnfail==0 && $t != [lindex $r 0]) || [lsearch -exact $r $t]<0 } {
error "nfail=$testnfail rc=$testrc result=$testresult list=$r"
}
}
@@ -318,6 +321,8 @@ proc faultsim_test_result_int {args} {
#
# -test Script to execute after -body.
#
+# -start Index of first fault to inject (default 1)
+#
proc do_one_faultsim_test {testname args} {
set DEFAULT(-injectstart) "expr"
@@ -330,6 +335,8 @@ proc do_one_faultsim_test {testname args} {
set DEFAULT(-test) ""
set DEFAULT(-install) ""
set DEFAULT(-uninstall) ""
+ set DEFAULT(-start) 1
+ set DEFAULT(-end) 0
array set O [array get DEFAULT]
array set O $args
@@ -346,7 +353,10 @@ proc do_one_faultsim_test {testname args} {
eval $O(-install)
set stop 0
- for {set iFail 1} {!$stop} {incr iFail} {
+ for {set iFail $O(-start)} \
+ {!$stop && ($O(-end)==0 || $iFail<=$O(-end))} \
+ {incr iFail} \
+ {
# Evaluate the -prep script.
#
« no previous file with comments | « third_party/sqlite/src/test/mallocK.test ('k') | third_party/sqlite/src/test/memdb.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698