Artifact
52d2c37fe8cc07ec7362024c214b04bb69432995b3a984a3fbabc60fa6ada3ee:
- File
test/permutations.test
— part of check-in
[d3fea69c]
at
2019-02-04 16:42:57
on branch trunk
— Do not run shmlock.test as part of the inmemory_journal permutation.
(user:
dan
size: 39239)
[more...]
0000: 23 20 32 30 30 38 20 4a 75 6e 65 20 32 31 0a 23 # 2008 June 21.#
0010: 0a 23 20 54 68 65 20 61 75 74 68 6f 72 20 64 69 .# The author di
0020: 73 63 6c 61 69 6d 73 20 63 6f 70 79 72 69 67 68 sclaims copyrigh
0030: 74 20 74 6f 20 74 68 69 73 20 73 6f 75 72 63 65 t to this source
0040: 20 63 6f 64 65 2e 20 20 49 6e 20 70 6c 61 63 65 code. In place
0050: 20 6f 66 0a 23 20 61 20 6c 65 67 61 6c 20 6e 6f of.# a legal no
0060: 74 69 63 65 2c 20 68 65 72 65 20 69 73 20 61 20 tice, here is a
0070: 62 6c 65 73 73 69 6e 67 3a 0a 23 0a 23 20 20 20 blessing:.#.#
0080: 20 4d 61 79 20 79 6f 75 20 64 6f 20 67 6f 6f 64 May you do good
0090: 20 61 6e 64 20 6e 6f 74 20 65 76 69 6c 2e 0a 23 and not evil..#
00a0: 20 20 20 20 4d 61 79 20 79 6f 75 20 66 69 6e 64 May you find
00b0: 20 66 6f 72 67 69 76 65 6e 65 73 73 20 66 6f 72 forgiveness for
00c0: 20 79 6f 75 72 73 65 6c 66 20 61 6e 64 20 66 6f yourself and fo
00d0: 72 67 69 76 65 20 6f 74 68 65 72 73 2e 0a 23 20 rgive others..#
00e0: 20 20 20 4d 61 79 20 79 6f 75 20 73 68 61 72 65 May you share
00f0: 20 66 72 65 65 6c 79 2c 20 6e 65 76 65 72 20 74 freely, never t
0100: 61 6b 69 6e 67 20 6d 6f 72 65 20 74 68 61 6e 20 aking more than
0110: 79 6f 75 20 67 69 76 65 2e 0a 23 0a 23 2a 2a 2a you give..#.#***
0120: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0130: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0140: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0150: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0160: 2a 2a 2a 2a 0a 23 0a 0a 73 65 74 20 74 65 73 74 ****.#..set test
0170: 64 69 72 20 5b 66 69 6c 65 20 64 69 72 6e 61 6d dir [file dirnam
0180: 65 20 24 61 72 67 76 30 5d 0a 73 6f 75 72 63 65 e $argv0].source
0190: 20 24 74 65 73 74 64 69 72 2f 74 65 73 74 65 72 $testdir/tester
01a0: 2e 74 63 6c 0a 64 62 20 63 6c 6f 73 65 0a 0a 23 .tcl.db close..#
01b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
01c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
01d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
01e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
01f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 74 65 73 74 ---------.# test
0200: 5f 73 75 69 74 65 20 4e 41 4d 45 20 4f 50 54 49 _suite NAME OPTI
0210: 4f 4e 53 0a 23 0a 23 20 77 68 65 72 65 20 61 76 ONS.#.# where av
0220: 61 69 6c 61 62 6c 65 20 6f 70 74 69 6f 6e 73 20 ailable options
0230: 61 72 65 3a 20 20 0a 23 0a 23 20 20 20 20 20 20 are: .#.#
0240: 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 54 49 -description TI
0250: 54 4c 45 20 20 20 20 20 20 20 20 20 20 20 20 20 TLE
0260: 20 20 20 20 20 28 64 65 66 61 75 6c 74 20 22 22 (default ""
0270: 29 0a 23 20 20 20 20 20 20 20 2d 69 6e 69 74 69 ).# -initi
0280: 61 6c 69 7a 65 20 20 53 43 52 49 50 54 20 20 20 alize SCRIPT
0290: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 28 64 (d
02a0: 65 66 61 75 6c 74 20 22 22 29 0a 23 20 20 20 20 efault "").#
02b0: 20 20 20 2d 73 68 75 74 64 6f 77 6e 20 20 20 20 -shutdown
02c0: 53 43 52 49 50 54 20 20 20 20 20 20 20 20 20 20 SCRIPT
02d0: 20 20 20 20 20 20 20 28 64 65 66 61 75 6c 74 20 (default
02e0: 22 22 29 0a 23 20 20 20 20 20 20 20 2d 70 72 65 "").# -pre
02f0: 73 71 6c 20 20 20 20 20 20 53 51 4c 20 20 20 20 sql SQL
0300: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0310: 28 64 65 66 61 75 6c 74 20 22 22 29 0a 23 20 20 (default "").#
0320: 20 20 20 20 20 2d 66 69 6c 65 73 20 20 20 20 20 -files
0330: 20 20 4c 49 53 54 2d 4f 46 2d 46 49 4c 45 53 20 LIST-OF-FILES
0340: 20 20 20 20 20 20 20 20 20 28 64 65 66 61 75 6c (defaul
0350: 74 20 24 3a 3a 41 4c 4c 54 45 53 54 53 29 0a 23 t $::ALLTESTS).#
0360: 20 20 20 20 20 20 20 2d 70 72 65 66 69 78 20 20 -prefix
0370: 20 20 20 20 4e 41 4d 45 20 20 20 20 20 20 20 20 NAME
0380: 20 20 20 20 20 20 20 20 20 20 20 28 64 65 66 61 (defa
0390: 75 6c 74 20 22 24 3a 3a 4e 41 4d 45 2e 22 29 0a ult "$::NAME.").
03a0: 23 20 20 20 20 20 20 20 2d 64 62 63 6f 6e 66 69 # -dbconfi
03b0: 67 20 20 20 20 53 43 52 49 50 54 20 20 20 20 20 g SCRIPT
03c0: 20 20 20 20 20 20 20 20 20 20 20 20 28 64 65 66 (def
03d0: 61 75 6c 74 20 22 22 29 0a 23 0a 70 72 6f 63 20 ault "").#.proc
03e0: 74 65 73 74 5f 73 75 69 74 65 20 7b 6e 61 6d 65 test_suite {name
03f0: 20 61 72 67 73 7d 20 7b 0a 0a 20 20 73 65 74 20 args} {.. set
0400: 64 65 66 61 75 6c 74 28 2d 73 68 75 74 64 6f 77 default(-shutdow
0410: 6e 29 20 20 20 20 22 22 0a 20 20 73 65 74 20 64 n) "". set d
0420: 65 66 61 75 6c 74 28 2d 69 6e 69 74 69 61 6c 69 efault(-initiali
0430: 7a 65 29 20 20 22 22 0a 20 20 73 65 74 20 64 65 ze) "". set de
0440: 66 61 75 6c 74 28 2d 70 72 65 73 71 6c 29 20 20 fault(-presql)
0450: 20 20 20 20 22 22 0a 20 20 73 65 74 20 64 65 66 "". set def
0460: 61 75 6c 74 28 2d 64 65 73 63 72 69 70 74 69 6f ault(-descriptio
0470: 6e 29 20 22 6e 6f 20 64 65 73 63 72 69 70 74 69 n) "no descripti
0480: 6f 6e 20 73 75 70 70 6c 69 65 64 20 28 66 69 78 on supplied (fix
0490: 6d 65 29 22 0a 20 20 73 65 74 20 64 65 66 61 75 me)". set defau
04a0: 6c 74 28 2d 66 69 6c 65 73 29 20 20 20 20 20 20 lt(-files)
04b0: 20 22 22 0a 20 20 73 65 74 20 64 65 66 61 75 6c "". set defaul
04c0: 74 28 2d 70 72 65 66 69 78 29 20 20 20 20 20 20 t(-prefix)
04d0: 22 24 7b 6e 61 6d 65 7d 2e 22 0a 20 20 73 65 74 "${name}.". set
04e0: 20 64 65 66 61 75 6c 74 28 2d 64 62 63 6f 6e 66 default(-dbconf
04f0: 69 67 29 20 20 20 20 22 22 0a 0a 20 20 61 72 72 ig) "".. arr
0500: 61 79 20 73 65 74 20 6f 70 74 69 6f 6e 73 20 5b ay set options [
0510: 61 72 72 61 79 20 67 65 74 20 64 65 66 61 75 6c array get defaul
0520: 74 5d 0a 20 20 69 66 20 7b 5b 6c 6c 65 6e 67 74 t]. if {[llengt
0530: 68 20 24 61 72 67 73 5d 25 32 7d 20 7b 0a 20 20 h $args]%2} {.
0540: 20 20 65 72 72 6f 72 20 22 75 6e 65 76 65 6e 20 error "uneven
0550: 6e 75 6d 62 65 72 20 6f 66 20 6f 70 74 69 6f 6e number of option
0560: 73 2f 73 77 69 74 63 68 65 73 20 70 61 73 73 65 s/switches passe
0570: 64 20 74 6f 20 74 65 73 74 5f 73 75 69 74 65 22 d to test_suite"
0580: 0a 20 20 7d 0a 20 20 66 6f 72 65 61 63 68 20 7b . }. foreach {
0590: 6b 20 76 7d 20 24 61 72 67 73 20 7b 0a 20 20 20 k v} $args {.
05a0: 20 73 65 74 20 6f 20 5b 61 72 72 61 79 20 6e 61 set o [array na
05b0: 6d 65 73 20 6f 70 74 69 6f 6e 73 20 24 7b 6b 7d mes options ${k}
05c0: 2a 5d 0a 20 20 20 20 69 66 20 7b 5b 6c 6c 65 6e *]. if {[llen
05d0: 67 74 68 20 24 6f 5d 3e 31 7d 20 20 7b 20 65 72 gth $o]>1} { er
05e0: 72 6f 72 20 22 61 6d 62 69 67 75 6f 75 73 20 6f ror "ambiguous o
05f0: 70 74 69 6f 6e 3a 20 24 6b 22 20 7d 0a 20 20 20 ption: $k" }.
0600: 20 69 66 20 7b 5b 6c 6c 65 6e 67 74 68 20 24 6f if {[llength $o
0610: 5d 3d 3d 30 7d 20 7b 20 65 72 72 6f 72 20 22 75 ]==0} { error "u
0620: 6e 6b 6e 6f 77 6e 20 6f 70 74 69 6f 6e 3a 20 24 nknown option: $
0630: 6b 22 20 7d 0a 20 20 20 20 73 65 74 20 6f 70 74 k" }. set opt
0640: 69 6f 6e 73 28 5b 6c 69 6e 64 65 78 20 24 6f 20 ions([lindex $o
0650: 30 5d 29 20 24 76 0a 20 20 7d 0a 0a 20 20 73 65 0]) $v. }.. se
0660: 74 20 20 20 20 20 3a 3a 74 65 73 74 73 70 65 63 t ::testspec
0670: 28 24 6e 61 6d 65 29 20 5b 61 72 72 61 79 20 67 ($name) [array g
0680: 65 74 20 6f 70 74 69 6f 6e 73 5d 0a 20 20 6c 61 et options]. la
0690: 70 70 65 6e 64 20 3a 3a 74 65 73 74 73 75 69 74 ppend ::testsuit
06a0: 65 6c 69 73 74 20 24 6e 61 6d 65 0a 7d 0a 0a 23 elist $name.}..#
06b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
06c0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
06d0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
06e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
06f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 74 65 73 74 ---------.# test
0700: 5f 73 65 74 20 41 52 47 53 2e 2e 2e 0a 23 0a 70 _set ARGS....#.p
0710: 72 6f 63 20 74 65 73 74 5f 73 65 74 20 7b 61 72 roc test_set {ar
0720: 67 73 7d 20 7b 0a 20 20 73 65 74 20 69 73 45 78 gs} {. set isEx
0730: 63 6c 75 64 65 20 30 0a 20 20 66 6f 72 65 61 63 clude 0. foreac
0740: 68 20 61 20 24 61 72 67 73 20 7b 0a 20 20 20 20 h a $args {.
0750: 69 66 20 7b 5b 73 74 72 69 6e 67 20 6d 61 74 63 if {[string matc
0760: 68 20 2d 2a 20 24 61 5d 7d 20 7b 0a 20 20 20 20 h -* $a]} {.
0770: 20 20 73 77 69 74 63 68 20 2d 2d 20 24 61 20 7b switch -- $a {
0780: 0a 20 20 20 20 20 20 20 20 2d 69 6e 63 6c 75 64 . -includ
0790: 65 20 7b 20 73 65 74 20 69 73 45 78 63 6c 75 64 e { set isExclud
07a0: 65 20 30 20 7d 0a 20 20 20 20 20 20 20 20 2d 65 e 0 }. -e
07b0: 78 63 6c 75 64 65 20 7b 20 73 65 74 20 69 73 45 xclude { set isE
07c0: 78 63 6c 75 64 65 20 31 20 7d 0a 20 20 20 20 20 xclude 1 }.
07d0: 20 20 20 64 65 66 61 75 6c 74 20 7b 0a 20 20 20 default {.
07e0: 20 20 20 20 20 20 20 65 72 72 6f 72 20 22 55 6e error "Un
07f0: 6b 6e 6f 77 6e 20 73 77 69 74 63 68 3a 20 24 61 known switch: $a
0800: 22 0a 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 ". }.
0810: 20 20 7d 0a 20 20 20 20 7d 20 65 6c 73 65 69 66 }. } elseif
0820: 20 7b 24 69 73 45 78 63 6c 75 64 65 20 3d 3d 20 {$isExclude ==
0830: 30 7d 20 7b 0a 20 20 20 20 20 20 66 6f 72 65 61 0} {. forea
0840: 63 68 20 66 20 24 61 20 7b 20 73 65 74 20 74 28 ch f $a { set t(
0850: 24 66 29 20 31 20 7d 0a 20 20 20 20 7d 20 65 6c $f) 1 }. } el
0860: 73 65 20 7b 0a 20 20 20 20 20 20 66 6f 72 65 61 se {. forea
0870: 63 68 20 66 20 24 61 20 7b 20 61 72 72 61 79 20 ch f $a { array
0880: 75 6e 73 65 74 20 74 20 24 66 20 7d 0a 20 20 20 unset t $f }.
0890: 20 20 20 66 6f 72 65 61 63 68 20 66 20 24 61 20 foreach f $a
08a0: 7b 20 61 72 72 61 79 20 75 6e 73 65 74 20 74 20 { array unset t
08b0: 2a 2f 24 66 20 7d 0a 20 20 20 20 7d 0a 20 20 7d */$f }. }. }
08c0: 0a 0a 20 20 72 65 74 75 72 6e 20 5b 61 72 72 61 .. return [arra
08d0: 79 20 6e 61 6d 65 73 20 74 5d 0a 7d 0a 0a 23 2d y names t].}..#-
08e0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
08f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0900: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0910: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
0920: 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 53 65 74 20 75 --------.# Set u
0930: 70 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 p the following
0940: 67 6c 6f 62 61 6c 20 6c 69 73 74 20 76 61 72 69 global list vari
0950: 61 62 6c 65 73 20 63 6f 6e 74 61 69 6e 69 6e 67 ables containing
0960: 20 74 68 65 20 6e 61 6d 65 73 20 6f 66 20 0a 23 the names of .#
0970: 20 76 61 72 69 6f 75 73 20 74 65 73 74 20 73 63 various test sc
0980: 72 69 70 74 73 3a 0a 23 0a 23 20 20 20 24 61 6c ripts:.#.# $al
0990: 6c 74 65 73 74 73 0a 23 20 20 20 24 61 6c 6c 71 ltests.# $allq
09a0: 75 69 63 6b 74 65 73 74 73 0a 23 0a 73 65 74 20 uicktests.#.set
09b0: 61 6c 6c 74 65 73 74 73 20 5b 6c 69 73 74 5d 0a alltests [list].
09c0: 66 6f 72 65 61 63 68 20 66 20 5b 67 6c 6f 62 20 foreach f [glob
09d0: 24 74 65 73 74 64 69 72 2f 2a 2e 74 65 73 74 5d $testdir/*.test]
09e0: 20 7b 20 6c 61 70 70 65 6e 64 20 61 6c 6c 74 65 { lappend allte
09f0: 73 74 73 20 5b 66 69 6c 65 20 74 61 69 6c 20 24 sts [file tail $
0a00: 66 5d 20 7d 0a 66 6f 72 65 61 63 68 20 66 20 5b f] }.foreach f [
0a10: 67 6c 6f 62 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e glob -nocomplain
0a20: 20 20 20 20 20 20 20 20 20 20 20 20 5c 0a 20 20 \.
0a30: 20 20 24 74 65 73 74 64 69 72 2f 2e 2e 2f 65 78 $testdir/../ex
0a40: 74 2f 72 74 72 65 65 2f 2a 2e 74 65 73 74 20 20 t/rtree/*.test
0a50: 20 20 20 20 20 5c 0a 20 20 20 20 24 74 65 73 74 \. $test
0a60: 64 69 72 2f 2e 2e 2f 65 78 74 2f 66 74 73 35 2f dir/../ext/fts5/
0a70: 74 65 73 74 2f 2a 2e 74 65 73 74 20 20 20 5c 0a test/*.test \.
0a80: 20 20 20 20 24 74 65 73 74 64 69 72 2f 2e 2e 2f $testdir/../
0a90: 65 78 74 2f 65 78 70 65 72 74 2f 2a 2e 74 65 73 ext/expert/*.tes
0aa0: 74 20 20 20 20 20 20 5c 0a 20 20 20 20 24 74 65 t \. $te
0ab0: 73 74 64 69 72 2f 2e 2e 2f 65 78 74 2f 6c 73 6d stdir/../ext/lsm
0ac0: 31 2f 74 65 73 74 2f 2a 2e 74 65 73 74 20 20 20 1/test/*.test
0ad0: 5c 0a 5d 20 7b 0a 20 20 6c 61 70 70 65 6e 64 20 \.] {. lappend
0ae0: 61 6c 6c 74 65 73 74 73 20 24 66 20 0a 7d 0a 66 alltests $f .}.f
0af0: 6f 72 65 61 63 68 20 66 20 5b 67 6c 6f 62 20 2d oreach f [glob -
0b00: 6e 6f 63 6f 6d 70 6c 61 69 6e 20 24 74 65 73 74 nocomplain $test
0b10: 64 69 72 2f 2e 2e 2f 65 78 74 2f 73 65 73 73 69 dir/../ext/sessi
0b20: 6f 6e 2f 2a 2e 74 65 73 74 5d 20 7b 20 0a 20 20 on/*.test] { .
0b30: 6c 61 70 70 65 6e 64 20 61 6c 6c 74 65 73 74 73 lappend alltests
0b40: 20 24 66 20 0a 7d 0a 0a 69 66 20 7b 24 3a 3a 74 $f .}..if {$::t
0b50: 63 6c 5f 70 6c 61 74 66 6f 72 6d 28 70 6c 61 74 cl_platform(plat
0b60: 66 6f 72 6d 29 21 3d 22 75 6e 69 78 22 7d 20 7b form)!="unix"} {
0b70: 0a 20 20 73 65 74 20 61 6c 6c 74 65 73 74 73 20 . set alltests
0b80: 5b 74 65 73 74 5f 73 65 74 20 24 61 6c 6c 74 65 [test_set $allte
0b90: 73 74 73 20 2d 65 78 63 6c 75 64 65 20 63 72 61 sts -exclude cra
0ba0: 73 68 2e 74 65 73 74 20 63 72 61 73 68 32 2e 74 sh.test crash2.t
0bb0: 65 73 74 5d 0a 7d 0a 73 65 74 20 61 6c 6c 74 65 est].}.set allte
0bc0: 73 74 73 20 5b 74 65 73 74 5f 73 65 74 20 24 61 sts [test_set $a
0bd0: 6c 6c 74 65 73 74 73 20 2d 65 78 63 6c 75 64 65 lltests -exclude
0be0: 20 7b 0a 20 20 61 6c 6c 2e 74 65 73 74 20 20 20 {. all.test
0bf0: 20 20 20 20 20 61 73 79 6e 63 2e 74 65 73 74 20 async.test
0c00: 20 20 20 20 20 20 20 20 71 75 69 63 6b 2e 74 65 quick.te
0c10: 73 74 20 20 76 65 72 79 71 75 69 63 6b 2e 74 65 st veryquick.te
0c20: 73 74 0a 20 20 6d 65 6d 6c 65 61 6b 2e 74 65 73 st. memleak.tes
0c30: 74 20 20 20 20 70 65 72 6d 75 74 61 74 69 6f 6e t permutation
0c40: 73 2e 74 65 73 74 20 20 73 6f 61 6b 2e 74 65 73 s.test soak.tes
0c50: 74 20 20 20 66 74 73 33 2e 74 65 73 74 0a 20 20 t fts3.test.
0c60: 6d 61 6c 6c 6f 63 41 6c 6c 2e 74 65 73 74 20 20 mallocAll.test
0c70: 72 74 72 65 65 2e 74 65 73 74 20 20 20 20 20 20 rtree.test
0c80: 20 20 20 66 75 6c 6c 2e 74 65 73 74 20 20 20 65 full.test e
0c90: 78 74 72 61 71 75 69 63 6b 2e 74 65 73 74 0a 20 xtraquick.test.
0ca0: 20 73 65 73 73 69 6f 6e 2e 74 65 73 74 20 20 20 session.test
0cb0: 20 72 62 75 2e 74 65 73 74 0a 7d 5d 0a 0a 73 65 rbu.test.}]..se
0cc0: 74 20 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 20 t allquicktests
0cd0: 5b 74 65 73 74 5f 73 65 74 20 24 61 6c 6c 74 65 [test_set $allte
0ce0: 73 74 73 20 2d 65 78 63 6c 75 64 65 20 7b 0a 20 sts -exclude {.
0cf0: 20 61 73 79 6e 63 32 2e 74 65 73 74 20 61 73 79 async2.test asy
0d00: 6e 63 33 2e 74 65 73 74 20 62 61 63 6b 75 70 5f nc3.test backup_
0d10: 69 6f 65 72 72 2e 74 65 73 74 20 63 6f 72 72 75 ioerr.test corru
0d20: 70 74 2e 74 65 73 74 0a 20 20 63 6f 72 72 75 70 pt.test. corrup
0d30: 74 43 2e 74 65 73 74 20 63 72 61 73 68 2e 74 65 tC.test crash.te
0d40: 73 74 20 63 72 61 73 68 32 2e 74 65 73 74 20 63 st crash2.test c
0d50: 72 61 73 68 33 2e 74 65 73 74 20 63 72 61 73 68 rash3.test crash
0d60: 34 2e 74 65 73 74 20 63 72 61 73 68 35 2e 74 65 4.test crash5.te
0d70: 73 74 0a 20 20 63 72 61 73 68 36 2e 74 65 73 74 st. crash6.test
0d80: 20 63 72 61 73 68 37 2e 74 65 73 74 20 64 65 6c crash7.test del
0d90: 65 74 65 33 2e 74 65 73 74 20 65 5f 66 74 73 33 ete3.test e_fts3
0da0: 2e 74 65 73 74 20 66 74 73 33 72 6e 64 2e 74 65 .test fts3rnd.te
0db0: 73 74 0a 20 20 66 6b 65 79 5f 6d 61 6c 6c 6f 63 st. fkey_malloc
0dc0: 2e 74 65 73 74 20 66 75 7a 7a 2e 74 65 73 74 20 .test fuzz.test
0dd0: 66 75 7a 7a 33 2e 74 65 73 74 20 66 75 7a 7a 5f fuzz3.test fuzz_
0de0: 6d 61 6c 6c 6f 63 2e 74 65 73 74 20 69 6e 32 2e malloc.test in2.
0df0: 74 65 73 74 20 6c 6f 61 64 65 78 74 2e 74 65 73 test loadext.tes
0e00: 74 0a 20 20 6d 69 73 63 37 2e 74 65 73 74 20 6d t. misc7.test m
0e10: 75 74 65 78 32 2e 74 65 73 74 20 6e 6f 74 69 66 utex2.test notif
0e20: 79 32 2e 74 65 73 74 20 6f 6e 65 66 69 6c 65 2e y2.test onefile.
0e30: 74 65 73 74 20 70 61 67 65 72 66 61 75 6c 74 32 test pagerfault2
0e40: 2e 74 65 73 74 20 0a 20 20 73 61 76 65 70 6f 69 .test . savepoi
0e50: 6e 74 34 2e 74 65 73 74 20 73 61 76 65 70 6f 69 nt4.test savepoi
0e60: 6e 74 36 2e 74 65 73 74 20 73 65 6c 65 63 74 39 nt6.test select9
0e70: 2e 74 65 73 74 20 0a 20 20 73 70 65 65 64 31 2e .test . speed1.
0e80: 74 65 73 74 20 73 70 65 65 64 31 70 2e 74 65 73 test speed1p.tes
0e90: 74 20 73 70 65 65 64 32 2e 74 65 73 74 20 73 70 t speed2.test sp
0ea0: 65 65 64 33 2e 74 65 73 74 20 73 70 65 65 64 34 eed3.test speed4
0eb0: 2e 74 65 73 74 20 0a 20 20 73 70 65 65 64 34 70 .test . speed4p
0ec0: 2e 74 65 73 74 20 73 71 6c 6c 69 6d 69 74 73 31 .test sqllimits1
0ed0: 2e 74 65 73 74 20 74 6b 74 32 36 38 36 2e 74 65 .test tkt2686.te
0ee0: 73 74 20 74 68 72 65 61 64 30 30 31 2e 74 65 73 st thread001.tes
0ef0: 74 20 74 68 72 65 61 64 30 30 32 2e 74 65 73 74 t thread002.test
0f00: 0a 20 20 74 68 72 65 61 64 30 30 33 2e 74 65 73 . thread003.tes
0f10: 74 20 74 68 72 65 61 64 30 30 34 2e 74 65 73 74 t thread004.test
0f20: 20 74 68 72 65 61 64 30 30 35 2e 74 65 73 74 20 thread005.test
0f30: 74 72 61 6e 73 32 2e 74 65 73 74 20 76 61 63 75 trans2.test vacu
0f40: 75 6d 33 2e 74 65 73 74 20 0a 20 20 69 6e 63 72 um3.test . incr
0f50: 76 61 63 75 75 6d 5f 69 6f 65 72 72 2e 74 65 73 vacuum_ioerr.tes
0f60: 74 20 61 75 74 6f 76 61 63 75 75 6d 5f 63 72 61 t autovacuum_cra
0f70: 73 68 2e 74 65 73 74 20 62 74 72 65 65 38 2e 74 sh.test btree8.t
0f80: 65 73 74 20 73 68 61 72 65 64 5f 65 72 72 2e 74 est shared_err.t
0f90: 65 73 74 0a 20 20 76 74 61 62 5f 65 72 72 2e 74 est. vtab_err.t
0fa0: 65 73 74 20 77 61 6c 73 6c 6f 77 2e 74 65 73 74 est walslow.test
0fb0: 20 77 61 6c 63 72 61 73 68 2e 74 65 73 74 20 77 walcrash.test w
0fc0: 61 6c 63 72 61 73 68 33 2e 74 65 73 74 0a 20 20 alcrash3.test.
0fd0: 77 61 6c 74 68 72 65 61 64 2e 74 65 73 74 20 72 walthread.test r
0fe0: 74 72 65 65 33 2e 74 65 73 74 20 69 6e 64 65 78 tree3.test index
0ff0: 66 61 75 6c 74 2e 74 65 73 74 20 73 65 63 75 72 fault.test secur
1000: 65 64 65 6c 32 2e 74 65 73 74 0a 20 20 73 6f 72 edel2.test. sor
1010: 74 33 2e 74 65 73 74 20 73 6f 72 74 34 2e 74 65 t3.test sort4.te
1020: 73 74 20 66 74 73 34 67 72 6f 77 74 68 2e 74 65 st fts4growth.te
1030: 73 74 20 66 74 73 34 67 72 6f 77 74 68 32 2e 74 st fts4growth2.t
1040: 65 73 74 0a 20 20 62 69 67 73 6f 72 74 2e 74 65 est. bigsort.te
1050: 73 74 20 77 61 6c 70 72 6f 74 6f 63 6f 6c 2e 74 st walprotocol.t
1060: 65 73 74 20 6d 6d 61 70 34 2e 74 65 73 74 20 66 est mmap4.test f
1070: 75 7a 7a 65 72 32 2e 74 65 73 74 0a 20 20 77 61 uzzer2.test. wa
1080: 6c 63 72 61 73 68 32 2e 74 65 73 74 20 65 5f 66 lcrash2.test e_f
1090: 6b 65 79 2e 74 65 73 74 20 62 61 63 6b 75 70 2e key.test backup.
10a0: 74 65 73 74 0a 0a 20 20 66 74 73 34 6d 65 72 67 test.. fts4merg
10b0: 65 2e 74 65 73 74 20 66 74 73 34 6d 65 72 67 65 e.test fts4merge
10c0: 32 2e 74 65 73 74 20 66 74 73 34 6d 65 72 67 65 2.test fts4merge
10d0: 34 2e 74 65 73 74 20 66 74 73 34 63 68 65 63 6b 4.test fts4check
10e0: 2e 74 65 73 74 0a 20 20 66 74 73 33 63 6f 76 2e .test. fts3cov.
10f0: 74 65 73 74 20 66 74 73 33 73 6e 69 70 70 65 74 test fts3snippet
1100: 2e 74 65 73 74 20 66 74 73 33 63 6f 72 72 75 70 .test fts3corrup
1110: 74 32 2e 74 65 73 74 20 66 74 73 33 61 6e 2e 74 t2.test fts3an.t
1120: 65 73 74 0a 20 20 66 74 73 33 64 65 66 65 72 2e est. fts3defer.
1130: 74 65 73 74 20 66 74 73 34 6c 61 6e 67 69 64 2e test fts4langid.
1140: 74 65 73 74 20 66 74 73 33 73 6f 72 74 2e 74 65 test fts3sort.te
1150: 73 74 20 66 74 73 35 75 6e 69 63 6f 64 65 2e 74 st fts5unicode.t
1160: 65 73 74 0a 0a 20 20 72 74 72 65 65 34 2e 74 65 est.. rtree4.te
1170: 73 74 0a 7d 5d 0a 69 66 20 7b 5b 69 6e 66 6f 20 st.}].if {[info
1180: 65 78 69 73 74 73 20 3a 3a 65 6e 76 28 51 55 49 exists ::env(QUI
1190: 43 4b 54 45 53 54 5f 49 4e 43 4c 55 44 45 29 5d CKTEST_INCLUDE)]
11a0: 7d 20 7b 0a 20 20 73 65 74 20 61 6c 6c 71 75 69 } {. set allqui
11b0: 63 6b 74 65 73 74 73 20 5b 63 6f 6e 63 61 74 20 cktests [concat
11c0: 24 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 20 24 $allquicktests $
11d0: 3a 3a 65 6e 76 28 51 55 49 43 4b 54 45 53 54 5f ::env(QUICKTEST_
11e0: 49 4e 43 4c 55 44 45 29 5d 0a 7d 0a 69 66 20 7b INCLUDE)].}.if {
11f0: 5b 69 6e 66 6f 20 65 78 69 73 74 73 20 3a 3a 65 [info exists ::e
1200: 6e 76 28 51 55 49 43 4b 54 45 53 54 5f 4f 4d 49 nv(QUICKTEST_OMI
1210: 54 29 5d 7d 20 7b 0a 20 20 66 6f 72 65 61 63 68 T)]} {. foreach
1220: 20 78 20 5b 73 70 6c 69 74 20 24 3a 3a 65 6e 76 x [split $::env
1230: 28 51 55 49 43 4b 54 45 53 54 5f 4f 4d 49 54 29 (QUICKTEST_OMIT)
1240: 20 2c 5d 20 7b 0a 20 20 20 20 72 65 67 73 75 62 ,] {. regsub
1250: 20 2d 61 6c 6c 20 5c 5c 79 24 78 5c 5c 79 20 24 -all \\y$x\\y $
1260: 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 20 7b 7d allquicktests {}
1270: 20 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 0a 20 allquicktests.
1280: 20 7d 0a 7d 0a 0a 23 20 49 66 20 74 68 65 20 54 }.}..# If the T
1290: 45 53 54 5f 46 41 49 4c 55 52 45 20 65 6e 76 69 EST_FAILURE envi
12a0: 72 6f 6e 6d 65 6e 74 20 76 61 72 69 61 62 6c 65 ronment variable
12b0: 20 69 73 20 73 65 74 2c 20 69 74 20 6d 65 61 6e is set, it mean
12c0: 73 20 74 68 61 74 20 77 65 20 77 68 61 74 20 74 s that we what t
12d0: 6f 0a 23 20 64 65 6c 69 62 65 72 61 74 65 6c 79 o.# deliberately
12e0: 20 70 72 6f 76 6f 6b 65 20 74 65 73 74 20 66 61 provoke test fa
12f0: 69 6c 75 72 65 73 20 69 6e 20 6f 72 64 65 72 20 ilures in order
1300: 74 6f 20 74 65 73 74 20 74 68 65 20 74 65 73 74 to test the test
1310: 20 69 6e 66 72 61 73 74 72 75 63 74 75 72 65 2e infrastructure.
1320: 0a 23 20 4f 6e 6c 79 20 74 68 65 20 6d 61 69 6e .# Only the main
1330: 2e 74 65 73 74 20 6d 6f 64 75 6c 65 20 69 73 20 .test module is
1340: 6e 65 65 64 65 64 20 66 6f 72 20 74 68 69 73 2e needed for this.
1350: 0a 23 0a 69 66 20 7b 5b 69 6e 66 6f 20 65 78 69 .#.if {[info exi
1360: 73 74 73 20 3a 3a 65 6e 76 28 54 45 53 54 5f 46 sts ::env(TEST_F
1370: 41 49 4c 55 52 45 29 5d 7d 20 7b 0a 20 20 73 65 AILURE)]} {. se
1380: 74 20 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 20 t allquicktests
1390: 6d 61 69 6e 2e 74 65 73 74 0a 7d 0a 0a 23 23 23 main.test.}..###
13a0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
13b0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
13c0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
13d0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
13e0: 23 23 23 23 23 23 23 23 23 23 0a 23 20 53 74 61 ##########.# Sta
13f0: 72 74 20 6f 66 20 74 65 73 74 73 0a 23 0a 0a 23 rt of tests.#..#
1400: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1410: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1420: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1430: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
1440: 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 44 65 66 69 ---------.# Defi
1450: 6e 65 20 74 68 65 20 67 65 6e 65 72 69 63 20 74 ne the generic t
1460: 65 73 74 20 73 75 69 74 65 73 3a 0a 23 0a 23 20 est suites:.#.#
1470: 20 20 76 65 72 79 71 75 69 63 6b 0a 23 20 20 20 veryquick.#
1480: 71 75 69 63 6b 0a 23 20 20 20 66 75 6c 6c 0a 23 quick.# full.#
1490: 0a 6c 61 70 70 65 6e 64 20 3a 3a 74 65 73 74 73 .lappend ::tests
14a0: 75 69 74 65 6c 69 73 74 20 78 78 78 0a 0a 74 65 uitelist xxx..te
14b0: 73 74 5f 73 75 69 74 65 20 22 76 65 72 79 71 75 st_suite "veryqu
14c0: 69 63 6b 22 20 2d 70 72 65 66 69 78 20 22 22 20 ick" -prefix ""
14d0: 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 -description {.
14e0: 20 22 56 65 72 79 22 20 71 75 69 63 6b 20 74 65 "Very" quick te
14f0: 73 74 20 73 75 69 74 65 2e 20 52 75 6e 73 20 69 st suite. Runs i
1500: 6e 20 6d 69 6e 75 74 65 73 20 6f 6e 20 61 20 77 n minutes on a w
1510: 6f 72 6b 73 74 61 74 69 6f 6e 2e 0a 20 20 54 68 orkstation.. Th
1520: 69 73 20 74 65 73 74 20 73 75 69 74 65 20 69 73 is test suite is
1530: 20 74 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 the same as the
1540: 20 22 71 75 69 63 6b 22 20 74 65 73 74 73 2c 20 "quick" tests,
1550: 65 78 63 65 70 74 20 74 68 61 74 20 73 6f 6d 65 except that some
1560: 20 66 69 6c 65 73 0a 20 20 74 68 61 74 20 74 65 files. that te
1570: 73 74 20 6d 61 6c 6c 6f 63 20 61 6e 64 20 49 4f st malloc and IO
1580: 20 65 72 72 6f 72 73 20 61 72 65 20 6f 6d 69 74 errors are omit
1590: 74 65 64 2e 0a 7d 20 2d 66 69 6c 65 73 20 5b 0a ted..} -files [.
15a0: 20 20 74 65 73 74 5f 73 65 74 20 24 61 6c 6c 71 test_set $allq
15b0: 75 69 63 6b 74 65 73 74 73 20 2d 65 78 63 6c 75 uicktests -exclu
15c0: 64 65 20 2a 6d 61 6c 6c 6f 63 2a 20 2a 69 6f 65 de *malloc* *ioe
15d0: 72 72 2a 20 2a 66 61 75 6c 74 2a 20 2a 62 69 67 rr* *fault* *big
15e0: 66 69 6c 65 2a 20 2a 5f 65 72 72 2a 20 5c 0a 20 file* *_err* \.
15f0: 20 20 20 20 20 2a 66 74 73 35 63 6f 72 72 75 70 *fts5corrup
1600: 74 2a 20 2a 66 74 73 35 62 69 67 2a 20 2a 66 74 t* *fts5big* *ft
1610: 73 35 61 6a 2a 0a 5d 0a 0a 74 65 73 74 5f 73 75 s5aj*.]..test_su
1620: 69 74 65 20 22 65 78 74 72 61 71 75 69 63 6b 22 ite "extraquick"
1630: 20 2d 70 72 65 66 69 78 20 22 22 20 2d 64 65 73 -prefix "" -des
1640: 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 22 45 78 cription {. "Ex
1650: 74 72 61 22 20 71 75 69 63 6b 20 74 65 73 74 20 tra" quick test
1660: 73 75 69 74 65 2e 20 52 75 6e 73 20 69 6e 20 61 suite. Runs in a
1670: 20 66 65 77 20 6d 69 6e 75 74 65 73 20 6f 6e 20 few minutes on
1680: 61 20 77 6f 72 6b 73 74 61 74 69 6f 6e 2e 0a 20 a workstation..
1690: 20 54 68 69 73 20 74 65 73 74 20 73 75 69 74 65 This test suite
16a0: 20 69 73 20 74 68 65 20 73 61 6d 65 20 61 73 20 is the same as
16b0: 74 68 65 20 22 76 65 72 79 71 75 69 63 6b 22 20 the "veryquick"
16c0: 74 65 73 74 73 2c 20 65 78 63 65 70 74 20 74 68 tests, except th
16d0: 61 74 0a 20 20 73 6c 6f 77 65 72 20 74 65 73 74 at. slower test
16e0: 73 20 61 72 65 20 6f 6d 69 74 74 65 64 2e 0a 7d s are omitted..}
16f0: 20 2d 66 69 6c 65 73 20 5b 0a 20 20 74 65 73 74 -files [. test
1700: 5f 73 65 74 20 24 61 6c 6c 71 75 69 63 6b 74 65 _set $allquickte
1710: 73 74 73 20 2d 65 78 63 6c 75 64 65 20 2a 6d 61 sts -exclude *ma
1720: 6c 6c 6f 63 2a 20 2a 69 6f 65 72 72 2a 20 2a 66 lloc* *ioerr* *f
1730: 61 75 6c 74 2a 20 2a 62 69 67 66 69 6c 65 2a 20 ault* *bigfile*
1740: 2a 5f 65 72 72 2a 20 5c 0a 20 20 20 20 20 77 61 *_err* \. wa
1750: 6c 33 2e 74 65 73 74 20 66 74 73 34 6d 65 72 67 l3.test fts4merg
1760: 65 2a 20 73 6f 72 74 32 2e 74 65 73 74 20 6d 6d e* sort2.test mm
1770: 61 70 31 2e 74 65 73 74 20 77 61 6c 63 72 61 73 ap1.test walcras
1780: 68 2a 20 5c 0a 20 20 20 20 20 70 65 72 63 65 6e h* \. percen
1790: 74 69 6c 65 2e 74 65 73 74 20 77 68 65 72 65 38 tile.test where8
17a0: 6d 2e 74 65 73 74 20 77 61 6c 63 6b 73 75 6d 2e m.test walcksum.
17b0: 74 65 73 74 20 73 61 76 65 70 6f 69 6e 74 33 2e test savepoint3.
17c0: 74 65 73 74 20 5c 0a 20 20 20 20 20 66 75 7a 7a test \. fuzz
17d0: 65 72 31 2e 74 65 73 74 20 66 75 7a 7a 65 72 33 er1.test fuzzer3
17e0: 2e 74 65 73 74 20 66 74 73 33 65 78 70 72 33 2e .test fts3expr3.
17f0: 74 65 73 74 0a 5d 0a 0a 74 65 73 74 5f 73 75 69 test.]..test_sui
1800: 74 65 20 22 6d 6d 61 70 22 20 2d 70 72 65 66 69 te "mmap" -prefi
1810: 78 20 22 6d 6d 2d 22 20 2d 64 65 73 63 72 69 70 x "mm-" -descrip
1820: 74 69 6f 6e 20 7b 0a 20 20 53 69 6d 69 6c 61 72 tion {. Similar
1830: 20 74 6f 20 76 65 72 79 71 75 69 63 6b 2e 20 45 to veryquick. E
1840: 78 63 65 70 74 20 77 69 74 68 20 6d 65 6d 6f 72 xcept with memor
1850: 79 20 6d 61 70 70 69 6e 67 20 65 6e 61 62 6c 65 y mapping enable
1860: 64 2e 0a 7d 20 2d 70 72 65 73 71 6c 20 7b 0a 20 d..} -presql {.
1870: 20 70 72 61 67 6d 61 20 6d 6d 61 70 5f 73 69 7a pragma mmap_siz
1880: 65 20 3d 20 32 36 38 34 33 35 34 35 36 3b 0a 7d e = 268435456;.}
1890: 20 2d 66 69 6c 65 73 20 5b 0a 20 20 74 65 73 74 -files [. test
18a0: 5f 73 65 74 20 24 61 6c 6c 71 75 69 63 6b 74 65 _set $allquickte
18b0: 73 74 73 20 2d 65 78 63 6c 75 64 65 20 2a 6d 61 sts -exclude *ma
18c0: 6c 6c 6f 63 2a 20 2a 69 6f 65 72 72 2a 20 2a 66 lloc* *ioerr* *f
18d0: 61 75 6c 74 2a 20 2d 69 6e 63 6c 75 64 65 20 6d ault* -include m
18e0: 61 6c 6c 6f 63 2e 74 65 73 74 0a 5d 0a 0a 74 65 alloc.test.]..te
18f0: 73 74 5f 73 75 69 74 65 20 22 76 61 6c 67 72 69 st_suite "valgri
1900: 6e 64 22 20 2d 70 72 65 66 69 78 20 22 22 20 2d nd" -prefix "" -
1910: 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 description {.
1920: 52 75 6e 20 74 68 65 20 22 76 65 72 79 71 75 69 Run the "veryqui
1930: 63 6b 22 20 74 65 73 74 20 73 75 69 74 65 20 77 ck" test suite w
1940: 69 74 68 20 61 20 63 6f 75 70 6c 65 20 6f 66 20 ith a couple of
1950: 6d 75 6c 74 69 2d 70 72 6f 63 65 73 73 20 74 65 multi-process te
1960: 73 74 73 20 28 74 68 61 74 0a 20 20 66 61 69 6c sts (that. fail
1970: 20 75 6e 64 65 72 20 76 61 6c 67 72 69 6e 64 29 under valgrind)
1980: 20 6f 6d 69 74 74 65 64 2e 0a 7d 20 2d 66 69 6c omitted..} -fil
1990: 65 73 20 5b 0a 20 20 74 65 73 74 5f 73 65 74 20 es [. test_set
19a0: 24 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 20 2d $allquicktests -
19b0: 65 78 63 6c 75 64 65 20 2a 6d 61 6c 6c 6f 63 2a exclude *malloc*
19c0: 20 2a 69 6f 65 72 72 2a 20 2a 66 61 75 6c 74 2a *ioerr* *fault*
19d0: 20 2a 5f 65 72 72 2a 20 77 61 6c 2e 74 65 73 74 *_err* wal.test
19e0: 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 \.
19f0: 20 73 68 65 6c 6c 2a 2e 74 65 73 74 20 63 72 61 shell*.test cra
1a00: 73 68 38 2e 74 65 73 74 20 61 74 6f 66 31 2e 74 sh8.test atof1.t
1a10: 65 73 74 20 73 65 6c 65 63 74 47 2e 74 65 73 74 est selectG.test
1a20: 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 \.
1a30: 20 74 6b 74 2d 66 63 36 32 61 66 34 35 32 33 2e tkt-fc62af4523.
1a40: 74 65 73 74 20 6e 75 6d 69 6e 64 65 78 31 2e 74 test numindex1.t
1a50: 65 73 74 20 63 6f 72 72 75 70 74 4b 2e 74 65 73 est corruptK.tes
1a60: 74 0a 5d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 20 t.] -initialize
1a70: 7b 0a 20 20 73 65 74 20 3a 3a 47 28 76 61 6c 67 {. set ::G(valg
1a80: 72 69 6e 64 29 20 31 0a 7d 20 2d 73 68 75 74 64 rind) 1.} -shutd
1a90: 6f 77 6e 20 7b 0a 20 20 75 6e 73 65 74 20 2d 6e own {. unset -n
1aa0: 6f 63 6f 6d 70 6c 61 69 6e 20 3a 3a 47 28 76 61 ocomplain ::G(va
1ab0: 6c 67 72 69 6e 64 29 0a 7d 0a 0a 74 65 73 74 5f lgrind).}..test_
1ac0: 73 75 69 74 65 20 22 76 61 6c 67 72 69 6e 64 2d suite "valgrind-
1ad0: 6e 6f 6c 6f 6f 6b 61 73 69 64 65 22 20 2d 70 72 nolookaside" -pr
1ae0: 65 66 69 78 20 22 22 20 2d 64 65 73 63 72 69 70 efix "" -descrip
1af0: 74 69 6f 6e 20 7b 0a 20 20 52 75 6e 20 74 68 65 tion {. Run the
1b00: 20 22 76 65 72 79 71 75 69 63 6b 22 20 74 65 73 "veryquick" tes
1b10: 74 20 73 75 69 74 65 20 77 69 74 68 20 61 20 63 t suite with a c
1b20: 6f 75 70 6c 65 20 6f 66 20 6d 75 6c 74 69 2d 70 ouple of multi-p
1b30: 72 6f 63 65 73 73 20 74 65 73 74 73 20 28 74 68 rocess tests (th
1b40: 61 74 0a 20 20 66 61 69 6c 20 75 6e 64 65 72 20 at. fail under
1b50: 76 61 6c 67 72 69 6e 64 29 20 6f 6d 69 74 74 65 valgrind) omitte
1b60: 64 2e 0a 7d 20 2d 66 69 6c 65 73 20 5b 0a 20 20 d..} -files [.
1b70: 74 65 73 74 5f 73 65 74 20 24 61 6c 6c 71 75 69 test_set $allqui
1b80: 63 6b 74 65 73 74 73 20 2d 65 78 63 6c 75 64 65 cktests -exclude
1b90: 20 2a 6d 61 6c 6c 6f 63 2a 20 2a 69 6f 65 72 72 *malloc* *ioerr
1ba0: 2a 20 2a 66 61 75 6c 74 2a 20 2a 5f 65 72 72 2a * *fault* *_err*
1bb0: 20 5c 0a 20 20 20 20 20 20 77 61 6c 2e 74 65 73 \. wal.tes
1bc0: 74 20 61 74 6f 66 31 2e 74 65 73 74 0a 5d 20 2d t atof1.test.] -
1bd0: 69 6e 69 74 69 61 6c 69 7a 65 20 7b 0a 20 20 73 initialize {. s
1be0: 65 74 20 3a 3a 47 28 76 61 6c 67 72 69 6e 64 29 et ::G(valgrind)
1bf0: 20 31 0a 20 20 63 61 74 63 68 20 7b 64 62 20 63 1. catch {db c
1c00: 6c 6f 73 65 7d 0a 20 20 73 71 6c 69 74 65 33 5f lose}. sqlite3_
1c10: 73 68 75 74 64 6f 77 6e 0a 20 20 73 71 6c 69 74 shutdown. sqlit
1c20: 65 33 5f 63 6f 6e 66 69 67 5f 6c 6f 6f 6b 61 73 e3_config_lookas
1c30: 69 64 65 20 30 20 30 0a 20 20 73 71 6c 69 74 65 ide 0 0. sqlite
1c40: 33 5f 69 6e 69 74 69 61 6c 69 7a 65 0a 20 20 61 3_initialize. a
1c50: 75 74 6f 69 6e 73 74 61 6c 6c 5f 74 65 73 74 5f utoinstall_test_
1c60: 66 75 6e 63 74 69 6f 6e 73 0a 7d 20 2d 73 68 75 functions.} -shu
1c70: 74 64 6f 77 6e 20 7b 0a 20 20 63 61 74 63 68 20 tdown {. catch
1c80: 7b 64 62 20 63 6c 6f 73 65 7d 0a 20 20 73 71 6c {db close}. sql
1c90: 69 74 65 33 5f 73 68 75 74 64 6f 77 6e 0a 20 20 ite3_shutdown.
1ca0: 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 67 5f 6c sqlite3_config_l
1cb0: 6f 6f 6b 61 73 69 64 65 20 31 30 30 20 35 30 30 ookaside 100 500
1cc0: 0a 20 20 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 . sqlite3_initi
1cd0: 61 6c 69 7a 65 0a 20 20 61 75 74 6f 69 6e 73 74 alize. autoinst
1ce0: 61 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f all_test_functio
1cf0: 6e 73 0a 20 20 75 6e 73 65 74 20 2d 6e 6f 63 6f ns. unset -noco
1d00: 6d 70 6c 61 69 6e 20 3a 3a 47 28 76 61 6c 67 72 mplain ::G(valgr
1d10: 69 6e 64 29 0a 7d 0a 0a 0a 74 65 73 74 5f 73 75 ind).}...test_su
1d20: 69 74 65 20 22 71 75 69 63 6b 22 20 2d 70 72 65 ite "quick" -pre
1d30: 66 69 78 20 22 22 20 2d 64 65 73 63 72 69 70 74 fix "" -descript
1d40: 69 6f 6e 20 7b 0a 20 20 51 75 69 63 6b 20 74 65 ion {. Quick te
1d50: 73 74 20 73 75 69 74 65 2e 20 52 75 6e 73 20 69 st suite. Runs i
1d60: 6e 20 61 72 6f 75 6e 64 20 31 30 20 6d 69 6e 75 n around 10 minu
1d70: 74 65 73 20 6f 6e 20 61 20 77 6f 72 6b 73 74 61 tes on a worksta
1d80: 74 69 6f 6e 2e 0a 7d 20 2d 66 69 6c 65 73 20 5b tion..} -files [
1d90: 0a 20 20 74 65 73 74 5f 73 65 74 20 24 61 6c 6c . test_set $all
1da0: 71 75 69 63 6b 74 65 73 74 73 0a 5d 0a 0a 74 65 quicktests.]..te
1db0: 73 74 5f 73 75 69 74 65 20 22 66 75 6c 6c 22 20 st_suite "full"
1dc0: 2d 70 72 65 66 69 78 20 22 22 20 2d 64 65 73 63 -prefix "" -desc
1dd0: 72 69 70 74 69 6f 6e 20 7b 0a 20 20 46 75 6c 6c ription {. Full
1de0: 20 74 65 73 74 20 73 75 69 74 65 2e 20 54 61 6b test suite. Tak
1df0: 65 73 20 61 20 6c 6f 6e 67 20 74 69 6d 65 2e 0a es a long time..
1e00: 7d 20 2d 66 69 6c 65 73 20 5b 20 0a 20 20 74 65 } -files [ . te
1e10: 73 74 5f 73 65 74 20 24 61 6c 6c 74 65 73 74 73 st_set $alltests
1e20: 20 0a 5d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 20 .] -initialize
1e30: 7b 0a 20 20 75 6e 73 65 74 20 2d 6e 6f 63 6f 6d {. unset -nocom
1e40: 70 6c 61 69 6e 20 3a 3a 47 28 69 73 71 75 69 63 plain ::G(isquic
1e50: 6b 29 0a 7d 0a 0a 74 65 73 74 5f 73 75 69 74 65 k).}..test_suite
1e60: 20 22 74 68 72 65 61 64 73 22 20 2d 70 72 65 66 "threads" -pref
1e70: 69 78 20 22 22 20 2d 64 65 73 63 72 69 70 74 69 ix "" -descripti
1e80: 6f 6e 20 7b 0a 20 20 41 6c 6c 20 6d 75 6c 74 69 on {. All multi
1e90: 2d 74 68 72 65 61 64 65 64 20 74 65 73 74 73 2e -threaded tests.
1ea0: 0a 7d 20 2d 66 69 6c 65 73 20 7b 0a 20 20 6e 6f .} -files {. no
1eb0: 74 69 66 79 32 2e 74 65 73 74 20 20 20 74 68 72 tify2.test thr
1ec0: 65 61 64 30 30 31 2e 74 65 73 74 20 74 68 72 65 ead001.test thre
1ed0: 61 64 30 30 32 2e 74 65 73 74 20 74 68 72 65 61 ad002.test threa
1ee0: 64 30 30 33 2e 74 65 73 74 20 0a 20 20 74 68 72 d003.test . thr
1ef0: 65 61 64 30 30 34 2e 74 65 73 74 20 74 68 72 65 ead004.test thre
1f00: 61 64 30 30 35 2e 74 65 73 74 20 77 61 6c 74 68 ad005.test walth
1f10: 72 65 61 64 2e 74 65 73 74 0a 7d 0a 0a 74 65 73 read.test.}..tes
1f20: 74 5f 73 75 69 74 65 20 22 66 74 73 33 22 20 2d t_suite "fts3" -
1f30: 70 72 65 66 69 78 20 22 22 20 2d 64 65 73 63 72 prefix "" -descr
1f40: 69 70 74 69 6f 6e 20 7b 0a 20 20 41 6c 6c 20 46 iption {. All F
1f50: 54 53 33 20 74 65 73 74 73 20 65 78 63 65 70 74 TS3 tests except
1f60: 20 66 74 73 33 72 6e 64 2e 74 65 73 74 2e 0a 7d fts3rnd.test..}
1f70: 20 2d 66 69 6c 65 73 20 7b 0a 20 20 66 74 73 33 -files {. fts3
1f80: 61 61 2e 74 65 73 74 20 66 74 73 33 61 62 2e 74 aa.test fts3ab.t
1f90: 65 73 74 20 66 74 73 33 61 63 2e 74 65 73 74 20 est fts3ac.test
1fa0: 66 74 73 33 61 64 2e 74 65 73 74 0a 20 20 66 74 fts3ad.test. ft
1fb0: 73 33 61 65 2e 74 65 73 74 20 66 74 73 33 61 66 s3ae.test fts3af
1fc0: 2e 74 65 73 74 20 66 74 73 33 61 67 2e 74 65 73 .test fts3ag.tes
1fd0: 74 20 66 74 73 33 61 68 2e 74 65 73 74 0a 20 20 t fts3ah.test.
1fe0: 66 74 73 33 61 69 2e 74 65 73 74 20 66 74 73 33 fts3ai.test fts3
1ff0: 61 6a 2e 74 65 73 74 20 66 74 73 33 61 6b 2e 74 aj.test fts3ak.t
2000: 65 73 74 20 66 74 73 33 61 6c 2e 74 65 73 74 0a est fts3al.test.
2010: 20 20 66 74 73 33 61 6d 2e 74 65 73 74 20 66 74 fts3am.test ft
2020: 73 33 61 6e 2e 74 65 73 74 20 66 74 73 33 61 6f s3an.test fts3ao
2030: 2e 74 65 73 74 20 66 74 73 33 61 74 6f 6b 65 6e .test fts3atoken
2040: 2e 74 65 73 74 0a 20 20 66 74 73 33 61 75 74 6f .test. fts3auto
2050: 2e 74 65 73 74 20 66 74 73 33 61 75 78 31 2e 74 .test fts3aux1.t
2060: 65 73 74 20 66 74 73 33 61 75 78 32 2e 74 65 73 est fts3aux2.tes
2070: 74 20 66 74 73 33 62 2e 74 65 73 74 0a 20 20 66 t fts3b.test. f
2080: 74 73 33 63 6f 6d 70 31 2e 74 65 73 74 20 66 74 ts3comp1.test ft
2090: 73 33 63 6f 6e 66 2e 74 65 73 74 20 66 74 73 33 s3conf.test fts3
20a0: 63 6f 72 72 75 70 74 32 2e 74 65 73 74 20 66 74 corrupt2.test ft
20b0: 73 33 63 6f 72 72 75 70 74 2e 74 65 73 74 0a 20 s3corrupt.test.
20c0: 20 66 74 73 33 63 6f 72 72 75 70 74 34 2e 74 65 fts3corrupt4.te
20d0: 73 74 0a 20 20 66 74 73 33 63 6f 76 2e 74 65 73 st. fts3cov.tes
20e0: 74 20 66 74 73 33 63 2e 74 65 73 74 20 66 74 73 t fts3c.test fts
20f0: 33 64 65 66 65 72 32 2e 74 65 73 74 20 66 74 73 3defer2.test fts
2100: 33 64 65 66 65 72 33 2e 74 65 73 74 0a 20 20 66 3defer3.test. f
2110: 74 73 33 64 65 66 65 72 2e 74 65 73 74 20 66 74 ts3defer.test ft
2120: 73 33 64 72 6f 70 2e 74 65 73 74 20 66 74 73 33 s3drop.test fts3
2130: 64 2e 74 65 73 74 20 66 74 73 33 65 2e 74 65 73 d.test fts3e.tes
2140: 74 0a 20 20 66 74 73 33 65 78 70 72 32 2e 74 65 t. fts3expr2.te
2150: 73 74 20 66 74 73 33 65 78 70 72 33 2e 74 65 73 st fts3expr3.tes
2160: 74 20 66 74 73 33 65 78 70 72 34 2e 74 65 73 74 t fts3expr4.test
2170: 20 66 74 73 33 65 78 70 72 35 2e 74 65 73 74 0a fts3expr5.test.
2180: 20 20 66 74 73 33 65 78 70 72 2e 74 65 73 74 20 fts3expr.test
2190: 66 74 73 33 66 61 75 6c 74 32 2e 74 65 73 74 20 fts3fault2.test
21a0: 66 74 73 33 66 61 75 6c 74 2e 74 65 73 74 20 66 fts3fault.test f
21b0: 74 73 33 66 69 72 73 74 2e 74 65 73 74 0a 20 20 ts3first.test.
21c0: 66 74 73 33 6a 6f 69 6e 2e 74 65 73 74 20 66 74 fts3join.test ft
21d0: 73 33 6d 61 6c 6c 6f 63 2e 74 65 73 74 20 66 74 s3malloc.test ft
21e0: 73 33 6d 61 74 63 68 69 6e 66 6f 2e 74 65 73 74 s3matchinfo.test
21f0: 20 66 74 73 33 6e 65 61 72 2e 74 65 73 74 0a 20 fts3near.test.
2200: 20 66 74 73 33 6f 66 66 73 65 74 73 2e 74 65 73 fts3offsets.tes
2210: 74 20 66 74 73 33 70 72 65 66 69 78 32 2e 74 65 t fts3prefix2.te
2220: 73 74 20 66 74 73 33 70 72 65 66 69 78 2e 74 65 st fts3prefix.te
2230: 73 74 20 66 74 73 33 71 75 65 72 79 2e 74 65 73 st fts3query.tes
2240: 74 0a 20 20 66 74 73 33 73 68 61 72 65 64 2e 74 t. fts3shared.t
2250: 65 73 74 20 66 74 73 33 73 6e 69 70 70 65 74 2e est fts3snippet.
2260: 74 65 73 74 20 66 74 73 33 73 6f 72 74 2e 74 65 test fts3sort.te
2270: 73 74 20 66 74 73 33 74 6f 6b 31 2e 74 65 73 74 st fts3tok1.test
2280: 0a 20 20 66 74 73 33 74 6f 6b 5f 65 72 72 2e 74 . fts3tok_err.t
2290: 65 73 74 20 66 74 73 33 76 61 72 69 6e 74 2e 74 est fts3varint.t
22a0: 65 73 74 20 66 74 73 34 61 61 2e 74 65 73 74 20 est fts4aa.test
22b0: 66 74 73 34 63 68 65 63 6b 2e 74 65 73 74 0a 20 fts4check.test.
22c0: 20 66 74 73 34 63 6f 6e 74 65 6e 74 2e 74 65 73 fts4content.tes
22d0: 74 20 66 74 73 34 64 6f 63 69 64 2e 74 65 73 74 t fts4docid.test
22e0: 20 66 74 73 34 67 72 6f 77 74 68 32 2e 74 65 73 fts4growth2.tes
22f0: 74 20 66 74 73 34 67 72 6f 77 74 68 2e 74 65 73 t fts4growth.tes
2300: 74 0a 20 20 66 74 73 34 69 6e 63 72 2e 74 65 73 t. fts4incr.tes
2310: 74 20 66 74 73 34 6c 61 6e 67 69 64 2e 74 65 73 t fts4langid.tes
2320: 74 20 66 74 73 34 6c 61 73 74 72 6f 77 69 64 2e t fts4lastrowid.
2330: 74 65 73 74 20 66 74 73 34 6d 65 72 67 65 32 2e test fts4merge2.
2340: 74 65 73 74 0a 20 20 66 74 73 34 6d 65 72 67 65 test. fts4merge
2350: 34 2e 74 65 73 74 20 66 74 73 34 6d 65 72 67 65 4.test fts4merge
2360: 2e 74 65 73 74 20 66 74 73 34 6e 6f 74 69 2e 74 .test fts4noti.t
2370: 65 73 74 20 66 74 73 34 6f 6e 65 70 61 73 73 2e est fts4onepass.
2380: 74 65 73 74 20 0a 20 20 66 74 73 34 6f 70 74 2e test . fts4opt.
2390: 74 65 73 74 20 66 74 73 34 75 6e 69 63 6f 64 65 test fts4unicode
23a0: 2e 74 65 73 74 0a 20 20 66 74 73 33 63 6f 72 72 .test. fts3corr
23b0: 75 70 74 33 2e 74 65 73 74 0a 20 20 66 74 73 33 upt3.test. fts3
23c0: 6d 69 73 63 2e 74 65 73 74 0a 7d 0a 0a 74 65 73 misc.test.}..tes
23d0: 74 5f 73 75 69 74 65 20 22 66 74 73 35 22 20 2d t_suite "fts5" -
23e0: 70 72 65 66 69 78 20 22 22 20 2d 64 65 73 63 72 prefix "" -descr
23f0: 69 70 74 69 6f 6e 20 7b 0a 20 20 41 6c 6c 20 46 iption {. All F
2400: 54 53 35 20 74 65 73 74 73 2e 0a 7d 20 2d 66 69 TS5 tests..} -fi
2410: 6c 65 73 20 5b 67 6c 6f 62 20 2d 6e 6f 63 6f 6d les [glob -nocom
2420: 70 6c 61 69 6e 20 24 3a 3a 74 65 73 74 64 69 72 plain $::testdir
2430: 2f 2e 2e 2f 65 78 74 2f 66 74 73 35 2f 74 65 73 /../ext/fts5/tes
2440: 74 2f 2a 2e 74 65 73 74 5d 0a 0a 74 65 73 74 5f t/*.test]..test_
2450: 73 75 69 74 65 20 22 66 74 73 35 2d 6c 69 67 68 suite "fts5-ligh
2460: 74 22 20 2d 70 72 65 66 69 78 20 22 22 20 2d 64 t" -prefix "" -d
2470: 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 41 escription {. A
2480: 6c 6c 20 46 54 53 35 20 74 65 73 74 73 2e 0a 7d ll FTS5 tests..}
2490: 20 2d 66 69 6c 65 73 20 5b 0a 20 20 74 65 73 74 -files [. test
24a0: 5f 73 65 74 20 5c 0a 20 20 20 20 20 20 5b 67 6c _set \. [gl
24b0: 6f 62 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e 20 24 ob -nocomplain $
24c0: 3a 3a 74 65 73 74 64 69 72 2f 2e 2e 2f 65 78 74 ::testdir/../ext
24d0: 2f 66 74 73 35 2f 74 65 73 74 2f 2a 2e 74 65 73 /fts5/test/*.tes
24e0: 74 5d 20 5c 0a 20 20 20 20 20 20 2d 65 78 63 6c t] \. -excl
24f0: 75 64 65 20 2a 63 6f 72 72 75 70 74 2a 20 2a 66 ude *corrupt* *f
2500: 61 75 6c 74 2a 20 2a 62 69 67 2a 20 2a 66 74 73 ault* *big* *fts
2510: 35 61 6a 2a 0a 5d 0a 0a 74 65 73 74 5f 73 75 69 5aj*.]..test_sui
2520: 74 65 20 22 77 69 6e 64 6f 77 22 20 2d 70 72 65 te "window" -pre
2530: 66 69 78 20 22 22 20 2d 64 65 73 63 72 69 70 74 fix "" -descript
2540: 69 6f 6e 20 7b 0a 20 20 41 6c 6c 20 77 69 6e 64 ion {. All wind
2550: 6f 77 20 66 75 6e 63 74 69 6f 6e 20 72 65 6c 61 ow function rela
2560: 74 65 64 20 74 65 73 74 73 20 2e 0a 7d 20 2d 66 ted tests ..} -f
2570: 69 6c 65 73 20 5b 0a 20 20 74 65 73 74 5f 73 65 iles [. test_se
2580: 74 20 5b 67 6c 6f 62 20 2d 6e 6f 63 6f 6d 70 6c t [glob -nocompl
2590: 61 69 6e 20 24 3a 3a 74 65 73 74 64 69 72 2f 77 ain $::testdir/w
25a0: 69 6e 64 6f 77 2a 2e 74 65 73 74 5d 0a 5d 0a 0a indow*.test].]..
25b0: 74 65 73 74 5f 73 75 69 74 65 20 22 6c 73 6d 31 test_suite "lsm1
25c0: 22 20 2d 70 72 65 66 69 78 20 22 22 20 2d 64 65 " -prefix "" -de
25d0: 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 41 6c scription {. Al
25e0: 6c 20 4c 53 4d 31 20 74 65 73 74 73 2e 0a 7d 20 l LSM1 tests..}
25f0: 2d 66 69 6c 65 73 20 5b 67 6c 6f 62 20 2d 6e 6f -files [glob -no
2600: 63 6f 6d 70 6c 61 69 6e 20 24 3a 3a 74 65 73 74 complain $::test
2610: 64 69 72 2f 2e 2e 2f 65 78 74 2f 6c 73 6d 31 2f dir/../ext/lsm1/
2620: 74 65 73 74 2f 2a 2e 74 65 73 74 5d 0a 0a 74 65 test/*.test]..te
2630: 73 74 5f 73 75 69 74 65 20 22 6e 6f 66 61 75 6c st_suite "nofaul
2640: 74 73 69 6d 22 20 2d 70 72 65 66 69 78 20 22 22 tsim" -prefix ""
2650: 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a -description {.
2660: 20 20 22 56 65 72 79 22 20 71 75 69 63 6b 20 74 "Very" quick t
2670: 65 73 74 20 73 75 69 74 65 2e 20 52 75 6e 73 20 est suite. Runs
2680: 69 6e 20 6c 65 73 73 20 74 68 61 6e 20 35 20 6d in less than 5 m
2690: 69 6e 75 74 65 73 20 6f 6e 20 61 20 77 6f 72 6b inutes on a work
26a0: 73 74 61 74 69 6f 6e 2e 20 0a 20 20 54 68 69 73 station. . This
26b0: 20 74 65 73 74 20 73 75 69 74 65 20 69 73 20 74 test suite is t
26c0: 68 65 20 73 61 6d 65 20 61 73 20 74 68 65 20 22 he same as the "
26d0: 71 75 69 63 6b 22 20 74 65 73 74 73 2c 20 65 78 quick" tests, ex
26e0: 63 65 70 74 20 74 68 61 74 20 73 6f 6d 65 20 66 cept that some f
26f0: 69 6c 65 73 0a 20 20 74 68 61 74 20 74 65 73 74 iles. that test
2700: 20 6d 61 6c 6c 6f 63 20 61 6e 64 20 49 4f 20 65 malloc and IO e
2710: 72 72 6f 72 73 20 61 72 65 20 6f 6d 69 74 74 65 rrors are omitte
2720: 64 2e 0a 7d 20 2d 66 69 6c 65 73 20 5b 0a 20 20 d..} -files [.
2730: 74 65 73 74 5f 73 65 74 20 24 61 6c 6c 71 75 69 test_set $allqui
2740: 63 6b 74 65 73 74 73 20 2d 65 78 63 6c 75 64 65 cktests -exclude
2750: 20 2a 6d 61 6c 6c 6f 63 2a 20 2a 69 6f 65 72 72 *malloc* *ioerr
2760: 2a 20 2a 66 61 75 6c 74 2a 20 2a 5f 65 72 72 2a * *fault* *_err*
2770: 0a 5d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 20 7b .] -initialize {
2780: 0a 20 20 63 61 74 63 68 20 7b 64 62 20 63 6c 6f . catch {db clo
2790: 73 65 7d 0a 20 20 73 71 6c 69 74 65 33 5f 73 68 se}. sqlite3_sh
27a0: 75 74 64 6f 77 6e 0a 20 20 69 6e 73 74 61 6c 6c utdown. install
27b0: 5f 6d 61 6c 6c 6f 63 5f 66 61 75 6c 74 73 69 6d _malloc_faultsim
27c0: 20 30 0a 20 20 73 71 6c 69 74 65 33 5f 69 6e 69 0. sqlite3_ini
27d0: 74 69 61 6c 69 7a 65 0a 20 20 61 75 74 6f 69 6e tialize. autoin
27e0: 73 74 61 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 74 stall_test_funct
27f0: 69 6f 6e 73 0a 7d 20 2d 73 68 75 74 64 6f 77 6e ions.} -shutdown
2800: 20 7b 0a 20 20 75 6e 73 65 74 20 2d 6e 6f 63 6f {. unset -noco
2810: 6d 70 6c 61 69 6e 20 3a 3a 47 28 76 61 6c 67 72 mplain ::G(valgr
2820: 69 6e 64 29 0a 7d 0a 0a 74 65 73 74 5f 73 75 69 ind).}..test_sui
2830: 74 65 20 22 71 75 65 72 79 70 6c 61 6e 6e 65 72 te "queryplanner
2840: 22 20 2d 70 72 65 66 69 78 20 22 22 20 2d 64 65 " -prefix "" -de
2850: 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 54 65 scription {. Te
2860: 73 74 73 20 6f 66 20 74 68 65 20 71 75 65 72 79 sts of the query
2870: 20 70 6c 61 6e 6e 65 72 20 61 6e 64 20 71 75 65 planner and que
2880: 72 79 20 6f 70 74 69 6d 69 7a 65 72 0a 7d 20 2d ry optimizer.} -
2890: 66 69 6c 65 73 20 7b 0a 20 20 61 6c 74 65 72 32 files {. alter2
28a0: 2e 74 65 73 74 20 61 6c 74 65 72 33 2e 74 65 73 .test alter3.tes
28b0: 74 20 61 6c 74 65 72 34 2e 74 65 73 74 20 61 6c t alter4.test al
28c0: 74 65 72 2e 74 65 73 74 20 61 6e 61 6c 79 7a 65 ter.test analyze
28d0: 33 2e 74 65 73 74 0a 20 20 61 6e 61 6c 79 7a 65 3.test. analyze
28e0: 34 2e 74 65 73 74 20 61 6e 61 6c 79 7a 65 35 2e 4.test analyze5.
28f0: 74 65 73 74 20 61 6e 61 6c 79 7a 65 36 2e 74 65 test analyze6.te
2900: 73 74 20 61 6e 61 6c 79 7a 65 37 2e 74 65 73 74 st analyze7.test
2910: 20 61 6e 61 6c 79 7a 65 38 2e 74 65 73 74 0a 20 analyze8.test.
2920: 20 61 6e 61 6c 79 7a 65 2e 74 65 73 74 20 61 74 analyze.test at
2930: 74 61 63 68 32 2e 74 65 73 74 20 61 74 74 61 63 tach2.test attac
2940: 68 33 2e 74 65 73 74 20 61 74 74 61 63 68 34 2e h3.test attach4.
2950: 74 65 73 74 0a 20 20 61 74 74 61 63 68 2e 74 65 test. attach.te
2960: 73 74 20 61 75 74 6f 69 6e 63 2e 74 65 73 74 20 st autoinc.test
2970: 61 75 74 6f 69 6e 64 65 78 31 2e 74 65 73 74 20 autoindex1.test
2980: 62 65 74 77 65 65 6e 2e 74 65 73 74 20 63 61 73 between.test cas
2990: 74 2e 74 65 73 74 0a 20 20 63 68 65 63 6b 2e 74 t.test. check.t
29a0: 65 73 74 20 63 6c 6f 73 75 72 65 30 31 2e 74 65 est closure01.te
29b0: 73 74 20 63 6f 61 6c 65 73 63 65 2e 74 65 73 74 st coalesce.test
29c0: 20 63 6f 6c 6c 61 74 65 31 2e 74 65 73 74 20 63 collate1.test c
29d0: 6f 6c 6c 61 74 65 32 2e 74 65 73 74 0a 20 20 63 ollate2.test. c
29e0: 6f 6c 6c 61 74 65 33 2e 74 65 73 74 20 63 6f 6c ollate3.test col
29f0: 6c 61 74 65 34 2e 74 65 73 74 20 63 6f 6c 6c 61 late4.test colla
2a00: 74 65 35 2e 74 65 73 74 20 63 6f 6c 6c 61 74 65 te5.test collate
2a10: 36 2e 74 65 73 74 20 63 6f 6c 6c 61 74 65 37 2e 6.test collate7.
2a20: 74 65 73 74 0a 20 20 63 6f 6c 6c 61 74 65 38 2e test. collate8.
2a30: 74 65 73 74 20 63 6f 6c 6c 61 74 65 39 2e 74 65 test collate9.te
2a40: 73 74 20 63 6f 6c 6c 61 74 65 41 2e 74 65 73 74 st collateA.test
2a50: 20 63 6f 6c 6d 65 74 61 2e 74 65 73 74 20 63 6f colmeta.test co
2a60: 6c 6e 61 6d 65 2e 74 65 73 74 0a 20 20 63 6f 6e lname.test. con
2a70: 66 6c 69 63 74 2e 74 65 73 74 20 63 6f 75 6e 74 flict.test count
2a80: 2e 74 65 73 74 20 63 6f 76 65 72 69 64 78 73 63 .test coveridxsc
2a90: 61 6e 2e 74 65 73 74 20 63 72 65 61 74 65 74 61 an.test createta
2aa0: 62 2e 74 65 73 74 20 63 73 65 2e 74 65 73 74 0a b.test cse.test.
2ab0: 20 20 64 61 74 65 2e 74 65 73 74 20 64 62 73 74 date.test dbst
2ac0: 61 74 75 73 32 2e 74 65 73 74 20 64 62 73 74 61 atus2.test dbsta
2ad0: 74 75 73 2e 74 65 73 74 20 64 65 66 61 75 6c 74 tus.test default
2ae0: 2e 74 65 73 74 20 64 65 6c 65 74 65 32 2e 74 65 .test delete2.te
2af0: 73 74 0a 20 20 64 65 6c 65 74 65 33 2e 74 65 73 st. delete3.tes
2b00: 74 20 64 65 6c 65 74 65 2e 74 65 73 74 20 64 65 t delete.test de
2b10: 73 63 69 64 78 31 2e 74 65 73 74 20 64 65 73 63 scidx1.test desc
2b20: 69 64 78 32 2e 74 65 73 74 20 64 65 73 63 69 64 idx2.test descid
2b30: 78 33 2e 74 65 73 74 0a 20 20 64 69 73 74 69 6e x3.test. distin
2b40: 63 74 61 67 67 2e 74 65 73 74 20 64 69 73 74 69 ctagg.test disti
2b50: 6e 63 74 2e 74 65 73 74 20 65 5f 63 72 65 61 74 nct.test e_creat
2b60: 65 74 61 62 6c 65 2e 74 65 73 74 20 65 5f 64 65 etable.test e_de
2b70: 6c 65 74 65 2e 74 65 73 74 0a 20 20 65 5f 64 72 lete.test. e_dr
2b80: 6f 70 74 72 69 67 67 65 72 2e 74 65 73 74 20 65 optrigger.test e
2b90: 5f 64 72 6f 70 76 69 65 77 2e 74 65 73 74 20 65 _dropview.test e
2ba0: 5f 65 78 70 72 2e 74 65 73 74 20 65 5f 69 6e 73 _expr.test e_ins
2bb0: 65 72 74 2e 74 65 73 74 0a 20 20 65 71 70 2e 74 ert.test. eqp.t
2bc0: 65 73 74 20 65 5f 72 65 69 6e 64 65 78 2e 74 65 est e_reindex.te
2bd0: 73 74 20 65 5f 72 65 73 6f 6c 76 65 2e 74 65 73 st e_resolve.tes
2be0: 74 20 65 5f 73 65 6c 65 63 74 32 2e 74 65 73 74 t e_select2.test
2bf0: 20 65 5f 73 65 6c 65 63 74 2e 74 65 73 74 0a 20 e_select.test.
2c00: 20 65 5f 75 70 64 61 74 65 2e 74 65 73 74 20 65 e_update.test e
2c10: 78 69 73 74 73 2e 74 65 73 74 20 65 78 70 72 2e xists.test expr.
2c20: 74 65 73 74 20 66 6b 65 79 31 2e 74 65 73 74 20 test fkey1.test
2c30: 66 6b 65 79 32 2e 74 65 73 74 20 66 6b 65 79 33 fkey2.test fkey3
2c40: 2e 74 65 73 74 0a 20 20 66 6b 65 79 34 2e 74 65 .test. fkey4.te
2c50: 73 74 20 66 6b 65 79 35 2e 74 65 73 74 20 66 75 st fkey5.test fu
2c60: 6e 63 32 2e 74 65 73 74 20 66 75 6e 63 33 2e 74 nc2.test func3.t
2c70: 65 73 74 20 66 75 6e 63 2e 74 65 73 74 20 0a 20 est func.test .
2c80: 20 69 6e 33 2e 74 65 73 74 20 69 6e 34 2e 74 65 in3.test in4.te
2c90: 73 74 20 69 6e 35 2e 74 65 73 74 20 69 6e 64 65 st in5.test inde
2ca0: 78 32 2e 74 65 73 74 20 69 6e 64 65 78 33 2e 74 x2.test index3.t
2cb0: 65 73 74 0a 20 20 69 6e 64 65 78 34 2e 74 65 73 est. index4.tes
2cc0: 74 20 69 6e 64 65 78 35 2e 74 65 73 74 20 69 6e t index5.test in
2cd0: 64 65 78 65 64 62 79 2e 74 65 73 74 20 69 6e 64 dexedby.test ind
2ce0: 65 78 2e 74 65 73 74 0a 20 20 69 6e 73 65 72 74 ex.test. insert
2cf0: 32 2e 74 65 73 74 20 69 6e 73 65 72 74 33 2e 74 2.test insert3.t
2d00: 65 73 74 20 69 6e 73 65 72 74 34 2e 74 65 73 74 est insert4.test
2d10: 20 69 6e 73 65 72 74 35 2e 74 65 73 74 20 69 6e insert5.test in
2d20: 73 65 72 74 2e 74 65 73 74 0a 20 20 69 6e 73 74 sert.test. inst
2d30: 72 2e 74 65 73 74 20 69 6e 2e 74 65 73 74 20 69 r.test in.test i
2d40: 6e 74 70 6b 65 79 2e 74 65 73 74 20 6a 6f 69 6e ntpkey.test join
2d50: 32 2e 74 65 73 74 20 6a 6f 69 6e 33 2e 74 65 73 2.test join3.tes
2d60: 74 20 6a 6f 69 6e 34 2e 74 65 73 74 0a 20 20 6a t join4.test. j
2d70: 6f 69 6e 35 2e 74 65 73 74 20 6a 6f 69 6e 36 2e oin5.test join6.
2d80: 74 65 73 74 20 6a 6f 69 6e 2e 74 65 73 74 20 6c test join.test l
2d90: 69 6b 65 32 2e 74 65 73 74 20 6c 69 6b 65 2e 74 ike2.test like.t
2da0: 65 73 74 20 6c 69 6d 69 74 2e 74 65 73 74 0a 20 est limit.test.
2db0: 20 6d 69 6e 6d 61 78 32 2e 74 65 73 74 20 6d 69 minmax2.test mi
2dc0: 6e 6d 61 78 33 2e 74 65 73 74 20 6d 69 6e 6d 61 nmax3.test minma
2dd0: 78 34 2e 74 65 73 74 20 6d 69 6e 6d 61 78 2e 74 x4.test minmax.t
2de0: 65 73 74 20 6d 69 73 63 31 2e 74 65 73 74 20 6d est misc1.test m
2df0: 69 73 63 32 2e 74 65 73 74 0a 20 20 6d 69 73 63 isc2.test. misc
2e00: 33 2e 74 65 73 74 20 6d 69 73 63 34 2e 74 65 73 3.test misc4.tes
2e10: 74 20 6d 69 73 63 35 2e 74 65 73 74 20 6d 69 73 t misc5.test mis
2e20: 63 36 2e 74 65 73 74 20 6d 69 73 63 37 2e 74 65 c6.test misc7.te
2e30: 73 74 20 6f 72 64 65 72 62 79 31 2e 74 65 73 74 st orderby1.test
2e40: 0a 20 20 6f 72 64 65 72 62 79 32 2e 74 65 73 74 . orderby2.test
2e50: 20 6f 72 64 65 72 62 79 33 2e 74 65 73 74 20 6f orderby3.test o
2e60: 72 64 65 72 62 79 34 2e 74 65 73 74 20 72 61 6e rderby4.test ran
2e70: 64 65 78 70 72 31 2e 74 65 73 74 20 72 65 67 65 dexpr1.test rege
2e80: 78 70 31 2e 74 65 73 74 0a 20 20 72 65 69 6e 64 xp1.test. reind
2e90: 65 78 2e 74 65 73 74 20 72 6f 77 68 61 73 68 2e ex.test rowhash.
2ea0: 74 65 73 74 20 72 6f 77 69 64 2e 74 65 73 74 20 test rowid.test
2eb0: 73 63 68 65 6d 61 32 2e 74 65 73 74 20 73 63 68 schema2.test sch
2ec0: 65 6d 61 33 2e 74 65 73 74 0a 20 20 73 63 68 65 ema3.test. sche
2ed0: 6d 61 34 2e 74 65 73 74 20 73 63 68 65 6d 61 35 ma4.test schema5
2ee0: 2e 74 65 73 74 20 73 63 68 65 6d 61 2e 74 65 73 .test schema.tes
2ef0: 74 0a 20 20 73 65 6c 65 63 74 31 2e 74 65 73 74 t. select1.test
2f00: 20 73 65 6c 65 63 74 32 2e 74 65 73 74 20 73 65 select2.test se
2f10: 6c 65 63 74 33 2e 74 65 73 74 20 73 65 6c 65 63 lect3.test selec
2f20: 74 34 2e 74 65 73 74 20 73 65 6c 65 63 74 35 2e t4.test select5.
2f30: 74 65 73 74 0a 20 20 73 65 6c 65 63 74 36 2e 74 test. select6.t
2f40: 65 73 74 20 73 65 6c 65 63 74 37 2e 74 65 73 74 est select7.test
2f50: 20 73 65 6c 65 63 74 38 2e 74 65 73 74 20 73 65 select8.test se
2f60: 6c 65 63 74 39 2e 74 65 73 74 20 73 65 6c 65 63 lect9.test selec
2f70: 74 41 2e 74 65 73 74 0a 20 20 73 65 6c 65 63 74 tA.test. select
2f80: 42 2e 74 65 73 74 20 73 65 6c 65 63 74 43 2e 74 B.test selectC.t
2f90: 65 73 74 20 73 65 6c 65 63 74 44 2e 74 65 73 74 est selectD.test
2fa0: 20 73 65 6c 65 63 74 45 2e 74 65 73 74 20 73 69 selectE.test si
2fb0: 64 65 64 65 6c 65 74 65 2e 74 65 73 74 0a 20 20 dedelete.test.
2fc0: 73 6f 72 74 2e 74 65 73 74 20 73 70 65 6c 6c 66 sort.test spellf
2fd0: 69 78 2e 74 65 73 74 20 73 75 62 71 75 65 72 79 ix.test subquery
2fe0: 32 2e 74 65 73 74 20 73 75 62 71 75 65 72 79 2e 2.test subquery.
2ff0: 74 65 73 74 20 73 75 62 73 65 6c 65 63 74 2e 74 test subselect.t
3000: 65 73 74 0a 20 20 73 75 62 73 74 72 2e 74 65 73 est. substr.tes
3010: 74 20 74 6b 74 2d 30 32 61 38 65 38 31 64 34 34 t tkt-02a8e81d44
3020: 2e 74 65 73 74 20 74 6b 74 31 34 33 35 2e 74 65 .test tkt1435.te
3030: 73 74 20 74 6b 74 31 34 34 33 2e 74 65 73 74 20 st tkt1443.test
3040: 74 6b 74 31 34 34 34 2e 74 65 73 74 0a 20 20 74 tkt1444.test. t
3050: 6b 74 31 34 34 39 2e 74 65 73 74 20 74 6b 74 31 kt1449.test tkt1
3060: 34 37 33 2e 74 65 73 74 20 74 6b 74 31 35 30 31 473.test tkt1501
3070: 2e 74 65 73 74 20 74 6b 74 31 35 31 32 2e 74 65 .test tkt1512.te
3080: 73 74 20 74 6b 74 31 35 31 34 2e 74 65 73 74 0a st tkt1514.test.
3090: 20 20 74 6b 74 31 35 33 36 2e 74 65 73 74 20 74 tkt1536.test t
30a0: 6b 74 31 35 33 37 2e 74 65 73 74 20 74 6b 74 31 kt1537.test tkt1
30b0: 35 36 37 2e 74 65 73 74 20 74 6b 74 31 36 34 34 567.test tkt1644
30c0: 2e 74 65 73 74 20 74 6b 74 31 36 36 37 2e 74 65 .test tkt1667.te
30d0: 73 74 0a 20 20 74 6b 74 31 38 37 33 2e 74 65 73 st. tkt1873.tes
30e0: 74 20 74 6b 74 32 31 34 31 2e 74 65 73 74 20 74 t tkt2141.test t
30f0: 6b 74 32 31 39 32 2e 74 65 73 74 20 74 6b 74 32 kt2192.test tkt2
3100: 32 31 33 2e 74 65 73 74 20 74 6b 74 32 32 35 31 213.test tkt2251
3110: 2e 74 65 73 74 0a 20 20 74 6b 74 32 32 38 35 2e .test. tkt2285.
3120: 74 65 73 74 20 74 6b 74 32 33 33 32 2e 74 65 73 test tkt2332.tes
3130: 74 20 74 6b 74 32 33 33 39 2e 74 65 73 74 20 74 t tkt2339.test t
3140: 6b 74 32 33 39 31 2e 74 65 73 74 20 74 6b 74 32 kt2391.test tkt2
3150: 34 30 39 2e 74 65 73 74 0a 20 20 74 6b 74 32 34 409.test. tkt24
3160: 35 30 2e 74 65 73 74 20 74 6b 74 32 35 36 35 2e 50.test tkt2565.
3170: 74 65 73 74 20 74 6b 74 32 36 34 30 2e 74 65 73 test tkt2640.tes
3180: 74 20 74 6b 74 32 36 34 33 2e 74 65 73 74 20 74 t tkt2643.test t
3190: 6b 74 32 36 38 36 2e 74 65 73 74 0a 20 20 74 6b kt2686.test. tk
31a0: 74 2d 32 36 66 66 30 63 32 64 31 65 2e 74 65 73 t-26ff0c2d1e.tes
31b0: 74 20 74 6b 74 32 37 36 37 2e 74 65 73 74 20 74 t tkt2767.test t
31c0: 6b 74 32 38 31 37 2e 74 65 73 74 20 74 6b 74 32 kt2817.test tkt2
31d0: 38 32 30 2e 74 65 73 74 20 74 6b 74 32 38 32 32 820.test tkt2822
31e0: 2e 74 65 73 74 0a 20 20 74 6b 74 32 38 33 32 2e .test. tkt2832.
31f0: 74 65 73 74 20 74 6b 74 32 38 35 34 2e 74 65 73 test tkt2854.tes
3200: 74 20 74 6b 74 32 39 32 30 2e 74 65 73 74 20 74 t tkt2920.test t
3210: 6b 74 32 39 32 37 2e 74 65 73 74 20 74 6b 74 32 kt2927.test tkt2
3220: 39 34 32 2e 74 65 73 74 0a 20 20 74 6b 74 2d 32 942.test. tkt-2
3230: 61 35 36 32 39 32 30 32 66 2e 74 65 73 74 20 74 a5629202f.test t
3240: 6b 74 2d 32 64 31 61 35 63 36 37 64 2e 74 65 73 kt-2d1a5c67d.tes
3250: 74 20 74 6b 74 2d 32 65 61 32 34 32 35 64 33 34 t tkt-2ea2425d34
3260: 2e 74 65 73 74 20 74 6b 74 33 30 38 30 2e 74 65 .test tkt3080.te
3270: 73 74 0a 20 20 74 6b 74 33 30 39 33 2e 74 65 73 st. tkt3093.tes
3280: 74 20 74 6b 74 33 31 32 31 2e 74 65 73 74 20 74 t tkt3121.test t
3290: 6b 74 2d 33 31 33 33 38 64 63 61 37 65 2e 74 65 kt-31338dca7e.te
32a0: 73 74 20 74 6b 74 2d 33 31 33 37 32 33 63 33 35 st tkt-313723c35
32b0: 36 2e 74 65 73 74 0a 20 20 74 6b 74 33 32 30 31 6.test. tkt3201
32c0: 2e 74 65 73 74 20 74 6b 74 33 32 39 32 2e 74 65 .test tkt3292.te
32d0: 73 74 20 74 6b 74 33 32 39 38 2e 74 65 73 74 20 st tkt3298.test
32e0: 74 6b 74 33 33 33 34 2e 74 65 73 74 20 74 6b 74 tkt3334.test tkt
32f0: 33 33 34 36 2e 74 65 73 74 0a 20 20 74 6b 74 33 3346.test. tkt3
3300: 33 35 37 2e 74 65 73 74 20 74 6b 74 33 34 31 39 357.test tkt3419
3310: 2e 74 65 73 74 20 74 6b 74 33 34 32 34 2e 74 65 .test tkt3424.te
3320: 73 74 20 74 6b 74 33 34 34 32 2e 74 65 73 74 20 st tkt3442.test
3330: 74 6b 74 33 34 35 37 2e 74 65 73 74 0a 20 20 74 tkt3457.test. t
3340: 6b 74 33 34 36 31 2e 74 65 73 74 20 74 6b 74 33 kt3461.test tkt3
3350: 34 39 33 2e 74 65 73 74 20 74 6b 74 33 35 30 38 493.test tkt3508
3360: 2e 74 65 73 74 20 74 6b 74 33 35 32 32 2e 74 65 .test tkt3522.te
3370: 73 74 20 74 6b 74 33 35 32 37 2e 74 65 73 74 0a st tkt3527.test.
3380: 20 20 74 6b 74 33 35 34 31 2e 74 65 73 74 20 74 tkt3541.test t
3390: 6b 74 33 35 35 34 2e 74 65 73 74 20 74 6b 74 33 kt3554.test tkt3
33a0: 35 38 31 2e 74 65 73 74 20 74 6b 74 33 35 78 78 581.test tkt35xx
33b0: 2e 74 65 73 74 20 74 6b 74 33 36 33 30 2e 74 65 .test tkt3630.te
33c0: 73 74 0a 20 20 74 6b 74 33 37 31 38 2e 74 65 73 st. tkt3718.tes
33d0: 74 20 74 6b 74 33 37 33 31 2e 74 65 73 74 20 74 t tkt3731.test t
33e0: 6b 74 33 37 35 37 2e 74 65 73 74 20 74 6b 74 33 kt3757.test tkt3
33f0: 37 36 31 2e 74 65 73 74 20 74 6b 74 33 37 36 32 761.test tkt3762
3400: 2e 74 65 73 74 0a 20 20 74 6b 74 33 37 37 33 2e .test. tkt3773.
3410: 74 65 73 74 20 74 6b 74 33 37 39 31 2e 74 65 73 test tkt3791.tes
3420: 74 20 74 6b 74 33 37 39 33 2e 74 65 73 74 20 74 t tkt3793.test t
3430: 6b 74 33 38 31 30 2e 74 65 73 74 20 74 6b 74 33 kt3810.test tkt3
3440: 38 32 34 2e 74 65 73 74 0a 20 20 74 6b 74 33 38 824.test. tkt38
3450: 33 32 2e 74 65 73 74 20 74 6b 74 33 38 33 38 2e 32.test tkt3838.
3460: 74 65 73 74 20 74 6b 74 33 38 34 31 2e 74 65 73 test tkt3841.tes
3470: 74 20 74 6b 74 2d 33 38 35 61 35 62 35 36 62 39 t tkt-385a5b56b9
3480: 2e 74 65 73 74 20 74 6b 74 33 38 37 31 2e 74 65 .test tkt3871.te
3490: 73 74 0a 20 20 74 6b 74 33 38 37 39 2e 74 65 73 st. tkt3879.tes
34a0: 74 20 74 6b 74 2d 33 38 63 62 35 64 66 33 37 35 t tkt-38cb5df375
34b0: 2e 74 65 73 74 20 74 6b 74 33 39 31 31 2e 74 65 .test tkt3911.te
34c0: 73 74 20 74 6b 74 33 39 31 38 2e 74 65 73 74 20 st tkt3918.test
34d0: 74 6b 74 33 39 32 32 2e 74 65 73 74 0a 20 20 74 tkt3922.test. t
34e0: 6b 74 33 39 32 39 2e 74 65 73 74 20 74 6b 74 33 kt3929.test tkt3
34f0: 39 33 35 2e 74 65 73 74 20 74 6b 74 33 39 39 32 935.test tkt3992
3500: 2e 74 65 73 74 20 74 6b 74 33 39 39 37 2e 74 65 .test tkt3997.te
3510: 73 74 20 74 6b 74 2d 33 39 39 38 36 38 33 61 31 st tkt-3998683a1
3520: 36 2e 74 65 73 74 0a 20 20 74 6b 74 2d 33 61 37 6.test. tkt-3a7
3530: 37 63 39 37 31 34 65 2e 74 65 73 74 20 74 6b 74 7c9714e.test tkt
3540: 2d 33 66 65 38 39 37 33 35 32 65 2e 74 65 73 74 -3fe897352e.test
3550: 20 74 6b 74 34 30 31 38 2e 74 65 73 74 20 74 6b tkt4018.test tk
3560: 74 2d 34 61 30 33 65 64 63 34 63 38 2e 74 65 73 t-4a03edc4c8.tes
3570: 74 0a 20 20 74 6b 74 2d 34 64 64 39 35 66 36 39 t. tkt-4dd95f69
3580: 34 33 2e 74 65 73 74 20 74 6b 74 2d 35 34 38 34 43.test tkt-5484
3590: 34 65 65 61 33 66 2e 74 65 73 74 20 74 6b 74 2d 4eea3f.test tkt-
35a0: 35 64 38 36 33 66 38 37 36 65 2e 74 65 73 74 0a 5d863f876e.test.
35b0: 20 20 74 6b 74 2d 35 65 31 30 34 32 30 65 38 64 tkt-5e10420e8d
35c0: 2e 74 65 73 74 20 74 6b 74 2d 35 65 65 32 33 37 .test tkt-5ee237
35d0: 33 31 66 2e 74 65 73 74 20 74 6b 74 2d 36 62 66 31f.test tkt-6bf
35e0: 62 39 38 64 66 63 30 2e 74 65 73 74 0a 20 20 74 b98dfc0.test. t
35f0: 6b 74 2d 37 35 32 65 31 36 34 36 66 63 2e 74 65 kt-752e1646fc.te
3600: 73 74 20 74 6b 74 2d 37 38 65 30 34 65 35 32 65 st tkt-78e04e52e
3610: 61 2e 74 65 73 74 20 74 6b 74 2d 37 61 33 31 37 a.test tkt-7a317
3620: 30 35 61 37 65 36 2e 74 65 73 74 0a 20 20 74 6b 05a7e6.test. tk
3630: 74 2d 37 62 62 66 62 37 64 34 34 32 2e 74 65 73 t-7bbfb7d442.tes
3640: 74 20 74 6b 74 2d 38 30 62 61 32 30 31 30 37 39 t tkt-80ba201079
3650: 2e 74 65 73 74 20 74 6b 74 2d 38 30 65 30 33 31 .test tkt-80e031
3660: 61 30 30 66 2e 74 65 73 74 0a 20 20 74 6b 74 2d a00f.test. tkt-
3670: 38 34 35 34 61 32 30 37 62 39 2e 74 65 73 74 20 8454a207b9.test
3680: 74 6b 74 2d 39 31 65 32 65 38 62 61 36 66 2e 74 tkt-91e2e8ba6f.t
3690: 65 73 74 20 74 6b 74 2d 39 34 63 30 34 65 61 61 est tkt-94c04eaa
36a0: 64 62 2e 74 65 73 74 0a 20 20 74 6b 74 2d 39 64 db.test. tkt-9d
36b0: 36 38 63 38 38 33 2e 74 65 73 74 20 74 6b 74 2d 68c883.test tkt-
36c0: 61 37 62 37 38 30 33 65 2e 74 65 73 74 20 74 6b a7b7803e.test tk
36d0: 74 2d 62 31 64 33 61 32 65 35 33 31 2e 74 65 73 t-b1d3a2e531.tes
36e0: 74 0a 20 20 74 6b 74 2d 62 33 35 31 64 39 35 66 t. tkt-b351d95f
36f0: 39 2e 74 65 73 74 20 74 6b 74 2d 62 37 32 37 38 9.test tkt-b7278
3700: 37 62 31 2e 74 65 73 74 20 74 6b 74 2d 62 64 34 7b1.test tkt-bd4
3710: 38 34 61 30 39 30 63 2e 74 65 73 74 0a 20 20 74 84a090c.test. t
3720: 6b 74 2d 62 64 63 36 62 62 62 62 33 38 2e 74 65 kt-bdc6bbbb38.te
3730: 73 74 20 74 6b 74 2d 63 34 38 64 39 39 64 36 39 st tkt-c48d99d69
3740: 30 2e 74 65 73 74 20 74 6b 74 2d 63 62 64 30 35 0.test tkt-cbd05
3750: 34 66 61 36 62 2e 74 65 73 74 0a 20 20 74 6b 74 4fa6b.test. tkt
3760: 2d 64 31 31 66 30 39 64 33 36 65 2e 74 65 73 74 -d11f09d36e.test
3770: 20 74 6b 74 2d 64 36 33 35 32 33 36 33 37 35 2e tkt-d635236375.
3780: 74 65 73 74 20 74 6b 74 2d 64 38 32 65 33 66 33 test tkt-d82e3f3
3790: 37 32 31 2e 74 65 73 74 0a 20 20 74 6b 74 2d 66 721.test. tkt-f
37a0: 33 65 35 61 62 65 64 35 35 2e 74 65 73 74 20 74 3e5abed55.test t
37b0: 6b 74 2d 66 37 37 37 32 35 31 64 63 37 61 2e 74 kt-f777251dc7a.t
37c0: 65 73 74 20 74 6b 74 2d 66 37 62 34 65 64 65 63 est tkt-f7b4edec
37d0: 2e 74 65 73 74 0a 20 20 74 6b 74 2d 66 39 37 33 .test. tkt-f973
37e0: 63 37 61 63 33 31 2e 74 65 73 74 20 74 6b 74 2d c7ac31.test tkt-
37f0: 66 61 37 62 66 35 65 63 2e 74 65 73 74 20 74 6b fa7bf5ec.test tk
3800: 74 2d 66 63 36 32 61 66 34 35 32 33 2e 74 65 73 t-fc62af4523.tes
3810: 74 0a 20 20 74 6b 74 2d 66 63 37 62 64 36 33 35 t. tkt-fc7bd635
3820: 38 66 2e 74 65 73 74 20 74 72 69 67 67 65 72 31 8f.test trigger1
3830: 2e 74 65 73 74 20 74 72 69 67 67 65 72 32 2e 74 .test trigger2.t
3840: 65 73 74 20 74 72 69 67 67 65 72 33 2e 74 65 73 est trigger3.tes
3850: 74 0a 20 20 74 72 69 67 67 65 72 34 2e 74 65 73 t. trigger4.tes
3860: 74 20 74 72 69 67 67 65 72 35 2e 74 65 73 74 20 t trigger5.test
3870: 74 72 69 67 67 65 72 36 2e 74 65 73 74 20 74 72 trigger6.test tr
3880: 69 67 67 65 72 37 2e 74 65 73 74 20 74 72 69 67 igger7.test trig
3890: 67 65 72 38 2e 74 65 73 74 0a 20 20 74 72 69 67 ger8.test. trig
38a0: 67 65 72 39 2e 74 65 73 74 20 74 72 69 67 67 65 ger9.test trigge
38b0: 72 41 2e 74 65 73 74 20 74 72 69 67 67 65 72 42 rA.test triggerB
38c0: 2e 74 65 73 74 20 74 72 69 67 67 65 72 43 2e 74 .test triggerC.t
38d0: 65 73 74 20 74 72 69 67 67 65 72 44 2e 74 65 73 est triggerD.tes
38e0: 74 0a 20 20 74 79 70 65 73 32 2e 74 65 73 74 20 t. types2.test
38f0: 74 79 70 65 73 33 2e 74 65 73 74 20 74 79 70 65 types3.test type
3900: 73 2e 74 65 73 74 20 75 6e 69 71 75 65 2e 74 65 s.test unique.te
3910: 73 74 20 75 6e 6f 72 64 65 72 65 64 2e 74 65 73 st unordered.tes
3920: 74 0a 20 20 75 70 64 61 74 65 2e 74 65 73 74 20 t. update.test
3930: 76 69 65 77 2e 74 65 73 74 20 76 74 61 62 31 2e view.test vtab1.
3940: 74 65 73 74 20 76 74 61 62 32 2e 74 65 73 74 20 test vtab2.test
3950: 76 74 61 62 33 2e 74 65 73 74 20 76 74 61 62 34 vtab3.test vtab4
3960: 2e 74 65 73 74 0a 20 20 76 74 61 62 35 2e 74 65 .test. vtab5.te
3970: 73 74 20 76 74 61 62 36 2e 74 65 73 74 20 76 74 st vtab6.test vt
3980: 61 62 37 2e 74 65 73 74 20 76 74 61 62 38 2e 74 ab7.test vtab8.t
3990: 65 73 74 20 76 74 61 62 39 2e 74 65 73 74 20 76 est vtab9.test v
39a0: 74 61 62 5f 61 6c 74 65 72 2e 74 65 73 74 0a 20 tab_alter.test.
39b0: 20 76 74 61 62 41 2e 74 65 73 74 20 76 74 61 62 vtabA.test vtab
39c0: 42 2e 74 65 73 74 20 76 74 61 62 43 2e 74 65 73 B.test vtabC.tes
39d0: 74 20 76 74 61 62 44 2e 74 65 73 74 20 76 74 61 t vtabD.test vta
39e0: 62 45 2e 74 65 73 74 0a 20 20 76 74 61 62 46 2e bE.test. vtabF.
39f0: 74 65 73 74 20 77 68 65 72 65 32 2e 74 65 73 74 test where2.test
3a00: 20 77 68 65 72 65 33 2e 74 65 73 74 20 77 68 65 where3.test whe
3a10: 72 65 34 2e 74 65 73 74 20 77 68 65 72 65 35 2e re4.test where5.
3a20: 74 65 73 74 20 77 68 65 72 65 36 2e 74 65 73 74 test where6.test
3a30: 0a 20 20 77 68 65 72 65 37 2e 74 65 73 74 20 77 . where7.test w
3a40: 68 65 72 65 38 6d 2e 74 65 73 74 20 77 68 65 72 here8m.test wher
3a50: 65 38 2e 74 65 73 74 20 77 68 65 72 65 39 2e 74 e8.test where9.t
3a60: 65 73 74 20 77 68 65 72 65 41 2e 74 65 73 74 20 est whereA.test
3a70: 77 68 65 72 65 42 2e 74 65 73 74 0a 20 20 77 68 whereB.test. wh
3a80: 65 72 65 43 2e 74 65 73 74 20 77 68 65 72 65 44 ereC.test whereD
3a90: 2e 74 65 73 74 20 77 68 65 72 65 45 2e 74 65 73 .test whereE.tes
3aa0: 74 20 77 68 65 72 65 46 2e 74 65 73 74 20 77 68 t whereF.test wh
3ab0: 65 72 65 6c 69 6d 69 74 2e 74 65 73 74 0a 20 20 erelimit.test.
3ac0: 77 68 65 72 65 2e 74 65 73 74 0a 7d 0a 0a 74 65 where.test.}..te
3ad0: 73 74 5f 73 75 69 74 65 20 22 76 66 73 6c 6f 67 st_suite "vfslog
3ae0: 22 20 2d 70 72 65 66 69 78 20 22 22 20 2d 64 65 " -prefix "" -de
3af0: 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 22 56 scription {. "V
3b00: 66 73 6c 6f 67 22 20 71 75 69 63 6b 20 74 65 73 fslog" quick tes
3b10: 74 20 73 75 69 74 65 2e 20 4c 69 6b 65 20 22 76 t suite. Like "v
3b20: 65 72 79 71 75 69 63 6b 22 20 65 78 63 65 70 74 eryquick" except
3b30: 20 64 6f 65 73 20 6e 6f 74 20 6f 6d 69 74 73 0a does not omits.
3b40: 20 20 61 20 66 65 77 20 74 65 73 74 73 20 74 68 a few tests th
3b50: 61 74 20 64 6f 20 6e 6f 74 20 77 6f 72 6b 20 77 at do not work w
3b60: 69 74 68 20 61 20 76 65 72 73 69 6f 6e 20 31 20 ith a version 1
3b70: 56 46 53 2e 20 41 6e 64 20 74 68 65 20 71 75 6f VFS. And the quo
3b80: 74 61 2a 20 74 65 73 74 73 2c 0a 20 20 77 68 69 ta* tests,. whi
3b90: 63 68 20 64 6f 20 6e 6f 74 20 77 6f 72 6b 20 77 ch do not work w
3ba0: 69 74 68 20 61 20 56 46 53 20 74 68 61 74 20 75 ith a VFS that u
3bb0: 73 65 73 20 74 68 65 20 70 56 66 73 20 61 72 67 ses the pVfs arg
3bc0: 75 6d 65 6e 74 20 70 61 73 73 65 64 20 74 6f 0a ument passed to.
3bd0: 20 20 73 71 6c 69 74 65 33 5f 76 66 73 20 6d 65 sqlite3_vfs me
3be0: 74 68 6f 64 73 2e 0a 7d 20 2d 66 69 6c 65 73 20 thods..} -files
3bf0: 5b 0a 20 20 74 65 73 74 5f 73 65 74 20 24 61 6c [. test_set $al
3c00: 6c 71 75 69 63 6b 74 65 73 74 73 20 2d 65 78 63 lquicktests -exc
3c10: 6c 75 64 65 20 2a 6d 61 6c 6c 6f 63 2a 20 2a 69 lude *malloc* *i
3c20: 6f 65 72 72 2a 20 2a 66 61 75 6c 74 2a 20 6f 73 oerr* *fault* os
3c30: 65 72 72 6f 72 2e 74 65 73 74 20 5c 0a 20 20 70 error.test \. p
3c40: 61 67 65 72 31 2e 74 65 73 74 20 73 79 73 63 61 ager1.test sysca
3c50: 6c 6c 2e 74 65 73 74 20 73 79 73 66 61 75 6c 74 ll.test sysfault
3c60: 2e 74 65 73 74 20 74 6b 74 33 34 35 37 2e 74 65 .test tkt3457.te
3c70: 73 74 20 71 75 6f 74 61 2a 20 73 75 70 65 72 6c st quota* superl
3c80: 6f 63 6b 2a 20 5c 0a 20 20 77 61 6c 2a 20 6d 6d ock* \. wal* mm
3c90: 61 70 2a 0a 5d 0a 0a 74 65 73 74 5f 73 75 69 74 ap*.]..test_suit
3ca0: 65 20 22 61 74 6f 6d 69 63 2d 62 61 74 63 68 2d e "atomic-batch-
3cb0: 77 72 69 74 65 22 20 2d 70 72 65 66 69 78 20 22 write" -prefix "
3cc0: 22 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 7b " -description {
3cd0: 0a 20 20 4c 69 6b 65 20 76 65 72 79 71 75 69 63 . Like veryquic
3ce0: 6b 2e 74 65 73 74 2c 20 62 75 74 20 6d 75 73 74 k.test, but must
3cf0: 20 62 65 20 72 75 6e 20 6f 6e 20 61 20 66 69 6c be run on a fil
3d00: 65 2d 73 79 73 74 65 6d 20 74 68 61 74 20 73 75 e-system that su
3d10: 70 70 6f 72 74 73 0a 20 20 61 74 6f 6d 69 63 2d pports. atomic-
3d20: 62 61 74 63 68 2d 77 72 69 74 65 73 2e 20 54 65 batch-writes. Te
3d30: 73 74 73 20 74 68 61 74 20 64 65 70 65 6e 64 20 sts that depend
3d40: 6f 6e 20 74 68 65 20 6a 6f 75 72 6e 61 6c 20 66 on the journal f
3d50: 69 6c 65 20 62 65 69 6e 67 20 70 72 65 73 65 6e ile being presen
3d60: 74 0a 20 20 61 72 65 20 6f 6d 69 74 74 65 64 2e t. are omitted.
3d70: 0a 7d 20 2d 66 69 6c 65 73 20 5b 0a 20 20 74 65 .} -files [. te
3d80: 73 74 5f 73 65 74 20 24 61 6c 6c 71 75 69 63 6b st_set $allquick
3d90: 74 65 73 74 73 20 2d 65 78 63 6c 75 64 65 20 2a tests -exclude *
3da0: 6d 61 6c 6c 6f 63 2a 20 2a 69 6f 65 72 72 2a 20 malloc* *ioerr*
3db0: 2a 66 61 75 6c 74 2a 20 2a 62 69 67 66 69 6c 65 *fault* *bigfile
3dc0: 2a 20 2a 5f 65 72 72 2a 20 5c 0a 20 20 20 20 20 * *_err* \.
3dd0: 20 2a 66 74 73 35 63 6f 72 72 75 70 74 2a 20 2a *fts5corrupt* *
3de0: 66 74 73 35 62 69 67 2a 20 2a 66 74 73 35 61 6a fts5big* *fts5aj
3df0: 2a 20 20 5c 0a 20 20 20 20 20 20 63 72 61 73 68 * \. crash
3e00: 38 2e 74 65 73 74 20 64 65 6c 65 74 65 5f 64 62 8.test delete_db
3e10: 2e 74 65 73 74 20 20 20 20 20 20 20 20 5c 0a 20 .test \.
3e20: 20 20 20 20 20 65 78 63 6c 75 73 69 76 65 2e 74 exclusive.t
3e30: 65 73 74 20 6a 6f 75 72 6e 61 6c 33 2e 74 65 73 est journal3.tes
3e40: 74 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 6a t \. j
3e50: 6f 75 72 6e 61 6c 31 2e 74 65 73 74 20 20 20 20 ournal1.test
3e60: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
3e70: 20 5c 0a 20 20 20 20 20 20 6a 72 6e 6c 6d 6f 64 \. jrnlmod
3e80: 65 2e 74 65 73 74 20 6a 72 6e 6c 6d 6f 64 65 32 e.test jrnlmode2
3e90: 2e 74 65 73 74 20 20 20 20 20 20 5c 0a 20 20 20 .test \.
3ea0: 20 20 20 6c 6f 63 6b 34 2e 74 65 73 74 20 70 61 lock4.test pa
3eb0: 67 65 72 31 2e 74 65 73 74 20 20 20 20 20 20 20 ger1.test
3ec0: 20 20 20 20 20 5c 0a 20 20 20 20 20 20 70 61 67 \. pag
3ed0: 65 72 33 2e 74 65 73 74 20 73 68 61 72 65 64 41 er3.test sharedA
3ee0: 2e 74 65 73 74 20 20 20 20 20 20 20 20 20 20 5c .test \
3ef0: 0a 20 20 20 20 20 20 73 79 6d 6c 69 6e 6b 2e 74 . symlink.t
3f00: 65 73 74 20 73 74 6d 74 2e 74 65 73 74 20 20 20 est stmt.test
3f10: 20 20 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 \.
3f20: 20 73 79 6e 63 2e 74 65 73 74 20 73 79 6e 63 32 sync.test sync2
3f30: 2e 74 65 73 74 20 20 20 20 20 20 20 20 20 20 20 .test
3f40: 20 20 20 5c 0a 20 20 20 20 20 20 74 65 6d 70 64 \. tempd
3f50: 62 2e 74 65 73 74 20 74 6b 74 33 34 35 37 2e 74 b.test tkt3457.t
3f60: 65 73 74 20 20 20 20 20 20 20 20 20 20 5c 0a 20 est \.
3f70: 20 20 20 20 20 76 61 63 75 75 6d 35 2e 74 65 73 vacuum5.tes
3f80: 74 20 77 61 6c 32 2e 74 65 73 74 20 20 20 20 20 t wal2.test
3f90: 20 20 20 20 20 20 20 5c 0a 20 20 20 20 20 20 77 \. w
3fa0: 61 6c 6d 6f 64 65 2e 74 65 73 74 20 7a 65 72 6f almode.test zero
3fb0: 64 61 6d 61 67 65 2e 74 65 73 74 0a 5d 20 2d 69 damage.test.] -i
3fc0: 6e 69 74 69 61 6c 69 7a 65 20 7b 0a 20 20 69 66 nitialize {. if
3fd0: 20 7b 5b 61 74 6f 6d 69 63 5f 62 61 74 63 68 5f {[atomic_batch_
3fe0: 77 72 69 74 65 20 74 65 73 74 2e 64 62 5d 3d 3d write test.db]==
3ff0: 30 7d 20 7b 0a 20 20 20 20 65 72 72 6f 72 20 22 0} {. error "
4000: 46 69 6c 65 20 73 79 73 74 65 6d 20 64 6f 65 73 File system does
4010: 20 4e 4f 54 20 73 75 70 70 6f 72 74 20 61 74 6f NOT support ato
4020: 6d 69 63 2d 62 61 74 63 68 2d 77 72 69 74 65 22 mic-batch-write"
4030: 0a 20 20 7d 0a 7d 0a 0a 6c 61 70 70 65 6e 64 20 . }.}..lappend
4040: 3a 3a 74 65 73 74 73 75 69 74 65 6c 69 73 74 20 ::testsuitelist
4050: 78 78 78 0a 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d xxx.#-----------
4060: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
4070: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
4080: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
4090: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 --------------.#
40a0: 20 44 65 66 69 6e 65 20 74 68 65 20 63 6f 76 65 Define the cove
40b0: 72 61 67 65 20 72 65 6c 61 74 65 64 20 74 65 73 rage related tes
40c0: 74 20 73 75 69 74 65 73 3a 0a 23 0a 23 20 20 20 t suites:.#.#
40d0: 63 6f 76 65 72 61 67 65 2d 77 61 6c 0a 23 0a 74 coverage-wal.#.t
40e0: 65 73 74 5f 73 75 69 74 65 20 22 63 6f 76 65 72 est_suite "cover
40f0: 61 67 65 2d 77 61 6c 22 20 2d 64 65 73 63 72 69 age-wal" -descri
4100: 70 74 69 6f 6e 20 7b 0a 20 20 43 6f 76 65 72 61 ption {. Covera
4110: 67 65 20 74 65 73 74 73 20 66 6f 72 20 66 69 6c ge tests for fil
4120: 65 20 77 61 6c 2e 63 2e 0a 7d 20 2d 66 69 6c 65 e wal.c..} -file
4130: 73 20 7b 0a 20 20 77 61 6c 2e 74 65 73 74 20 77 s {. wal.test w
4140: 61 6c 32 2e 74 65 73 74 20 77 61 6c 33 2e 74 65 al2.test wal3.te
4150: 73 74 20 77 61 6c 34 2e 74 65 73 74 20 77 61 6c st wal4.test wal
4160: 35 2e 74 65 73 74 0a 20 20 77 61 6c 36 34 6b 2e 5.test. wal64k.
4170: 74 65 73 74 20 77 61 6c 36 2e 74 65 73 74 20 77 test wal6.test w
4180: 61 6c 37 2e 74 65 73 74 20 77 61 6c 38 2e 74 65 al7.test wal8.te
4190: 73 74 20 77 61 6c 39 2e 74 65 73 74 0a 20 20 77 st wal9.test. w
41a0: 61 6c 62 61 6b 2e 74 65 73 74 20 77 61 6c 62 69 albak.test walbi
41b0: 67 2e 74 65 73 74 20 77 61 6c 62 6c 6f 63 6b 2e g.test walblock.
41c0: 74 65 73 74 20 77 61 6c 63 6b 73 75 6d 2e 74 65 test walcksum.te
41d0: 73 74 20 77 61 6c 63 72 61 73 68 32 2e 74 65 73 st walcrash2.tes
41e0: 74 0a 20 20 77 61 6c 63 72 61 73 68 33 2e 74 65 t. walcrash3.te
41f0: 73 74 20 77 61 6c 63 72 61 73 68 34 2e 74 65 73 st walcrash4.tes
4200: 74 20 77 61 6c 63 72 61 73 68 2e 74 65 73 74 20 t walcrash.test
4210: 77 61 6c 66 61 75 6c 74 2e 74 65 73 74 20 77 61 walfault.test wa
4220: 6c 68 6f 6f 6b 2e 74 65 73 74 0a 20 20 77 61 6c lhook.test. wal
4230: 6d 6f 64 65 2e 74 65 73 74 20 77 61 6c 6e 6f 73 mode.test walnos
4240: 68 6d 2e 74 65 73 74 20 77 61 6c 6f 76 65 72 77 hm.test waloverw
4250: 72 69 74 65 2e 74 65 73 74 20 77 61 6c 70 65 72 rite.test walper
4260: 73 69 73 74 2e 74 65 73 74 20 0a 20 20 77 61 6c sist.test . wal
4270: 70 72 6f 74 6f 63 6f 6c 32 2e 74 65 73 74 20 77 protocol2.test w
4280: 61 6c 70 72 6f 74 6f 63 6f 6c 2e 74 65 73 74 20 alprotocol.test
4290: 77 61 6c 72 6f 32 2e 74 65 73 74 20 77 61 6c 72 walro2.test walr
42a0: 6f 66 61 75 6c 74 2e 74 65 73 74 20 0a 20 20 77 ofault.test . w
42b0: 61 6c 72 6f 2e 74 65 73 74 20 77 61 6c 73 68 61 alro.test walsha
42c0: 72 65 64 2e 74 65 73 74 20 77 61 6c 73 6c 6f 77 red.test walslow
42d0: 2e 74 65 73 74 20 77 61 6c 76 66 73 2e 74 65 73 .test walvfs.tes
42e0: 74 0a 20 20 77 61 6c 66 61 75 6c 74 32 2e 74 65 t. walfault2.te
42f0: 73 74 0a 20 20 6e 6f 63 6b 70 74 2e 74 65 73 74 st. nockpt.test
4300: 0a 0a 20 20 73 6e 61 70 73 68 6f 74 32 2e 74 65 .. snapshot2.te
4310: 73 74 20 73 6e 61 70 73 68 6f 74 33 2e 74 65 73 st snapshot3.tes
4320: 74 20 73 6e 61 70 73 68 6f 74 34 2e 74 65 73 74 t snapshot4.test
4330: 0a 20 20 73 6e 61 70 73 68 6f 74 5f 66 61 75 6c . snapshot_faul
4340: 74 2e 74 65 73 74 20 73 6e 61 70 73 68 6f 74 2e t.test snapshot.
4350: 74 65 73 74 20 73 6e 61 70 73 68 6f 74 5f 75 70 test snapshot_up
4360: 2e 74 65 73 74 0a 7d 20 0a 0a 74 65 73 74 5f 73 .test.} ..test_s
4370: 75 69 74 65 20 22 63 6f 76 65 72 61 67 65 2d 70 uite "coverage-p
4380: 61 67 65 72 22 20 2d 64 65 73 63 72 69 70 74 69 ager" -descripti
4390: 6f 6e 20 7b 0a 20 20 43 6f 76 65 72 61 67 65 20 on {. Coverage
43a0: 74 65 73 74 73 20 66 6f 72 20 66 69 6c 65 20 70 tests for file p
43b0: 61 67 65 72 2e 63 2e 0a 7d 20 2d 66 69 6c 65 73 ager.c..} -files
43c0: 20 7b 0a 20 20 70 61 67 65 72 31 2e 74 65 73 74 {. pager1.test
43d0: 20 20 20 20 70 61 67 65 72 32 2e 74 65 73 74 20 pager2.test
43e0: 20 70 61 67 65 72 66 61 75 6c 74 2e 74 65 73 74 pagerfault.test
43f0: 20 20 70 61 67 65 72 66 61 75 6c 74 32 2e 74 65 pagerfault2.te
4400: 73 74 0a 20 20 77 61 6c 66 61 75 6c 74 2e 74 65 st. walfault.te
4410: 73 74 20 20 77 61 6c 62 61 6b 2e 74 65 73 74 20 st walbak.test
4420: 20 6a 6f 75 72 6e 61 6c 32 2e 74 65 73 74 20 20 journal2.test
4430: 20 20 74 6b 74 2d 39 64 36 38 63 38 38 33 2e 74 tkt-9d68c883.t
4440: 65 73 74 0a 7d 20 0a 0a 74 65 73 74 5f 73 75 69 est.} ..test_sui
4450: 74 65 20 22 63 6f 76 65 72 61 67 65 2d 61 6e 61 te "coverage-ana
4460: 6c 79 7a 65 22 20 2d 64 65 73 63 72 69 70 74 69 lyze" -descripti
4470: 6f 6e 20 7b 0a 20 20 43 6f 76 65 72 61 67 65 20 on {. Coverage
4480: 74 65 73 74 73 20 66 6f 72 20 66 69 6c 65 20 61 tests for file a
4490: 6e 61 6c 79 7a 65 2e 63 2e 0a 7d 20 2d 66 69 6c nalyze.c..} -fil
44a0: 65 73 20 7b 0a 20 20 61 6e 61 6c 79 7a 65 33 2e es {. analyze3.
44b0: 74 65 73 74 20 61 6e 61 6c 79 7a 65 34 2e 74 65 test analyze4.te
44c0: 73 74 20 61 6e 61 6c 79 7a 65 35 2e 74 65 73 74 st analyze5.test
44d0: 20 61 6e 61 6c 79 7a 65 36 2e 74 65 73 74 0a 20 analyze6.test.
44e0: 20 61 6e 61 6c 79 7a 65 37 2e 74 65 73 74 20 61 analyze7.test a
44f0: 6e 61 6c 79 7a 65 38 2e 74 65 73 74 20 61 6e 61 nalyze8.test ana
4500: 6c 79 7a 65 39 2e 74 65 73 74 20 61 6e 61 6c 79 lyze9.test analy
4510: 7a 65 41 2e 74 65 73 74 0a 20 20 61 6e 61 6c 79 zeA.test. analy
4520: 7a 65 2e 74 65 73 74 20 61 6e 61 6c 79 7a 65 42 ze.test analyzeB
4530: 2e 74 65 73 74 20 6d 61 6c 6c 6f 63 41 2e 74 65 .test mallocA.te
4540: 73 74 0a 7d 20 0a 0a 74 65 73 74 5f 73 75 69 74 st.} ..test_suit
4550: 65 20 22 63 6f 76 65 72 61 67 65 2d 73 6f 72 74 e "coverage-sort
4560: 65 72 22 20 2d 64 65 73 63 72 69 70 74 69 6f 6e er" -description
4570: 20 7b 0a 20 20 43 6f 76 65 72 61 67 65 20 74 65 {. Coverage te
4580: 73 74 73 20 66 6f 72 20 66 69 6c 65 20 76 64 62 sts for file vdb
4590: 65 73 6f 72 74 2e 63 2e 0a 7d 20 2d 66 69 6c 65 esort.c..} -file
45a0: 73 20 7b 0a 20 20 73 6f 72 74 2e 74 65 73 74 20 s {. sort.test
45b0: 73 6f 72 74 66 61 75 6c 74 2e 74 65 73 74 0a 7d sortfault.test.}
45c0: 20 0a 0a 0a 6c 61 70 70 65 6e 64 20 3a 3a 74 65 ...lappend ::te
45d0: 73 74 73 75 69 74 65 6c 69 73 74 20 78 78 78 0a stsuitelist xxx.
45e0: 23 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d #---------------
45f0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
4600: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
4610: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
4620: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 23 20 44 65 66 ----------.# Def
4630: 69 6e 65 20 74 68 65 20 70 65 72 6d 75 74 61 74 ine the permutat
4640: 69 6f 6e 20 74 65 73 74 20 73 75 69 74 65 73 3a ion test suites:
4650: 0a 23 0a 0a 23 20 52 75 6e 20 73 6f 6d 65 20 74 .#..# Run some t
4660: 65 73 74 73 20 75 73 69 6e 67 20 70 72 65 2d 61 ests using pre-a
4670: 6c 6c 6f 63 61 74 65 64 20 70 61 67 65 20 62 6c llocated page bl
4680: 6f 63 6b 73 2e 0a 23 0a 23 20 6d 6d 61 70 31 2e ocks..#.# mmap1.
4690: 74 65 73 74 20 69 73 20 65 78 63 6c 75 64 65 64 test is excluded
46a0: 20 62 65 63 61 75 73 65 20 61 20 67 6f 6f 64 20 because a good
46b0: 6e 75 6d 62 65 72 20 6f 66 20 69 74 73 20 74 65 number of its te
46c0: 73 74 73 20 64 65 70 65 6e 64 20 6f 6e 20 0a 23 sts depend on .#
46d0: 20 74 68 65 20 70 61 67 65 2d 63 61 63 68 65 20 the page-cache
46e0: 62 65 69 6e 67 20 6c 61 72 67 65 72 20 74 68 61 being larger tha
46f0: 6e 20 74 68 65 20 64 61 74 61 62 61 73 65 2e 20 n the database.
4700: 42 75 74 20 74 68 69 73 20 70 65 72 6d 75 74 61 But this permuta
4710: 74 69 6f 6e 0a 23 20 63 61 75 73 65 73 20 74 68 tion.# causes th
4720: 65 20 65 66 66 65 63 74 69 76 65 20 6c 69 6d 69 e effective limi
4730: 74 20 6f 6e 20 74 68 65 20 70 61 67 65 2d 63 61 t on the page-ca
4740: 63 68 65 20 74 6f 20 62 65 20 6a 75 73 74 20 32 che to be just 2
4750: 34 20 70 61 67 65 73 2e 0a 23 0a 74 65 73 74 5f 4 pages..#.test_
4760: 73 75 69 74 65 20 22 6d 65 6d 73 75 62 73 79 73 suite "memsubsys
4770: 31 22 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 1" -description
4780: 7b 0a 20 20 54 65 73 74 73 20 75 73 69 6e 67 20 {. Tests using
4790: 70 72 65 2d 61 6c 6c 6f 63 61 74 65 64 20 70 61 pre-allocated pa
47a0: 67 65 20 62 6c 6f 63 6b 73 0a 7d 20 2d 66 69 6c ge blocks.} -fil
47b0: 65 73 20 5b 0a 20 20 74 65 73 74 5f 73 65 74 20 es [. test_set
47c0: 24 3a 3a 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 $::allquicktests
47d0: 20 2d 65 78 63 6c 75 64 65 20 69 6f 65 72 72 35 -exclude ioerr5
47e0: 2e 74 65 73 74 20 6d 61 6c 6c 6f 63 35 2e 74 65 .test malloc5.te
47f0: 73 74 20 6d 6d 61 70 31 2e 74 65 73 74 0a 5d 20 st mmap1.test.]
4800: 2d 69 6e 69 74 69 61 6c 69 7a 65 20 7b 0a 20 20 -initialize {.
4810: 74 65 73 74 5f 73 65 74 5f 63 6f 6e 66 69 67 5f test_set_config_
4820: 70 61 67 65 63 61 63 68 65 20 34 30 39 36 20 32 pagecache 4096 2
4830: 34 0a 20 20 63 61 74 63 68 20 7b 64 62 20 63 6c 4. catch {db cl
4840: 6f 73 65 7d 0a 20 20 73 71 6c 69 74 65 33 5f 73 ose}. sqlite3_s
4850: 68 75 74 64 6f 77 6e 0a 20 20 73 71 6c 69 74 65 hutdown. sqlite
4860: 33 5f 69 6e 69 74 69 61 6c 69 7a 65 0a 20 20 61 3_initialize. a
4870: 75 74 6f 69 6e 73 74 61 6c 6c 5f 74 65 73 74 5f utoinstall_test_
4880: 66 75 6e 63 74 69 6f 6e 73 0a 7d 20 2d 73 68 75 functions.} -shu
4890: 74 64 6f 77 6e 20 7b 0a 20 20 74 65 73 74 5f 72 tdown {. test_r
48a0: 65 73 74 6f 72 65 5f 63 6f 6e 66 69 67 5f 70 61 estore_config_pa
48b0: 67 65 63 61 63 68 65 0a 20 20 63 61 74 63 68 20 gecache. catch
48c0: 7b 64 62 20 63 6c 6f 73 65 7d 0a 20 20 73 71 6c {db close}. sql
48d0: 69 74 65 33 5f 73 68 75 74 64 6f 77 6e 0a 20 20 ite3_shutdown.
48e0: 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 61 6c 69 sqlite3_initiali
48f0: 7a 65 0a 20 20 61 75 74 6f 69 6e 73 74 61 6c 6c ze. autoinstall
4900: 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 73 0a _test_functions.
4910: 7d 0a 0a 23 20 52 75 6e 20 73 6f 6d 65 20 74 65 }..# Run some te
4920: 73 74 73 20 75 73 69 6e 67 20 70 72 65 2d 61 6c sts using pre-al
4930: 6c 6f 63 61 74 65 64 20 70 61 67 65 20 62 6c 6f located page blo
4940: 63 6b 73 2e 20 54 68 69 73 20 74 69 6d 65 0a 23 cks. This time.#
4950: 20 74 68 65 20 61 6c 6c 6f 63 61 74 69 6f 6e 73 the allocations
4960: 20 61 72 65 20 74 6f 6f 20 73 6d 61 6c 6c 20 74 are too small t
4970: 6f 20 75 73 65 20 69 6e 20 6d 6f 73 74 20 63 61 o use in most ca
4980: 73 65 73 2e 0a 23 0a 23 20 42 6f 74 68 20 69 6f ses..#.# Both io
4990: 65 72 72 35 2e 74 65 73 74 20 61 6e 64 20 6d 61 err5.test and ma
49a0: 6c 6c 6f 63 35 2e 74 65 73 74 20 61 72 65 20 65 lloc5.test are e
49b0: 78 63 6c 75 64 65 64 20 62 65 63 61 75 73 65 20 xcluded because
49c0: 74 68 65 79 20 74 65 73 74 20 74 68 65 0a 23 20 they test the.#
49d0: 73 71 6c 69 74 65 33 5f 73 6f 66 74 5f 68 65 61 sqlite3_soft_hea
49e0: 70 5f 6c 69 6d 69 74 28 29 20 61 6e 64 20 73 71 p_limit() and sq
49f0: 6c 69 74 65 33 5f 72 65 6c 65 61 73 65 5f 6d 65 lite3_release_me
4a00: 6d 6f 72 79 28 29 20 66 75 6e 63 74 69 6f 6e 61 mory() functiona
4a10: 6c 69 74 79 2e 0a 23 20 54 68 69 73 20 66 75 6e lity..# This fun
4a20: 63 74 69 6f 6e 61 6c 69 74 79 20 69 73 20 64 69 ctionality is di
4a30: 73 61 62 6c 65 64 20 69 66 20 61 20 70 72 65 2d sabled if a pre-
4a40: 61 6c 6c 6f 63 61 74 65 64 20 70 61 67 65 20 62 allocated page b
4a50: 6c 6f 63 6b 20 69 73 20 70 72 6f 76 69 64 65 64 lock is provided
4a60: 2e 0a 23 0a 74 65 73 74 5f 73 75 69 74 65 20 22 ..#.test_suite "
4a70: 6d 65 6d 73 75 62 73 79 73 32 22 20 2d 64 65 73 memsubsys2" -des
4a80: 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 54 65 73 cription {. Tes
4a90: 74 73 20 75 73 69 6e 67 20 73 6d 61 6c 6c 20 70 ts using small p
4aa0: 72 65 2d 61 6c 6c 6f 63 61 74 65 64 20 70 61 67 re-allocated pag
4ab0: 65 20 62 6c 6f 63 6b 73 0a 7d 20 2d 66 69 6c 65 e blocks.} -file
4ac0: 73 20 5b 0a 20 20 74 65 73 74 5f 73 65 74 20 24 s [. test_set $
4ad0: 3a 3a 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 20 ::allquicktests
4ae0: 2d 65 78 63 6c 75 64 65 20 69 6f 65 72 72 35 2e -exclude ioerr5.
4af0: 74 65 73 74 20 6d 61 6c 6c 6f 63 35 2e 74 65 73 test malloc5.tes
4b00: 74 0a 5d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 20 t.] -initialize
4b10: 7b 0a 20 20 74 65 73 74 5f 73 65 74 5f 63 6f 6e {. test_set_con
4b20: 66 69 67 5f 70 61 67 65 63 61 63 68 65 20 35 31 fig_pagecache 51
4b30: 32 20 35 0a 20 20 63 61 74 63 68 20 7b 64 62 20 2 5. catch {db
4b40: 63 6c 6f 73 65 7d 0a 20 20 73 71 6c 69 74 65 33 close}. sqlite3
4b50: 5f 73 68 75 74 64 6f 77 6e 0a 20 20 73 71 6c 69 _shutdown. sqli
4b60: 74 65 33 5f 69 6e 69 74 69 61 6c 69 7a 65 0a 20 te3_initialize.
4b70: 20 61 75 74 6f 69 6e 73 74 61 6c 6c 5f 74 65 73 autoinstall_tes
4b80: 74 5f 66 75 6e 63 74 69 6f 6e 73 0a 7d 20 2d 73 t_functions.} -s
4b90: 68 75 74 64 6f 77 6e 20 7b 0a 20 20 74 65 73 74 hutdown {. test
4ba0: 5f 72 65 73 74 6f 72 65 5f 63 6f 6e 66 69 67 5f _restore_config_
4bb0: 70 61 67 65 63 61 63 68 65 0a 20 20 63 61 74 63 pagecache. catc
4bc0: 68 20 7b 64 62 20 63 6c 6f 73 65 7d 0a 20 20 73 h {db close}. s
4bd0: 71 6c 69 74 65 33 5f 73 68 75 74 64 6f 77 6e 0a qlite3_shutdown.
4be0: 20 20 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 61 sqlite3_initia
4bf0: 6c 69 7a 65 0a 20 20 61 75 74 6f 69 6e 73 74 61 lize. autoinsta
4c00: 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e ll_test_function
4c10: 73 0a 7d 0a 0a 23 20 52 75 6e 20 61 6c 6c 20 74 s.}..# Run all t
4c20: 65 73 74 73 20 77 69 74 68 20 74 68 65 20 6c 6f ests with the lo
4c30: 6f 6b 61 73 69 64 65 20 61 6c 6c 6f 63 61 74 6f okaside allocato
4c40: 72 20 64 69 73 61 62 6c 65 64 2e 0a 23 0a 74 65 r disabled..#.te
4c50: 73 74 5f 73 75 69 74 65 20 22 6e 6f 6c 6f 6f 6b st_suite "nolook
4c60: 61 73 69 64 65 22 20 2d 64 65 73 63 72 69 70 74 aside" -descript
4c70: 69 6f 6e 20 7b 0a 20 20 4f 4f 4d 20 74 65 73 74 ion {. OOM test
4c80: 73 20 77 69 74 68 20 6c 6f 6f 6b 61 73 69 64 65 s with lookaside
4c90: 20 64 69 73 61 62 6c 65 64 0a 7d 20 2d 69 6e 69 disabled.} -ini
4ca0: 74 69 61 6c 69 7a 65 20 7b 0a 20 20 63 61 74 63 tialize {. catc
4cb0: 68 20 7b 64 62 20 63 6c 6f 73 65 7d 0a 20 20 73 h {db close}. s
4cc0: 71 6c 69 74 65 33 5f 73 68 75 74 64 6f 77 6e 0a qlite3_shutdown.
4cd0: 20 20 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 67 sqlite3_config
4ce0: 5f 6c 6f 6f 6b 61 73 69 64 65 20 30 20 30 0a 20 _lookaside 0 0.
4cf0: 20 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 61 6c sqlite3_initial
4d00: 69 7a 65 0a 20 20 61 75 74 6f 69 6e 73 74 61 6c ize. autoinstal
4d10: 6c 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 73 l_test_functions
4d20: 0a 7d 20 2d 73 68 75 74 64 6f 77 6e 20 7b 0a 20 .} -shutdown {.
4d30: 20 63 61 74 63 68 20 7b 64 62 20 63 6c 6f 73 65 catch {db close
4d40: 7d 0a 20 20 73 71 6c 69 74 65 33 5f 73 68 75 74 }. sqlite3_shut
4d50: 64 6f 77 6e 0a 20 20 73 71 6c 69 74 65 33 5f 63 down. sqlite3_c
4d60: 6f 6e 66 69 67 5f 6c 6f 6f 6b 61 73 69 64 65 20 onfig_lookaside
4d70: 31 30 30 20 35 30 30 0a 20 20 73 71 6c 69 74 65 100 500. sqlite
4d80: 33 5f 69 6e 69 74 69 61 6c 69 7a 65 0a 20 20 61 3_initialize. a
4d90: 75 74 6f 69 6e 73 74 61 6c 6c 5f 74 65 73 74 5f utoinstall_test_
4da0: 66 75 6e 63 74 69 6f 6e 73 0a 7d 20 2d 66 69 6c functions.} -fil
4db0: 65 73 20 24 3a 3a 61 6c 6c 71 75 69 63 6b 74 65 es $::allquickte
4dc0: 73 74 73 0a 0a 23 20 52 75 6e 20 73 6f 6d 65 20 sts..# Run some
4dd0: 74 65 73 74 73 20 69 6e 20 53 51 4c 49 54 45 5f tests in SQLITE_
4de0: 43 4f 4e 46 49 47 5f 53 49 4e 47 4c 45 54 48 52 CONFIG_SINGLETHR
4df0: 45 41 44 20 6d 6f 64 65 2e 0a 23 0a 74 65 73 74 EAD mode..#.test
4e00: 5f 73 75 69 74 65 20 22 73 69 6e 67 6c 65 74 68 _suite "singleth
4e10: 72 65 61 64 22 20 2d 64 65 73 63 72 69 70 74 69 read" -descripti
4e20: 6f 6e 20 7b 0a 20 20 54 65 73 74 73 20 72 75 6e on {. Tests run
4e30: 20 69 6e 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 in SQLITE_CONFI
4e40: 47 5f 53 49 4e 47 4c 45 54 48 52 45 41 44 20 6d G_SINGLETHREAD m
4e50: 6f 64 65 0a 7d 20 2d 69 6e 69 74 69 61 6c 69 7a ode.} -initializ
4e60: 65 20 7b 0a 20 20 63 61 74 63 68 20 7b 64 62 20 e {. catch {db
4e70: 63 6c 6f 73 65 7d 0a 20 20 73 71 6c 69 74 65 33 close}. sqlite3
4e80: 5f 73 68 75 74 64 6f 77 6e 0a 20 20 63 61 74 63 _shutdown. catc
4e90: 68 20 7b 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 h {sqlite3_confi
4ea0: 67 20 73 69 6e 67 6c 65 74 68 72 65 61 64 7d 0a g singlethread}.
4eb0: 20 20 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 61 sqlite3_initia
4ec0: 6c 69 7a 65 0a 20 20 61 75 74 6f 69 6e 73 74 61 lize. autoinsta
4ed0: 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e ll_test_function
4ee0: 73 0a 7d 20 2d 66 69 6c 65 73 20 7b 0a 20 20 64 s.} -files {. d
4ef0: 65 6c 65 74 65 2e 74 65 73 74 20 20 20 64 65 6c elete.test del
4f00: 65 74 65 32 2e 74 65 73 74 20 20 69 6e 73 65 72 ete2.test inser
4f10: 74 2e 74 65 73 74 20 20 72 6f 6c 6c 62 61 63 6b t.test rollback
4f20: 2e 74 65 73 74 20 20 73 65 6c 65 63 74 31 2e 74 .test select1.t
4f30: 65 73 74 0a 20 20 73 65 6c 65 63 74 32 2e 74 65 est. select2.te
4f40: 73 74 20 20 74 72 61 6e 73 2e 74 65 73 74 20 20 st trans.test
4f50: 20 20 75 70 64 61 74 65 2e 74 65 73 74 20 20 76 update.test v
4f60: 61 63 75 75 6d 2e 74 65 73 74 20 20 20 20 74 79 acuum.test ty
4f70: 70 65 73 2e 74 65 73 74 0a 20 20 74 79 70 65 73 pes.test. types
4f80: 32 2e 74 65 73 74 20 20 20 74 79 70 65 73 33 2e 2.test types3.
4f90: 74 65 73 74 0a 7d 20 2d 73 68 75 74 64 6f 77 6e test.} -shutdown
4fa0: 20 7b 0a 20 20 63 61 74 63 68 20 7b 64 62 20 63 {. catch {db c
4fb0: 6c 6f 73 65 7d 0a 20 20 73 71 6c 69 74 65 33 5f lose}. sqlite3_
4fc0: 73 68 75 74 64 6f 77 6e 0a 20 20 63 61 74 63 68 shutdown. catch
4fd0: 20 7b 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 67 {sqlite3_config
4fe0: 20 73 65 72 69 61 6c 69 7a 65 64 7d 0a 20 20 73 serialized}. s
4ff0: 71 6c 69 74 65 33 5f 69 6e 69 74 69 61 6c 69 7a qlite3_initializ
5000: 65 0a 20 20 61 75 74 6f 69 6e 73 74 61 6c 6c 5f e. autoinstall_
5010: 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 73 0a 7d test_functions.}
5020: 0a 0a 74 65 73 74 5f 73 75 69 74 65 20 22 6e 6f ..test_suite "no
5030: 6d 75 74 65 78 22 20 2d 64 65 73 63 72 69 70 74 mutex" -descript
5040: 69 6f 6e 20 7b 0a 20 20 54 65 73 74 73 20 72 75 ion {. Tests ru
5050: 6e 20 77 69 74 68 20 74 68 65 20 53 51 4c 49 54 n with the SQLIT
5060: 45 5f 4f 50 45 4e 5f 4d 55 4c 54 49 54 48 52 45 E_OPEN_MULTITHRE
5070: 41 44 45 44 20 66 6c 61 67 20 70 61 73 73 65 64 ADED flag passed
5080: 20 74 6f 20 73 71 6c 69 74 65 33 5f 6f 70 65 6e to sqlite3_open
5090: 28 29 2e 0a 7d 20 2d 69 6e 69 74 69 61 6c 69 7a ()..} -initializ
50a0: 65 20 7b 0a 20 20 73 65 74 20 3a 3a 47 28 70 65 e {. set ::G(pe
50b0: 72 6d 3a 73 71 6c 69 74 65 33 5f 61 72 67 73 29 rm:sqlite3_args)
50c0: 20 5b 6c 69 73 74 20 2d 66 75 6c 6c 6d 75 74 65 [list -fullmute
50d0: 78 20 30 20 2d 6e 6f 6d 75 74 65 78 20 31 5d 0a x 0 -nomutex 1].
50e0: 7d 20 2d 66 69 6c 65 73 20 7b 0a 20 20 64 65 6c } -files {. del
50f0: 65 74 65 2e 74 65 73 74 20 20 20 64 65 6c 65 74 ete.test delet
5100: 65 32 2e 74 65 73 74 20 20 69 6e 73 65 72 74 2e e2.test insert.
5110: 74 65 73 74 20 20 72 6f 6c 6c 62 61 63 6b 2e 74 test rollback.t
5120: 65 73 74 20 20 73 65 6c 65 63 74 31 2e 74 65 73 est select1.tes
5130: 74 0a 20 20 73 65 6c 65 63 74 32 2e 74 65 73 74 t. select2.test
5140: 20 20 74 72 61 6e 73 2e 74 65 73 74 20 20 20 20 trans.test
5150: 75 70 64 61 74 65 2e 74 65 73 74 20 20 76 61 63 update.test vac
5160: 75 75 6d 2e 74 65 73 74 20 20 20 20 74 79 70 65 uum.test type
5170: 73 2e 74 65 73 74 0a 20 20 74 79 70 65 73 32 2e s.test. types2.
5180: 74 65 73 74 20 20 20 74 79 70 65 73 33 2e 74 65 test types3.te
5190: 73 74 0a 7d 20 0a 0a 23 20 52 75 6e 20 73 6f 6d st.} ..# Run som
51a0: 65 20 74 65 73 74 73 20 69 6e 20 53 51 4c 49 54 e tests in SQLIT
51b0: 45 5f 43 4f 4e 46 49 47 5f 4d 55 4c 54 49 54 48 E_CONFIG_MULTITH
51c0: 52 45 41 44 20 6d 6f 64 65 2e 0a 23 0a 74 65 73 READ mode..#.tes
51d0: 74 5f 73 75 69 74 65 20 22 6d 75 6c 74 69 74 68 t_suite "multith
51e0: 72 65 61 64 22 20 2d 64 65 73 63 72 69 70 74 69 read" -descripti
51f0: 6f 6e 20 7b 0a 20 20 54 65 73 74 73 20 72 75 6e on {. Tests run
5200: 20 69 6e 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 in SQLITE_CONFI
5210: 47 5f 4d 55 4c 54 49 54 48 52 45 41 44 20 6d 6f G_MULTITHREAD mo
5220: 64 65 0a 7d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 de.} -initialize
5230: 20 7b 0a 20 20 63 61 74 63 68 20 7b 64 62 20 63 {. catch {db c
5240: 6c 6f 73 65 7d 0a 20 20 73 71 6c 69 74 65 33 5f lose}. sqlite3_
5250: 73 68 75 74 64 6f 77 6e 0a 20 20 63 61 74 63 68 shutdown. catch
5260: 20 7b 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 67 {sqlite3_config
5270: 20 6d 75 6c 74 69 74 68 72 65 61 64 7d 0a 20 20 multithread}.
5280: 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 61 6c 69 sqlite3_initiali
5290: 7a 65 0a 20 20 61 75 74 6f 69 6e 73 74 61 6c 6c ze. autoinstall
52a0: 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 73 0a _test_functions.
52b0: 7d 20 2d 66 69 6c 65 73 20 7b 0a 20 20 64 65 6c } -files {. del
52c0: 65 74 65 2e 74 65 73 74 20 20 20 64 65 6c 65 74 ete.test delet
52d0: 65 32 2e 74 65 73 74 20 20 69 6e 73 65 72 74 2e e2.test insert.
52e0: 74 65 73 74 20 20 72 6f 6c 6c 62 61 63 6b 2e 74 test rollback.t
52f0: 65 73 74 20 20 73 65 6c 65 63 74 31 2e 74 65 73 est select1.tes
5300: 74 0a 20 20 73 65 6c 65 63 74 32 2e 74 65 73 74 t. select2.test
5310: 20 20 74 72 61 6e 73 2e 74 65 73 74 20 20 20 20 trans.test
5320: 75 70 64 61 74 65 2e 74 65 73 74 20 20 76 61 63 update.test vac
5330: 75 75 6d 2e 74 65 73 74 20 20 20 20 74 79 70 65 uum.test type
5340: 73 2e 74 65 73 74 0a 20 20 74 79 70 65 73 32 2e s.test. types2.
5350: 74 65 73 74 20 20 20 74 79 70 65 73 33 2e 74 65 test types3.te
5360: 73 74 20 20 20 73 6f 72 74 34 2e 74 65 73 74 0a st sort4.test.
5370: 7d 20 2d 73 68 75 74 64 6f 77 6e 20 7b 0a 20 20 } -shutdown {.
5380: 63 61 74 63 68 20 7b 64 62 20 63 6c 6f 73 65 7d catch {db close}
5390: 0a 20 20 73 71 6c 69 74 65 33 5f 73 68 75 74 64 . sqlite3_shutd
53a0: 6f 77 6e 0a 20 20 63 61 74 63 68 20 7b 73 71 6c own. catch {sql
53b0: 69 74 65 33 5f 63 6f 6e 66 69 67 20 73 65 72 69 ite3_config seri
53c0: 61 6c 69 7a 65 64 7d 0a 20 20 73 71 6c 69 74 65 alized}. sqlite
53d0: 33 5f 69 6e 69 74 69 61 6c 69 7a 65 0a 20 20 61 3_initialize. a
53e0: 75 74 6f 69 6e 73 74 61 6c 6c 5f 74 65 73 74 5f utoinstall_test_
53f0: 66 75 6e 63 74 69 6f 6e 73 0a 7d 0a 0a 23 20 52 functions.}..# R
5400: 75 6e 20 73 6f 6d 65 20 74 65 73 74 73 20 69 6e un some tests in
5410: 20 53 51 4c 49 54 45 5f 4f 50 45 4e 5f 46 55 4c SQLITE_OPEN_FUL
5420: 4c 4d 55 54 45 58 20 6d 6f 64 65 2e 0a 23 0a 74 LMUTEX mode..#.t
5430: 65 73 74 5f 73 75 69 74 65 20 22 66 75 6c 6c 6d est_suite "fullm
5440: 75 74 65 78 22 20 2d 64 65 73 63 72 69 70 74 69 utex" -descripti
5450: 6f 6e 20 7b 0a 20 20 54 65 73 74 73 20 72 75 6e on {. Tests run
5460: 20 69 6e 20 53 51 4c 49 54 45 5f 4f 50 45 4e 5f in SQLITE_OPEN_
5470: 46 55 4c 4c 4d 55 54 45 58 20 6d 6f 64 65 0a 7d FULLMUTEX mode.}
5480: 20 2d 69 6e 69 74 69 61 6c 69 7a 65 20 7b 0a 20 -initialize {.
5490: 20 73 65 74 20 3a 3a 47 28 70 65 72 6d 3a 73 71 set ::G(perm:sq
54a0: 6c 69 74 65 33 5f 61 72 67 73 29 20 5b 6c 69 73 lite3_args) [lis
54b0: 74 20 2d 6e 6f 6d 75 74 65 78 20 30 20 2d 66 75 t -nomutex 0 -fu
54c0: 6c 6c 6d 75 74 65 78 20 31 5d 0a 7d 20 2d 66 69 llmutex 1].} -fi
54d0: 6c 65 73 20 7b 0a 20 20 64 65 6c 65 74 65 2e 74 les {. delete.t
54e0: 65 73 74 20 20 20 64 65 6c 65 74 65 32 2e 74 65 est delete2.te
54f0: 73 74 20 20 69 6e 73 65 72 74 2e 74 65 73 74 20 st insert.test
5500: 20 72 6f 6c 6c 62 61 63 6b 2e 74 65 73 74 20 20 rollback.test
5510: 73 65 6c 65 63 74 31 2e 74 65 73 74 0a 20 20 73 select1.test. s
5520: 65 6c 65 63 74 32 2e 74 65 73 74 20 20 74 72 61 elect2.test tra
5530: 6e 73 2e 74 65 73 74 20 20 20 20 75 70 64 61 74 ns.test updat
5540: 65 2e 74 65 73 74 20 20 76 61 63 75 75 6d 2e 74 e.test vacuum.t
5550: 65 73 74 20 20 20 20 74 79 70 65 73 2e 74 65 73 est types.tes
5560: 74 0a 20 20 74 79 70 65 73 32 2e 74 65 73 74 20 t. types2.test
5570: 20 20 74 79 70 65 73 33 2e 74 65 73 74 0a 7d 0a types3.test.}.
5580: 0a 23 20 52 75 6e 20 73 6f 6d 65 20 74 65 73 74 .# Run some test
5590: 73 20 75 73 69 6e 67 20 74 68 65 20 22 6f 6e 65 s using the "one
55a0: 66 69 6c 65 22 20 64 65 6d 6f 2e 0a 23 0a 74 65 file" demo..#.te
55b0: 73 74 5f 73 75 69 74 65 20 22 6f 6e 65 66 69 6c st_suite "onefil
55c0: 65 22 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 e" -description
55d0: 7b 0a 20 20 52 75 6e 20 73 6f 6d 65 20 74 65 73 {. Run some tes
55e0: 74 73 20 75 73 69 6e 67 20 74 68 65 20 22 74 65 ts using the "te
55f0: 73 74 5f 6f 6e 65 66 69 6c 65 2e 63 22 20 64 65 st_onefile.c" de
5600: 6d 6f 0a 7d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 mo.} -initialize
5610: 20 7b 0a 20 20 73 65 74 20 3a 3a 47 28 70 65 72 {. set ::G(per
5620: 6d 3a 73 71 6c 69 74 65 33 5f 61 72 67 73 29 20 m:sqlite3_args)
5630: 5b 6c 69 73 74 20 2d 76 66 73 20 66 73 5d 0a 7d [list -vfs fs].}
5640: 20 2d 66 69 6c 65 73 20 7b 0a 20 20 63 6f 6e 66 -files {. conf
5650: 6c 69 63 74 2e 74 65 73 74 20 20 69 6e 73 65 72 lict.test inser
5660: 74 2e 74 65 73 74 20 20 20 69 6e 73 65 72 74 32 t.test insert2
5670: 2e 74 65 73 74 20 20 69 6e 73 65 72 74 33 2e 74 .test insert3.t
5680: 65 73 74 0a 20 20 72 6f 6c 6c 62 61 63 6b 2e 74 est. rollback.t
5690: 65 73 74 20 20 73 65 6c 65 63 74 31 2e 74 65 73 est select1.tes
56a0: 74 20 20 73 65 6c 65 63 74 32 2e 74 65 73 74 20 t select2.test
56b0: 20 73 65 6c 65 63 74 33 2e 74 65 73 74 0a 7d 0a select3.test.}.
56c0: 0a 23 20 52 75 6e 20 73 6f 6d 65 20 74 65 73 74 .# Run some test
56d0: 73 20 75 73 69 6e 67 20 55 54 46 2d 31 36 20 64 s using UTF-16 d
56e0: 61 74 61 62 61 73 65 73 2e 0a 23 0a 74 65 73 74 atabases..#.test
56f0: 5f 73 75 69 74 65 20 22 75 74 66 31 36 22 20 2d _suite "utf16" -
5700: 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 description {.
5710: 52 75 6e 20 74 65 73 74 73 20 75 73 69 6e 67 20 Run tests using
5720: 55 54 46 2d 31 36 20 64 61 74 61 62 61 73 65 73 UTF-16 databases
5730: 0a 7d 20 2d 70 72 65 73 71 6c 20 7b 0a 20 20 70 .} -presql {. p
5740: 72 61 67 6d 61 20 65 6e 63 6f 64 69 6e 67 20 3d ragma encoding =
5750: 20 27 55 54 46 2d 31 36 27 0a 7d 20 2d 66 69 6c 'UTF-16'.} -fil
5760: 65 73 20 7b 0a 20 20 20 20 61 6c 74 65 72 2e 74 es {. alter.t
5770: 65 73 74 20 61 6c 74 65 72 33 2e 74 65 73 74 0a est alter3.test.
5780: 20 20 20 20 61 6e 61 6c 79 7a 65 2e 74 65 73 74 analyze.test
5790: 20 61 6e 61 6c 79 7a 65 33 2e 74 65 73 74 20 61 analyze3.test a
57a0: 6e 61 6c 79 7a 65 34 2e 74 65 73 74 20 61 6e 61 nalyze4.test ana
57b0: 6c 79 7a 65 35 2e 74 65 73 74 20 61 6e 61 6c 79 lyze5.test analy
57c0: 7a 65 36 2e 74 65 73 74 0a 20 20 20 20 61 6e 61 ze6.test. ana
57d0: 6c 79 7a 65 37 2e 74 65 73 74 20 61 6e 61 6c 79 lyze7.test analy
57e0: 7a 65 38 2e 74 65 73 74 20 61 6e 61 6c 79 7a 65 ze8.test analyze
57f0: 39 2e 74 65 73 74 20 61 6e 61 6c 79 7a 65 41 2e 9.test analyzeA.
5800: 74 65 73 74 20 61 6e 61 6c 79 7a 65 42 2e 74 65 test analyzeB.te
5810: 73 74 0a 20 20 20 20 61 75 74 68 2e 74 65 73 74 st. auth.test
5820: 20 62 69 6e 64 2e 74 65 73 74 20 62 6c 6f 62 2e bind.test blob.
5830: 74 65 73 74 20 63 61 70 69 32 2e 74 65 73 74 20 test capi2.test
5840: 63 61 70 69 33 2e 74 65 73 74 20 63 6f 6c 6c 61 capi3.test colla
5850: 74 65 31 2e 74 65 73 74 0a 20 20 20 20 63 6f 6c te1.test. col
5860: 6c 61 74 65 32 2e 74 65 73 74 20 63 6f 6c 6c 61 late2.test colla
5870: 74 65 33 2e 74 65 73 74 20 63 6f 6c 6c 61 74 65 te3.test collate
5880: 34 2e 74 65 73 74 20 63 6f 6c 6c 61 74 65 35 2e 4.test collate5.
5890: 74 65 73 74 20 63 6f 6c 6c 61 74 65 36 2e 74 65 test collate6.te
58a0: 73 74 0a 20 20 20 20 63 6f 6e 66 6c 69 63 74 2e st. conflict.
58b0: 74 65 73 74 20 64 61 74 65 2e 74 65 73 74 20 64 test date.test d
58c0: 65 6c 65 74 65 2e 74 65 73 74 20 65 78 70 72 2e elete.test expr.
58d0: 74 65 73 74 20 66 6b 65 79 31 2e 74 65 73 74 20 test fkey1.test
58e0: 66 75 6e 63 2e 74 65 73 74 0a 20 20 20 20 68 6f func.test. ho
58f0: 6f 6b 2e 74 65 73 74 20 69 6e 64 65 78 2e 74 65 ok.test index.te
5900: 73 74 20 69 6e 73 65 72 74 32 2e 74 65 73 74 20 st insert2.test
5910: 69 6e 73 65 72 74 2e 74 65 73 74 20 69 6e 74 65 insert.test inte
5920: 72 72 75 70 74 2e 74 65 73 74 20 69 6e 2e 74 65 rrupt.test in.te
5930: 73 74 0a 20 20 20 20 69 6e 74 70 6b 65 79 2e 74 st. intpkey.t
5940: 65 73 74 20 69 6f 65 72 72 2e 74 65 73 74 20 6a est ioerr.test j
5950: 6f 69 6e 32 2e 74 65 73 74 20 6a 6f 69 6e 2e 74 oin2.test join.t
5960: 65 73 74 20 6c 61 73 74 69 6e 73 65 72 74 2e 74 est lastinsert.t
5970: 65 73 74 0a 20 20 20 20 6c 61 73 74 73 74 6d 74 est. laststmt
5980: 63 68 61 6e 67 65 73 2e 74 65 73 74 20 6c 69 6d changes.test lim
5990: 69 74 2e 74 65 73 74 20 6c 6f 63 6b 32 2e 74 65 it.test lock2.te
59a0: 73 74 20 6c 6f 63 6b 2e 74 65 73 74 20 6d 61 69 st lock.test mai
59b0: 6e 2e 74 65 73 74 20 0a 20 20 20 20 6d 65 6d 64 n.test . memd
59c0: 62 2e 74 65 73 74 20 6d 69 6e 6d 61 78 2e 74 65 b.test minmax.te
59d0: 73 74 20 6d 69 73 63 31 2e 74 65 73 74 20 6d 69 st misc1.test mi
59e0: 73 63 32 2e 74 65 73 74 20 6d 69 73 63 33 2e 74 sc2.test misc3.t
59f0: 65 73 74 20 6e 6f 74 6e 75 6c 6c 2e 74 65 73 74 est notnull.test
5a00: 0a 20 20 20 20 6e 75 6c 6c 2e 74 65 73 74 20 70 . null.test p
5a10: 72 6f 67 72 65 73 73 2e 74 65 73 74 20 71 75 6f rogress.test quo
5a20: 74 65 2e 74 65 73 74 20 72 6f 77 69 64 2e 74 65 te.test rowid.te
5a30: 73 74 20 73 65 6c 65 63 74 31 2e 74 65 73 74 20 st select1.test
5a40: 73 65 6c 65 63 74 32 2e 74 65 73 74 0a 20 20 20 select2.test.
5a50: 20 73 65 6c 65 63 74 33 2e 74 65 73 74 20 73 65 select3.test se
5a60: 6c 65 63 74 34 2e 74 65 73 74 20 73 65 6c 65 63 lect4.test selec
5a70: 74 35 2e 74 65 73 74 20 73 65 6c 65 63 74 36 2e t5.test select6.
5a80: 74 65 73 74 20 73 6f 72 74 2e 74 65 73 74 20 0a test sort.test .
5a90: 20 20 20 20 73 75 62 73 65 6c 65 63 74 2e 74 65 subselect.te
5aa0: 73 74 20 74 61 62 6c 65 61 70 69 2e 74 65 73 74 st tableapi.test
5ab0: 20 74 61 62 6c 65 2e 74 65 73 74 20 74 65 6d 70 table.test temp
5ac0: 74 61 62 6c 65 2e 74 65 73 74 0a 20 20 20 20 74 table.test. t
5ad0: 72 61 63 65 2e 74 65 73 74 20 74 72 69 67 67 65 race.test trigge
5ae0: 72 31 2e 74 65 73 74 20 74 72 69 67 67 65 72 32 r1.test trigger2
5af0: 2e 74 65 73 74 20 74 72 69 67 67 65 72 33 2e 74 .test trigger3.t
5b00: 65 73 74 0a 20 20 20 20 74 72 69 67 67 65 72 34 est. trigger4
5b10: 2e 74 65 73 74 20 74 79 70 65 73 32 2e 74 65 73 .test types2.tes
5b20: 74 20 74 79 70 65 73 2e 74 65 73 74 20 75 6e 69 t types.test uni
5b30: 71 75 65 2e 74 65 73 74 20 75 70 64 61 74 65 2e que.test update.
5b40: 74 65 73 74 0a 20 20 20 20 76 61 63 75 75 6d 2e test. vacuum.
5b50: 74 65 73 74 20 76 69 65 77 2e 74 65 73 74 20 77 test view.test w
5b60: 68 65 72 65 2e 74 65 73 74 0a 20 20 20 20 62 65 here.test. be
5b70: 73 74 69 6e 64 65 78 31 2e 74 65 73 74 0a 7d 0a stindex1.test.}.
5b80: 0a 23 20 52 75 6e 20 73 6f 6d 65 20 74 65 73 74 .# Run some test
5b90: 73 20 69 6e 20 65 78 63 6c 75 73 69 76 65 20 6c s in exclusive l
5ba0: 6f 63 6b 69 6e 67 20 6d 6f 64 65 2e 0a 23 0a 74 ocking mode..#.t
5bb0: 65 73 74 5f 73 75 69 74 65 20 22 65 78 63 6c 75 est_suite "exclu
5bc0: 73 69 76 65 22 20 2d 64 65 73 63 72 69 70 74 69 sive" -descripti
5bd0: 6f 6e 20 7b 0a 20 20 52 75 6e 20 74 65 73 74 73 on {. Run tests
5be0: 20 69 6e 20 65 78 63 6c 75 73 69 76 65 20 6c 6f in exclusive lo
5bf0: 63 6b 69 6e 67 20 6d 6f 64 65 2e 0a 7d 20 2d 70 cking mode..} -p
5c00: 72 65 73 71 6c 20 7b 0a 20 20 70 72 61 67 6d 61 resql {. pragma
5c10: 20 6c 6f 63 6b 69 6e 67 5f 6d 6f 64 65 20 3d 20 locking_mode =
5c20: 27 65 78 63 6c 75 73 69 76 65 27 0a 7d 20 2d 66 'exclusive'.} -f
5c30: 69 6c 65 73 20 7b 0a 20 20 72 6f 6c 6c 62 61 63 iles {. rollbac
5c40: 6b 2e 74 65 73 74 20 73 65 6c 65 63 74 31 2e 74 k.test select1.t
5c50: 65 73 74 20 73 65 6c 65 63 74 32 2e 74 65 73 74 est select2.test
5c60: 20 0a 20 20 6d 61 6c 6c 6f 63 2e 74 65 73 74 20 . malloc.test
5c70: 69 6f 65 72 72 2e 74 65 73 74 0a 7d 20 0a 0a 23 ioerr.test.} ..#
5c80: 20 52 75 6e 20 73 6f 6d 65 20 74 65 73 74 73 20 Run some tests
5c90: 69 6e 20 65 78 63 6c 75 73 69 76 65 20 6c 6f 63 in exclusive loc
5ca0: 6b 69 6e 67 20 6d 6f 64 65 20 77 69 74 68 20 74 king mode with t
5cb0: 72 75 6e 63 61 74 65 64 20 6a 6f 75 72 6e 61 6c runcated journal
5cc0: 73 2e 0a 23 0a 74 65 73 74 5f 73 75 69 74 65 20 s..#.test_suite
5cd0: 22 65 78 63 6c 75 73 69 76 65 2d 74 72 75 6e 63 "exclusive-trunc
5ce0: 61 74 65 22 20 2d 64 65 73 63 72 69 70 74 69 6f ate" -descriptio
5cf0: 6e 20 7b 0a 20 20 52 75 6e 20 74 65 73 74 73 20 n {. Run tests
5d00: 69 6e 20 65 78 63 6c 75 73 69 76 65 20 6c 6f 63 in exclusive loc
5d10: 6b 69 6e 67 20 6d 6f 64 65 20 61 6e 64 20 74 72 king mode and tr
5d20: 75 6e 63 61 74 65 20 6a 6f 75 72 6e 61 6c 20 6d uncate journal m
5d30: 6f 64 65 2e 0a 7d 20 2d 70 72 65 73 71 6c 20 7b ode..} -presql {
5d40: 0a 20 20 70 72 61 67 6d 61 20 6c 6f 63 6b 69 6e . pragma lockin
5d50: 67 5f 6d 6f 64 65 20 3d 20 27 65 78 63 6c 75 73 g_mode = 'exclus
5d60: 69 76 65 27 3b 0a 20 20 70 72 61 67 6d 61 20 6a ive';. pragma j
5d70: 6f 75 72 6e 61 6c 5f 6d 6f 64 65 20 3d 20 54 52 ournal_mode = TR
5d80: 55 4e 43 41 54 45 3b 0a 7d 20 2d 66 69 6c 65 73 UNCATE;.} -files
5d90: 20 7b 0a 20 20 64 65 6c 65 74 65 2e 74 65 73 74 {. delete.test
5da0: 20 64 65 6c 65 74 65 32 2e 74 65 73 74 20 69 6e delete2.test in
5db0: 73 65 72 74 2e 74 65 73 74 20 72 6f 6c 6c 62 61 sert.test rollba
5dc0: 63 6b 2e 74 65 73 74 20 73 65 6c 65 63 74 31 2e ck.test select1.
5dd0: 74 65 73 74 0a 20 20 73 65 6c 65 63 74 32 2e 74 test. select2.t
5de0: 65 73 74 20 75 70 64 61 74 65 2e 74 65 73 74 20 est update.test
5df0: 6d 61 6c 6c 6f 63 2e 74 65 73 74 20 69 6f 65 72 malloc.test ioer
5e00: 72 2e 74 65 73 74 0a 7d 20 0a 0a 23 20 52 75 6e r.test.} ..# Run
5e10: 20 73 6f 6d 65 20 74 65 73 74 73 20 69 6e 20 70 some tests in p
5e20: 65 72 73 69 73 74 65 6e 74 20 6a 6f 75 72 6e 61 ersistent journa
5e30: 6c 20 6d 6f 64 65 2e 0a 23 0a 74 65 73 74 5f 73 l mode..#.test_s
5e40: 75 69 74 65 20 22 70 65 72 73 69 73 74 65 6e 74 uite "persistent
5e50: 5f 6a 6f 75 72 6e 61 6c 22 20 2d 64 65 73 63 72 _journal" -descr
5e60: 69 70 74 69 6f 6e 20 7b 0a 20 20 52 75 6e 20 74 iption {. Run t
5e70: 65 73 74 73 20 69 6e 20 70 65 72 73 69 73 74 65 ests in persiste
5e80: 6e 74 2d 6a 6f 75 72 6e 61 6c 20 6d 6f 64 65 2e nt-journal mode.
5e90: 0a 7d 20 2d 70 72 65 73 71 6c 20 7b 0a 20 20 70 .} -presql {. p
5ea0: 72 61 67 6d 61 20 6a 6f 75 72 6e 61 6c 5f 6d 6f ragma journal_mo
5eb0: 64 65 20 3d 20 70 65 72 73 69 73 74 0a 7d 20 2d de = persist.} -
5ec0: 66 69 6c 65 73 20 7b 0a 20 20 64 65 6c 65 74 65 files {. delete
5ed0: 2e 74 65 73 74 20 64 65 6c 65 74 65 32 2e 74 65 .test delete2.te
5ee0: 73 74 20 69 6e 73 65 72 74 2e 74 65 73 74 20 72 st insert.test r
5ef0: 6f 6c 6c 62 61 63 6b 2e 74 65 73 74 20 73 65 6c ollback.test sel
5f00: 65 63 74 31 2e 74 65 73 74 0a 20 20 73 65 6c 65 ect1.test. sele
5f10: 63 74 32 2e 74 65 73 74 20 74 72 61 6e 73 2e 74 ct2.test trans.t
5f20: 65 73 74 20 75 70 64 61 74 65 2e 74 65 73 74 20 est update.test
5f30: 76 61 63 75 75 6d 2e 74 65 73 74 20 0a 7d 0a 0a vacuum.test .}..
5f40: 23 20 52 75 6e 20 73 6f 6d 65 20 74 65 73 74 73 # Run some tests
5f50: 20 69 6e 20 74 72 75 6e 63 61 74 69 6e 67 20 6a in truncating j
5f60: 6f 75 72 6e 61 6c 20 6d 6f 64 65 2e 0a 23 0a 74 ournal mode..#.t
5f70: 65 73 74 5f 73 75 69 74 65 20 22 74 72 75 6e 63 est_suite "trunc
5f80: 61 74 65 5f 6a 6f 75 72 6e 61 6c 22 20 2d 64 65 ate_journal" -de
5f90: 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 52 75 scription {. Ru
5fa0: 6e 20 74 65 73 74 73 20 69 6e 20 70 65 72 73 69 n tests in persi
5fb0: 73 74 65 6e 74 2d 6a 6f 75 72 6e 61 6c 20 6d 6f stent-journal mo
5fc0: 64 65 2e 0a 7d 20 2d 70 72 65 73 71 6c 20 7b 0a de..} -presql {.
5fd0: 20 20 70 72 61 67 6d 61 20 6a 6f 75 72 6e 61 6c pragma journal
5fe0: 5f 6d 6f 64 65 20 3d 20 74 72 75 6e 63 61 74 65 _mode = truncate
5ff0: 0a 7d 20 2d 66 69 6c 65 73 20 7b 0a 20 20 64 65 .} -files {. de
6000: 6c 65 74 65 2e 74 65 73 74 20 64 65 6c 65 74 65 lete.test delete
6010: 32 2e 74 65 73 74 20 69 6e 73 65 72 74 2e 74 65 2.test insert.te
6020: 73 74 20 72 6f 6c 6c 62 61 63 6b 2e 74 65 73 74 st rollback.test
6030: 20 73 65 6c 65 63 74 31 2e 74 65 73 74 0a 20 20 select1.test.
6040: 73 65 6c 65 63 74 32 2e 74 65 73 74 20 74 72 61 select2.test tra
6050: 6e 73 2e 74 65 73 74 20 75 70 64 61 74 65 2e 74 ns.test update.t
6060: 65 73 74 20 76 61 63 75 75 6d 2e 74 65 73 74 20 est vacuum.test
6070: 0a 20 20 6d 61 6c 6c 6f 63 2e 74 65 73 74 20 69 . malloc.test i
6080: 6f 65 72 72 2e 74 65 73 74 0a 7d 0a 0a 23 20 52 oerr.test.}..# R
6090: 75 6e 20 73 6f 6d 65 20 65 72 72 6f 72 20 74 65 un some error te
60a0: 73 74 73 20 69 6e 20 70 65 72 73 69 73 74 65 6e sts in persisten
60b0: 74 20 6a 6f 75 72 6e 61 6c 20 6d 6f 64 65 2e 0a t journal mode..
60c0: 23 0a 74 65 73 74 5f 73 75 69 74 65 20 22 70 65 #.test_suite "pe
60d0: 72 73 69 73 74 65 6e 74 5f 6a 6f 75 72 6e 61 6c rsistent_journal
60e0: 5f 65 72 72 6f 72 22 20 2d 64 65 73 63 72 69 70 _error" -descrip
60f0: 74 69 6f 6e 20 7b 0a 20 20 52 75 6e 20 6d 61 6c tion {. Run mal
6100: 6c 6f 63 2e 74 65 73 74 20 61 6e 64 20 69 6f 65 loc.test and ioe
6110: 72 72 2e 74 65 73 74 20 69 6e 20 70 65 72 73 69 rr.test in persi
6120: 73 74 65 6e 74 2d 6a 6f 75 72 6e 61 6c 20 6d 6f stent-journal mo
6130: 64 65 2e 0a 7d 20 2d 70 72 65 73 71 6c 20 7b 0a de..} -presql {.
6140: 20 20 70 72 61 67 6d 61 20 6a 6f 75 72 6e 61 6c pragma journal
6150: 5f 6d 6f 64 65 20 3d 20 70 65 72 73 69 73 74 0a _mode = persist.
6160: 7d 20 2d 66 69 6c 65 73 20 7b 0a 20 20 6d 61 6c } -files {. mal
6170: 6c 6f 63 2e 74 65 73 74 20 69 6f 65 72 72 2e 74 loc.test ioerr.t
6180: 65 73 74 0a 7d 0a 0a 23 20 52 75 6e 20 73 6f 6d est.}..# Run som
6190: 65 20 74 65 73 74 73 20 69 6e 20 6e 6f 20 6a 6f e tests in no jo
61a0: 75 72 6e 61 6c 20 6d 6f 64 65 2e 0a 23 0a 74 65 urnal mode..#.te
61b0: 73 74 5f 73 75 69 74 65 20 22 6e 6f 5f 6a 6f 75 st_suite "no_jou
61c0: 72 6e 61 6c 22 20 2d 64 65 73 63 72 69 70 74 69 rnal" -descripti
61d0: 6f 6e 20 7b 0a 20 20 52 75 6e 20 74 65 73 74 73 on {. Run tests
61e0: 20 69 6e 20 6e 6f 2d 6a 6f 75 72 6e 61 6c 20 6d in no-journal m
61f0: 6f 64 65 2e 0a 7d 20 2d 70 72 65 73 71 6c 20 7b ode..} -presql {
6200: 0a 20 20 70 72 61 67 6d 61 20 6a 6f 75 72 6e 61 . pragma journa
6210: 6c 5f 6d 6f 64 65 20 3d 20 70 65 72 73 69 73 74 l_mode = persist
6220: 0a 7d 20 2d 66 69 6c 65 73 20 7b 0a 20 20 64 65 .} -files {. de
6230: 6c 65 74 65 2e 74 65 73 74 20 64 65 6c 65 74 65 lete.test delete
6240: 32 2e 74 65 73 74 20 69 6e 73 65 72 74 2e 74 65 2.test insert.te
6250: 73 74 20 72 6f 6c 6c 62 61 63 6b 2e 74 65 73 74 st rollback.test
6260: 20 73 65 6c 65 63 74 31 2e 74 65 73 74 0a 20 20 select1.test.
6270: 73 65 6c 65 63 74 32 2e 74 65 73 74 20 74 72 61 select2.test tra
6280: 6e 73 2e 74 65 73 74 20 75 70 64 61 74 65 2e 74 ns.test update.t
6290: 65 73 74 20 76 61 63 75 75 6d 2e 74 65 73 74 20 est vacuum.test
62a0: 0a 7d 0a 0a 23 20 52 75 6e 20 73 6f 6d 65 20 65 .}..# Run some e
62b0: 72 72 6f 72 20 74 65 73 74 73 20 69 6e 20 6e 6f rror tests in no
62c0: 20 6a 6f 75 72 6e 61 6c 20 6d 6f 64 65 2e 0a 23 journal mode..#
62d0: 0a 74 65 73 74 5f 73 75 69 74 65 20 22 6e 6f 5f .test_suite "no_
62e0: 6a 6f 75 72 6e 61 6c 5f 65 72 72 6f 72 22 20 2d journal_error" -
62f0: 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 description {.
6300: 52 75 6e 20 6d 61 6c 6c 6f 63 2e 74 65 73 74 20 Run malloc.test
6310: 61 6e 64 20 69 6f 65 72 72 2e 74 65 73 74 20 69 and ioerr.test i
6320: 6e 20 6e 6f 2d 6a 6f 75 72 6e 61 6c 20 6d 6f 64 n no-journal mod
6330: 65 2e 0a 7d 20 2d 70 72 65 73 71 6c 20 7b 0a 20 e..} -presql {.
6340: 20 70 72 61 67 6d 61 20 6a 6f 75 72 6e 61 6c 5f pragma journal_
6350: 6d 6f 64 65 20 3d 20 70 65 72 73 69 73 74 0a 7d mode = persist.}
6360: 20 2d 66 69 6c 65 73 20 7b 0a 20 20 6d 61 6c 6c -files {. mall
6370: 6f 63 2e 74 65 73 74 20 69 6f 65 72 72 2e 74 65 oc.test ioerr.te
6380: 73 74 0a 7d 0a 0a 23 20 52 75 6e 20 73 6f 6d 65 st.}..# Run some
6390: 20 63 72 61 73 68 2d 74 65 73 74 73 20 69 6e 20 crash-tests in
63a0: 61 75 74 6f 76 61 63 75 75 6d 20 6d 6f 64 65 2e autovacuum mode.
63b0: 0a 23 0a 74 65 73 74 5f 73 75 69 74 65 20 22 61 .#.test_suite "a
63c0: 75 74 6f 76 61 63 75 75 6d 5f 63 72 61 73 68 22 utovacuum_crash"
63d0: 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a -description {.
63e0: 20 20 52 75 6e 20 63 72 61 73 68 2e 74 65 73 74 Run crash.test
63f0: 20 69 6e 20 61 75 74 6f 76 61 63 75 75 6d 20 6d in autovacuum m
6400: 6f 64 65 2e 0a 7d 20 2d 70 72 65 73 71 6c 20 7b ode..} -presql {
6410: 0a 20 20 70 72 61 67 6d 61 20 61 75 74 6f 5f 76 . pragma auto_v
6420: 61 63 75 75 6d 20 3d 20 31 0a 7d 20 2d 66 69 6c acuum = 1.} -fil
6430: 65 73 20 63 72 61 73 68 2e 74 65 73 74 0a 0a 23 es crash.test..#
6440: 20 52 75 6e 20 73 6f 6d 65 20 69 6f 65 72 72 2d Run some ioerr-
6450: 74 65 73 74 73 20 69 6e 20 61 75 74 6f 76 61 63 tests in autovac
6460: 75 75 6d 20 6d 6f 64 65 2e 0a 23 0a 74 65 73 74 uum mode..#.test
6470: 5f 73 75 69 74 65 20 22 61 75 74 6f 76 61 63 75 _suite "autovacu
6480: 75 6d 5f 69 6f 65 72 72 22 20 2d 64 65 73 63 72 um_ioerr" -descr
6490: 69 70 74 69 6f 6e 20 7b 0a 20 20 52 75 6e 20 69 iption {. Run i
64a0: 6f 65 72 72 2e 74 65 73 74 20 69 6e 20 61 75 74 oerr.test in aut
64b0: 6f 76 61 63 75 75 6d 20 6d 6f 64 65 2e 0a 7d 20 ovacuum mode..}
64c0: 2d 70 72 65 73 71 6c 20 7b 0a 20 20 70 72 61 67 -presql {. prag
64d0: 6d 61 20 61 75 74 6f 5f 76 61 63 75 75 6d 20 3d ma auto_vacuum =
64e0: 20 31 0a 7d 20 2d 66 69 6c 65 73 20 69 6f 65 72 1.} -files ioer
64f0: 72 2e 74 65 73 74 0a 0a 23 20 52 75 6e 20 74 65 r.test..# Run te
6500: 73 74 73 20 77 69 74 68 20 61 6e 20 69 6e 2d 6d sts with an in-m
6510: 65 6d 6f 72 79 20 6a 6f 75 72 6e 61 6c 2e 0a 23 emory journal..#
6520: 0a 74 65 73 74 5f 73 75 69 74 65 20 22 69 6e 6d .test_suite "inm
6530: 65 6d 6f 72 79 5f 6a 6f 75 72 6e 61 6c 22 20 2d emory_journal" -
6540: 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 description {.
6550: 52 75 6e 20 74 65 73 74 73 20 77 69 74 68 20 61 Run tests with a
6560: 6e 20 69 6e 2d 6d 65 6d 6f 72 79 20 6a 6f 75 72 n in-memory jour
6570: 6e 61 6c 20 66 69 6c 65 2e 0a 7d 20 2d 70 72 65 nal file..} -pre
6580: 73 71 6c 20 7b 0a 20 20 70 72 61 67 6d 61 20 6a sql {. pragma j
6590: 6f 75 72 6e 61 6c 5f 6d 6f 64 65 20 3d 20 27 6d ournal_mode = 'm
65a0: 65 6d 6f 72 79 27 0a 7d 20 2d 66 69 6c 65 73 20 emory'.} -files
65b0: 5b 74 65 73 74 5f 73 65 74 20 24 3a 3a 61 6c 6c [test_set $::all
65c0: 71 75 69 63 6b 74 65 73 74 73 20 2d 65 78 63 6c quicktests -excl
65d0: 75 64 65 20 7b 0a 20 20 23 20 45 78 63 6c 75 64 ude {. # Exclud
65e0: 65 20 61 6c 6c 20 74 65 73 74 73 20 74 68 61 74 e all tests that
65f0: 20 73 69 6d 75 6c 61 74 65 20 49 4f 20 65 72 72 simulate IO err
6600: 6f 72 73 2e 0a 20 20 61 75 74 6f 76 61 63 75 75 ors.. autovacuu
6610: 6d 5f 69 6f 65 72 72 32 2e 74 65 73 74 20 63 66 m_ioerr2.test cf
6620: 66 61 75 6c 74 2e 74 65 73 74 20 69 6e 63 72 76 fault.test incrv
6630: 61 63 75 75 6d 5f 69 6f 65 72 72 2e 74 65 73 74 acuum_ioerr.test
6640: 20 69 6f 65 72 72 2e 74 65 73 74 0a 20 20 69 6f ioerr.test. io
6650: 65 72 72 2e 74 65 73 74 20 69 6f 65 72 72 32 2e err.test ioerr2.
6660: 74 65 73 74 20 69 6f 65 72 72 33 2e 74 65 73 74 test ioerr3.test
6670: 20 69 6f 65 72 72 34 2e 74 65 73 74 20 69 6f 65 ioerr4.test ioe
6680: 72 72 35 2e 74 65 73 74 0a 20 20 76 61 63 75 75 rr5.test. vacuu
6690: 6d 33 2e 74 65 73 74 20 69 6e 63 72 62 6c 6f 62 m3.test incrblob
66a0: 5f 65 72 72 2e 74 65 73 74 20 64 69 73 6b 66 75 _err.test diskfu
66b0: 6c 6c 2e 74 65 73 74 20 62 61 63 6b 75 70 5f 69 ll.test backup_i
66c0: 6f 65 72 72 2e 74 65 73 74 0a 20 20 65 5f 66 74 oerr.test. e_ft
66d0: 73 33 2e 74 65 73 74 20 66 74 73 33 63 6f 76 2e s3.test fts3cov.
66e0: 74 65 73 74 20 66 74 73 33 6d 61 6c 6c 6f 63 2e test fts3malloc.
66f0: 74 65 73 74 20 66 74 73 33 72 6e 64 2e 74 65 73 test fts3rnd.tes
6700: 74 0a 20 20 66 74 73 33 73 6e 69 70 70 65 74 2e t. fts3snippet.
6710: 74 65 73 74 20 6d 6d 61 70 66 61 75 6c 74 2e 74 test mmapfault.t
6720: 65 73 74 20 73 65 73 73 69 6f 6e 66 61 75 6c 74 est sessionfault
6730: 2e 74 65 73 74 20 73 65 73 73 69 6f 6e 66 61 75 .test sessionfau
6740: 6c 74 32 2e 74 65 73 74 0a 0a 20 20 23 20 45 78 lt2.test.. # Ex
6750: 63 6c 75 64 65 20 74 65 73 74 20 73 63 72 69 70 clude test scrip
6760: 74 73 20 74 68 61 74 20 75 73 65 20 74 63 6c 20 ts that use tcl
6770: 49 4f 20 74 6f 20 61 63 63 65 73 73 20 6a 6f 75 IO to access jou
6780: 72 6e 61 6c 20 66 69 6c 65 73 20 6f 72 20 63 6f rnal files or co
6790: 75 6e 74 0a 20 20 23 20 74 68 65 20 6e 75 6d 62 unt. # the numb
67a0: 65 72 20 6f 66 20 66 73 79 6e 63 28 29 20 63 61 er of fsync() ca
67b0: 6c 6c 73 2e 0a 20 20 70 61 67 65 72 2e 74 65 73 lls.. pager.tes
67c0: 74 20 65 78 63 6c 75 73 69 76 65 2e 74 65 73 74 t exclusive.test
67d0: 20 6a 72 6e 6c 6d 6f 64 65 2e 74 65 73 74 20 73 jrnlmode.test s
67e0: 79 6e 63 2e 74 65 73 74 20 6d 69 73 63 31 2e 74 ync.test misc1.t
67f0: 65 73 74 20 0a 20 20 6a 6f 75 72 6e 61 6c 31 2e est . journal1.
6800: 74 65 73 74 20 63 6f 6e 66 6c 69 63 74 2e 74 65 test conflict.te
6810: 73 74 20 63 72 61 73 68 38 2e 74 65 73 74 20 74 st crash8.test t
6820: 6b 74 33 34 35 37 2e 74 65 73 74 20 69 6f 2e 74 kt3457.test io.t
6830: 65 73 74 0a 20 20 6a 6f 75 72 6e 61 6c 33 2e 74 est. journal3.t
6840: 65 73 74 20 38 5f 33 5f 6e 61 6d 65 73 2e 74 65 est 8_3_names.te
6850: 73 74 20 73 68 6d 6c 6f 63 6b 2e 74 65 73 74 0a st shmlock.test.
6860: 0a 20 20 70 61 67 65 72 31 2e 74 65 73 74 20 61 . pager1.test a
6870: 73 79 6e 63 34 2e 74 65 73 74 20 63 6f 72 72 75 sync4.test corru
6880: 70 74 2e 74 65 73 74 20 66 69 6c 65 66 6d 74 2e pt.test filefmt.
6890: 74 65 73 74 20 70 61 67 65 72 32 2e 74 65 73 74 test pager2.test
68a0: 0a 20 20 63 6f 72 72 75 70 74 35 2e 74 65 73 74 . corrupt5.test
68b0: 20 63 6f 72 72 75 70 74 41 2e 74 65 73 74 20 70 corruptA.test p
68c0: 61 67 65 72 6f 70 74 2e 74 65 73 74 0a 0a 20 20 ageropt.test..
68d0: 23 20 45 78 63 6c 75 64 65 20 73 74 6d 74 2e 74 # Exclude stmt.t
68e0: 65 73 74 2c 20 77 68 69 63 68 20 65 78 70 65 63 est, which expec
68f0: 74 73 20 73 75 62 2d 6a 6f 75 72 6e 61 6c 73 20 ts sub-journals
6900: 74 6f 20 75 73 65 20 74 65 6d 70 6f 72 61 72 79 to use temporary
6910: 20 66 69 6c 65 73 2e 0a 20 20 73 74 6d 74 2e 74 files.. stmt.t
6920: 65 73 74 20 73 79 6d 6c 69 6e 6b 2e 74 65 73 74 est symlink.test
6930: 0a 0a 20 20 7a 65 72 6f 64 61 6d 61 67 65 2e 74 .. zerodamage.t
6940: 65 73 74 0a 0a 20 20 23 20 57 41 4c 20 6d 6f 64 est.. # WAL mod
6950: 65 20 69 73 20 64 69 66 66 65 72 65 6e 74 2e 0a e is different..
6960: 20 20 77 61 6c 2a 20 74 6b 74 2d 32 64 31 61 35 wal* tkt-2d1a5
6970: 63 36 37 64 2e 74 65 73 74 20 62 61 63 6b 63 6f c67d.test backco
6980: 6d 70 61 74 2e 74 65 73 74 20 65 5f 77 61 6c 2a mpat.test e_wal*
6990: 20 72 6f 77 61 6c 6c 6f 63 6b 2e 74 65 73 74 0a rowallock.test.
69a0: 0a 20 20 23 20 54 68 69 73 20 74 65 73 74 20 64 . # This test d
69b0: 6f 65 73 20 6e 6f 74 20 77 6f 72 6b 20 61 73 20 oes not work as
69c0: 74 68 65 20 22 50 52 41 47 4d 41 20 6a 6f 75 72 the "PRAGMA jour
69d0: 6e 61 6c 5f 6d 6f 64 65 20 3d 20 6d 65 6d 6f 72 nal_mode = memor
69e0: 79 22 0a 20 20 23 20 73 74 61 74 65 6d 65 6e 74 y". # statement
69f0: 20 73 77 69 74 63 68 65 73 20 74 68 65 20 64 61 switches the da
6a00: 74 61 62 61 73 65 20 6f 75 74 20 6f 66 20 77 61 tabase out of wa
6a10: 6c 20 6d 6f 64 65 20 61 74 20 69 6e 6f 70 70 6f l mode at inoppo
6a20: 72 74 75 6e 65 0a 20 20 23 20 74 69 6d 65 73 2e rtune. # times.
6a30: 0a 20 20 73 6e 61 70 73 68 6f 74 5f 66 61 75 6c . snapshot_faul
6a40: 74 2e 74 65 73 74 0a 20 20 0a 20 20 23 20 54 68 t.test. . # Th
6a50: 69 73 20 74 65 73 74 20 61 73 73 75 6d 65 73 20 is test assumes
6a60: 61 20 6a 6f 75 72 6e 61 6c 20 66 69 6c 65 20 69 a journal file i
6a70: 73 20 63 72 65 61 74 65 64 20 6f 6e 20 64 69 73 s created on dis
6a80: 6b 2e 0a 20 20 64 65 6c 65 74 65 5f 64 62 2e 74 k.. delete_db.t
6a90: 65 73 74 0a 20 20 0a 20 20 23 20 54 68 69 73 20 est. . # This
6aa0: 74 65 73 74 20 64 65 70 65 6e 64 73 20 6f 6e 20 test depends on
6ab0: 61 20 73 75 63 63 65 73 73 66 75 6c 20 72 65 63 a successful rec
6ac0: 6f 76 65 72 79 20 66 72 6f 6d 20 74 68 65 20 70 overy from the p
6ad0: 61 67 65 72 20 65 72 72 6f 72 20 0a 20 20 23 20 ager error . #
6ae0: 73 74 61 74 65 2e 20 57 68 69 63 68 20 69 73 20 state. Which is
6af0: 6e 6f 74 20 70 6f 73 73 69 62 6c 65 20 77 69 74 not possible wit
6b00: 68 20 61 6e 20 69 6e 2d 6d 65 6d 6f 72 79 20 6a h an in-memory j
6b10: 6f 75 72 6e 61 6c 0a 20 20 66 74 73 35 66 61 75 ournal. fts5fau
6b20: 6c 74 31 2e 74 65 73 74 0a 7d 5d 0a 0a 69 66 63 lt1.test.}]..ifc
6b30: 61 70 61 62 6c 65 20 6d 65 6d 33 20 7b 0a 20 20 apable mem3 {.
6b40: 74 65 73 74 5f 73 75 69 74 65 20 22 6d 65 6d 73 test_suite "mems
6b50: 79 73 33 22 20 2d 64 65 73 63 72 69 70 74 69 6f ys3" -descriptio
6b60: 6e 20 7b 0a 20 20 20 20 52 75 6e 20 74 65 73 74 n {. Run test
6b70: 73 20 75 73 69 6e 67 20 74 68 65 20 61 6c 6c 6f s using the allo
6b80: 63 61 74 6f 72 20 69 6e 20 6d 65 6d 33 2e 63 2e cator in mem3.c.
6b90: 0a 20 20 7d 20 2d 66 69 6c 65 73 20 5b 74 65 73 . } -files [tes
6ba0: 74 5f 73 65 74 20 24 3a 3a 61 6c 6c 71 75 69 63 t_set $::allquic
6bb0: 6b 74 65 73 74 73 20 2d 65 78 63 6c 75 64 65 20 ktests -exclude
6bc0: 7b 0a 20 20 20 20 61 75 74 6f 76 61 63 75 75 6d {. autovacuum
6bd0: 2e 74 65 73 74 20 20 20 20 20 20 20 20 20 20 20 .test
6be0: 64 65 6c 65 74 65 33 2e 74 65 73 74 20 20 20 20 delete3.test
6bf0: 20 20 20 20 20 20 20 20 20 20 6d 61 6e 79 64 62 manydb
6c00: 2e 74 65 73 74 0a 20 20 20 20 62 69 67 72 6f 77 .test. bigrow
6c10: 2e 74 65 73 74 20 20 20 20 20 20 20 20 20 20 20 .test
6c20: 20 20 20 20 69 6e 63 72 62 6c 6f 62 32 2e 74 65 incrblob2.te
6c30: 73 74 20 20 20 20 20 20 20 20 20 20 20 20 6d 65 st me
6c40: 6d 64 62 2e 74 65 73 74 0a 20 20 20 20 62 69 74 mdb.test. bit
6c50: 76 65 63 2e 74 65 73 74 20 20 20 20 20 20 20 20 vec.test
6c60: 20 20 20 20 20 20 20 69 6e 64 65 78 32 2e 74 65 index2.te
6c70: 73 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 st
6c80: 20 6d 65 6d 73 75 62 73 79 73 31 2e 74 65 73 74 memsubsys1.test
6c90: 0a 20 20 20 20 63 61 70 69 33 63 2e 74 65 73 74 . capi3c.test
6ca0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 i
6cb0: 6f 65 72 72 2e 74 65 73 74 20 20 20 20 20 20 20 oerr.test
6cc0: 20 20 20 20 20 20 20 20 20 6d 65 6d 73 75 62 73 memsubs
6cd0: 79 73 32 2e 74 65 73 74 0a 20 20 20 20 63 61 70 ys2.test. cap
6ce0: 69 33 2e 74 65 73 74 20 20 20 20 20 20 20 20 20 i3.test
6cf0: 20 20 20 20 20 20 20 6a 6f 69 6e 33 2e 74 65 73 join3.tes
6d00: 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t
6d10: 20 70 61 67 65 73 69 7a 65 2e 74 65 73 74 0a 20 pagesize.test.
6d20: 20 20 20 63 6f 6c 6c 61 74 65 35 2e 74 65 73 74 collate5.test
6d30: 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 69 6d lim
6d40: 69 74 2e 74 65 73 74 20 20 20 20 20 20 20 20 20 it.test
6d50: 20 20 20 20 20 20 20 62 61 63 6b 75 70 5f 69 6f backup_io
6d60: 65 72 72 2e 74 65 73 74 0a 20 20 20 20 62 61 63 err.test. bac
6d70: 6b 75 70 5f 6d 61 6c 6c 6f 63 2e 74 65 73 74 0a kup_malloc.test.
6d80: 20 20 7d 5d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 }] -initialize
6d90: 20 7b 0a 20 20 20 20 63 61 74 63 68 20 7b 64 62 {. catch {db
6da0: 20 63 6c 6f 73 65 7d 0a 20 20 20 20 73 71 6c 69 close}. sqli
6db0: 74 65 33 5f 72 65 73 65 74 5f 61 75 74 6f 5f 65 te3_reset_auto_e
6dc0: 78 74 65 6e 73 69 6f 6e 0a 20 20 20 20 73 71 6c xtension. sql
6dd0: 69 74 65 33 5f 73 68 75 74 64 6f 77 6e 0a 20 20 ite3_shutdown.
6de0: 20 20 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 67 sqlite3_config
6df0: 5f 68 65 61 70 20 32 35 30 30 30 30 30 30 20 30 _heap 25000000 0
6e00: 0a 20 20 20 20 73 71 6c 69 74 65 33 5f 63 6f 6e . sqlite3_con
6e10: 66 69 67 5f 6c 6f 6f 6b 61 73 69 64 65 20 30 20 fig_lookaside 0
6e20: 30 0a 20 20 20 20 69 66 63 61 70 61 62 6c 65 20 0. ifcapable
6e30: 6d 65 6d 35 20 7b 0a 20 20 20 20 20 20 23 20 49 mem5 {. # I
6e40: 66 20 62 6f 74 68 20 6d 65 6d 73 79 73 33 20 61 f both memsys3 a
6e50: 6e 64 20 6d 65 6d 73 79 73 35 20 61 72 65 20 65 nd memsys5 are e
6e60: 6e 61 62 6c 65 64 20 69 6e 20 74 68 65 20 62 75 nabled in the bu
6e70: 69 6c 64 2c 20 74 68 65 20 63 61 6c 6c 20 74 6f ild, the call to
6e80: 0a 20 20 20 20 20 20 23 20 5b 73 71 6c 69 74 65 . # [sqlite
6e90: 33 5f 63 6f 6e 66 69 67 5f 68 65 61 70 5d 20 77 3_config_heap] w
6ea0: 69 6c 6c 20 69 6e 69 74 69 61 6c 69 7a 65 20 74 ill initialize t
6eb0: 68 65 20 73 79 73 74 65 6d 20 74 6f 20 75 73 65 he system to use
6ec0: 20 6d 65 6d 73 79 73 35 2e 0a 20 20 20 20 20 20 memsys5..
6ed0: 23 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 # The following
6ee0: 6f 76 65 72 72 69 64 65 73 20 74 68 69 73 20 70 overrides this p
6ef0: 72 65 66 65 72 65 6e 63 65 20 61 6e 64 20 69 6e reference and in
6f00: 73 74 61 6c 6c 73 20 74 68 65 20 6d 65 6d 73 79 stalls the memsy
6f10: 73 33 0a 20 20 20 20 20 20 23 20 61 6c 6c 6f 63 s3. # alloc
6f20: 61 74 6f 72 2e 0a 20 20 20 20 20 20 73 71 6c 69 ator.. sqli
6f30: 74 65 33 5f 69 6e 73 74 61 6c 6c 5f 6d 65 6d 73 te3_install_mems
6f40: 79 73 33 0a 20 20 20 20 7d 0a 20 20 20 20 69 6e ys3. }. in
6f50: 73 74 61 6c 6c 5f 6d 61 6c 6c 6f 63 5f 66 61 75 stall_malloc_fau
6f60: 6c 74 73 69 6d 20 31 20 0a 20 20 20 20 73 71 6c ltsim 1 . sql
6f70: 69 74 65 33 5f 69 6e 69 74 69 61 6c 69 7a 65 0a ite3_initialize.
6f80: 20 20 20 20 61 75 74 6f 69 6e 73 74 61 6c 6c 5f autoinstall_
6f90: 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 73 0a 20 test_functions.
6fa0: 20 7d 20 2d 73 68 75 74 64 6f 77 6e 20 7b 0a 20 } -shutdown {.
6fb0: 20 20 20 63 61 74 63 68 20 7b 64 62 20 63 6c 6f catch {db clo
6fc0: 73 65 7d 0a 20 20 20 20 73 71 6c 69 74 65 33 5f se}. sqlite3_
6fd0: 73 68 75 74 64 6f 77 6e 0a 20 20 20 20 73 71 6c shutdown. sql
6fe0: 69 74 65 33 5f 63 6f 6e 66 69 67 5f 68 65 61 70 ite3_config_heap
6ff0: 20 30 20 30 0a 20 20 20 20 73 71 6c 69 74 65 33 0 0. sqlite3
7000: 5f 63 6f 6e 66 69 67 5f 6c 6f 6f 6b 61 73 69 64 _config_lookasid
7010: 65 20 31 30 30 20 35 30 30 0a 20 20 20 20 69 6e e 100 500. in
7020: 73 74 61 6c 6c 5f 6d 61 6c 6c 6f 63 5f 66 61 75 stall_malloc_fau
7030: 6c 74 73 69 6d 20 31 20 0a 20 20 20 20 73 71 6c ltsim 1 . sql
7040: 69 74 65 33 5f 69 6e 69 74 69 61 6c 69 7a 65 0a ite3_initialize.
7050: 20 20 20 20 61 75 74 6f 69 6e 73 74 61 6c 6c 5f autoinstall_
7060: 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 73 0a 20 test_functions.
7070: 20 7d 0a 7d 0a 0a 69 66 63 61 70 61 62 6c 65 20 }.}..ifcapable
7080: 6d 65 6d 35 20 7b 0a 20 20 74 65 73 74 5f 73 75 mem5 {. test_su
7090: 69 74 65 20 22 6d 65 6d 73 79 73 35 22 20 2d 64 ite "memsys5" -d
70a0: 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 20 escription {.
70b0: 20 52 75 6e 20 74 65 73 74 73 20 75 73 69 6e 67 Run tests using
70c0: 20 74 68 65 20 61 6c 6c 6f 63 61 74 6f 72 20 69 the allocator i
70d0: 6e 20 6d 65 6d 35 2e 63 2e 0a 20 20 7d 20 2d 66 n mem5.c.. } -f
70e0: 69 6c 65 73 20 5b 74 65 73 74 5f 73 65 74 20 24 iles [test_set $
70f0: 3a 3a 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 20 ::allquicktests
7100: 2d 65 78 63 6c 75 64 65 20 7b 0a 20 20 20 20 61 -exclude {. a
7110: 75 74 6f 76 61 63 75 75 6d 2e 74 65 73 74 20 20 utovacuum.test
7120: 20 20 20 20 20 20 20 20 20 64 65 6c 65 74 65 33 delete3
7130: 2e 74 65 73 74 20 20 20 20 20 20 20 20 20 20 20 .test
7140: 20 20 20 6d 61 6e 79 64 62 2e 74 65 73 74 0a 20 manydb.test.
7150: 20 20 20 62 69 67 72 6f 77 2e 74 65 73 74 20 20 bigrow.test
7160: 20 20 20 20 20 20 20 20 20 20 20 20 20 69 6e 63 inc
7170: 72 62 6c 6f 62 32 2e 74 65 73 74 20 20 20 20 20 rblob2.test
7180: 20 20 20 20 20 20 20 6d 65 6d 64 62 2e 74 65 73 memdb.tes
7190: 74 0a 20 20 20 20 62 69 74 76 65 63 2e 74 65 73 t. bitvec.tes
71a0: 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 t
71b0: 69 6e 64 65 78 32 2e 74 65 73 74 20 20 20 20 20 index2.test
71c0: 20 20 20 20 20 20 20 20 20 20 6d 65 6d 73 75 62 memsub
71d0: 73 79 73 31 2e 74 65 73 74 0a 20 20 20 20 63 61 sys1.test. ca
71e0: 70 69 33 63 2e 74 65 73 74 20 20 20 20 20 20 20 pi3c.test
71f0: 20 20 20 20 20 20 20 20 69 6f 65 72 72 2e 74 65 ioerr.te
7200: 73 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 st
7210: 20 20 6d 65 6d 73 75 62 73 79 73 32 2e 74 65 73 memsubsys2.tes
7220: 74 0a 20 20 20 20 63 61 70 69 33 2e 74 65 73 74 t. capi3.test
7230: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
7240: 6a 6f 69 6e 33 2e 74 65 73 74 20 20 20 20 20 20 join3.test
7250: 20 20 20 20 20 20 20 20 20 20 70 61 67 65 73 69 pagesi
7260: 7a 65 2e 74 65 73 74 0a 20 20 20 20 63 6f 6c 6c ze.test. coll
7270: 61 74 65 35 2e 74 65 73 74 20 20 20 20 20 20 20 ate5.test
7280: 20 20 20 20 20 20 6c 69 6d 69 74 2e 74 65 73 74 limit.test
7290: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
72a0: 7a 65 72 6f 62 6c 6f 62 2e 74 65 73 74 0a 20 20 zeroblob.test.
72b0: 7d 5d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 20 7b }] -initialize {
72c0: 0a 20 20 20 20 63 61 74 63 68 20 7b 64 62 20 63 . catch {db c
72d0: 6c 6f 73 65 7d 0a 20 20 20 20 73 71 6c 69 74 65 lose}. sqlite
72e0: 33 5f 73 68 75 74 64 6f 77 6e 0a 20 20 20 20 73 3_shutdown. s
72f0: 71 6c 69 74 65 33 5f 63 6f 6e 66 69 67 5f 68 65 qlite3_config_he
7300: 61 70 20 32 35 30 30 30 30 30 30 20 36 34 0a 20 ap 25000000 64.
7310: 20 20 20 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 sqlite3_confi
7320: 67 5f 6c 6f 6f 6b 61 73 69 64 65 20 30 20 30 0a g_lookaside 0 0.
7330: 20 20 20 20 69 6e 73 74 61 6c 6c 5f 6d 61 6c 6c install_mall
7340: 6f 63 5f 66 61 75 6c 74 73 69 6d 20 31 20 0a 20 oc_faultsim 1 .
7350: 20 20 20 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 sqlite3_initi
7360: 61 6c 69 7a 65 0a 20 20 20 20 61 75 74 6f 69 6e alize. autoin
7370: 73 74 61 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 74 stall_test_funct
7380: 69 6f 6e 73 0a 20 20 7d 20 2d 73 68 75 74 64 6f ions. } -shutdo
7390: 77 6e 20 7b 0a 20 20 20 20 63 61 74 63 68 20 7b wn {. catch {
73a0: 64 62 20 63 6c 6f 73 65 7d 0a 20 20 20 20 73 71 db close}. sq
73b0: 6c 69 74 65 33 5f 73 68 75 74 64 6f 77 6e 0a 20 lite3_shutdown.
73c0: 20 20 20 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 sqlite3_confi
73d0: 67 5f 68 65 61 70 20 30 20 30 0a 20 20 20 20 73 g_heap 0 0. s
73e0: 71 6c 69 74 65 33 5f 63 6f 6e 66 69 67 5f 6c 6f qlite3_config_lo
73f0: 6f 6b 61 73 69 64 65 20 31 30 30 20 35 30 30 0a okaside 100 500.
7400: 20 20 20 20 69 6e 73 74 61 6c 6c 5f 6d 61 6c 6c install_mall
7410: 6f 63 5f 66 61 75 6c 74 73 69 6d 20 31 20 0a 20 oc_faultsim 1 .
7420: 20 20 20 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 sqlite3_initi
7430: 61 6c 69 7a 65 0a 20 20 20 20 61 75 74 6f 69 6e alize. autoin
7440: 73 74 61 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 74 stall_test_funct
7450: 69 6f 6e 73 0a 20 20 7d 0a 0a 20 20 74 65 73 74 ions. }.. test
7460: 5f 73 75 69 74 65 20 22 6d 65 6d 73 79 73 35 2d _suite "memsys5-
7470: 32 22 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 2" -description
7480: 7b 0a 20 20 20 20 52 75 6e 20 74 65 73 74 73 20 {. Run tests
7490: 75 73 69 6e 67 20 74 68 65 20 61 6c 6c 6f 63 61 using the alloca
74a0: 74 6f 72 20 69 6e 20 6d 65 6d 35 2e 63 20 69 6e tor in mem5.c in
74b0: 20 61 20 64 69 66 66 65 72 65 6e 74 20 63 6f 6e a different con
74c0: 66 69 67 75 72 61 74 69 6f 6e 2e 0a 20 20 7d 20 figuration.. }
74d0: 2d 66 69 6c 65 73 20 7b 0a 20 20 20 20 73 65 6c -files {. sel
74e0: 65 63 74 31 2e 74 65 73 74 20 0a 20 20 7d 20 2d ect1.test . } -
74f0: 69 6e 69 74 69 61 6c 69 7a 65 20 7b 0a 20 20 20 initialize {.
7500: 20 63 61 74 63 68 20 7b 64 62 20 63 6c 6f 73 65 catch {db close
7510: 7d 0a 20 20 20 20 73 71 6c 69 74 65 33 5f 73 68 }. sqlite3_sh
7520: 75 74 64 6f 77 6e 0a 20 20 20 20 73 71 6c 69 74 utdown. sqlit
7530: 65 33 5f 63 6f 6e 66 69 67 5f 6d 65 6d 73 74 61 e3_config_memsta
7540: 74 75 73 20 30 0a 20 20 20 20 73 71 6c 69 74 65 tus 0. sqlite
7550: 33 5f 63 6f 6e 66 69 67 5f 68 65 61 70 20 34 30 3_config_heap 40
7560: 30 30 30 30 30 30 20 31 36 0a 20 20 20 20 73 71 000000 16. sq
7570: 6c 69 74 65 33 5f 63 6f 6e 66 69 67 5f 6c 6f 6f lite3_config_loo
7580: 6b 61 73 69 64 65 20 30 20 30 0a 20 20 20 20 69 kaside 0 0. i
7590: 6e 73 74 61 6c 6c 5f 6d 61 6c 6c 6f 63 5f 66 61 nstall_malloc_fa
75a0: 75 6c 74 73 69 6d 20 31 20 0a 20 20 20 20 73 71 ultsim 1 . sq
75b0: 6c 69 74 65 33 5f 69 6e 69 74 69 61 6c 69 7a 65 lite3_initialize
75c0: 0a 20 20 20 20 61 75 74 6f 69 6e 73 74 61 6c 6c . autoinstall
75d0: 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 73 0a _test_functions.
75e0: 20 20 7d 20 2d 73 68 75 74 64 6f 77 6e 20 7b 0a } -shutdown {.
75f0: 20 20 20 20 63 61 74 63 68 20 7b 64 62 20 63 6c catch {db cl
7600: 6f 73 65 7d 0a 20 20 20 20 73 71 6c 69 74 65 33 ose}. sqlite3
7610: 5f 73 68 75 74 64 6f 77 6e 0a 20 20 20 20 73 71 _shutdown. sq
7620: 6c 69 74 65 33 5f 63 6f 6e 66 69 67 5f 68 65 61 lite3_config_hea
7630: 70 20 30 20 30 0a 20 20 20 20 73 71 6c 69 74 65 p 0 0. sqlite
7640: 33 5f 63 6f 6e 66 69 67 5f 6c 6f 6f 6b 61 73 69 3_config_lookasi
7650: 64 65 20 31 30 30 20 35 30 30 0a 20 20 20 20 69 de 100 500. i
7660: 6e 73 74 61 6c 6c 5f 6d 61 6c 6c 6f 63 5f 66 61 nstall_malloc_fa
7670: 75 6c 74 73 69 6d 20 31 20 0a 20 20 20 20 73 71 ultsim 1 . sq
7680: 6c 69 74 65 33 5f 69 6e 69 74 69 61 6c 69 7a 65 lite3_initialize
7690: 0a 20 20 20 20 61 75 74 6f 69 6e 73 74 61 6c 6c . autoinstall
76a0: 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f 6e 73 0a _test_functions.
76b0: 20 20 7d 0a 7d 0a 0a 69 66 63 61 70 61 62 6c 65 }.}..ifcapable
76c0: 20 74 68 72 65 61 64 73 61 66 65 20 7b 0a 20 20 threadsafe {.
76d0: 74 65 73 74 5f 73 75 69 74 65 20 22 6e 6f 5f 6d test_suite "no_m
76e0: 75 74 65 78 5f 74 72 79 22 20 2d 64 65 73 63 72 utex_try" -descr
76f0: 69 70 74 69 6f 6e 20 7b 0a 20 20 20 20 20 54 68 iption {. Th
7700: 65 20 73 71 6c 69 74 65 33 5f 6d 75 74 65 78 5f e sqlite3_mutex_
7710: 74 72 79 28 29 20 69 6e 74 65 72 66 61 63 65 20 try() interface
7720: 61 6c 77 61 79 73 20 66 61 69 6c 73 0a 20 20 7d always fails. }
7730: 20 2d 66 69 6c 65 73 20 5b 0a 20 20 20 20 74 65 -files [. te
7740: 73 74 5f 73 65 74 20 24 3a 3a 61 6c 6c 71 75 69 st_set $::allqui
7750: 63 6b 74 65 73 74 73 20 2d 65 78 63 6c 75 64 65 cktests -exclude
7760: 20 6d 75 74 65 78 31 2e 74 65 73 74 20 6d 75 74 mutex1.test mut
7770: 65 78 32 2e 74 65 73 74 0a 20 20 5d 20 2d 69 6e ex2.test. ] -in
7780: 69 74 69 61 6c 69 7a 65 20 7b 0a 20 20 20 20 63 itialize {. c
7790: 61 74 63 68 20 7b 64 62 20 63 6c 6f 73 65 7d 0a atch {db close}.
77a0: 20 20 20 20 73 71 6c 69 74 65 33 5f 73 68 75 74 sqlite3_shut
77b0: 64 6f 77 6e 0a 20 20 20 20 69 6e 73 74 61 6c 6c down. install
77c0: 5f 6d 75 74 65 78 5f 63 6f 75 6e 74 65 72 73 20 _mutex_counters
77d0: 31 0a 20 20 20 20 73 65 74 20 3a 3a 64 69 73 61 1. set ::disa
77e0: 62 6c 65 5f 6d 75 74 65 78 5f 74 72 79 20 31 0a ble_mutex_try 1.
77f0: 20 20 20 20 73 71 6c 69 74 65 33 5f 69 6e 69 74 sqlite3_init
7800: 69 61 6c 69 7a 65 0a 20 20 20 20 61 75 74 6f 69 ialize. autoi
7810: 6e 73 74 61 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 nstall_test_func
7820: 74 69 6f 6e 73 0a 20 20 7d 20 2d 73 68 75 74 64 tions. } -shutd
7830: 6f 77 6e 20 7b 0a 20 20 20 20 63 61 74 63 68 20 own {. catch
7840: 7b 64 62 20 63 6c 6f 73 65 7d 0a 20 20 20 20 73 {db close}. s
7850: 71 6c 69 74 65 33 5f 73 68 75 74 64 6f 77 6e 0a qlite3_shutdown.
7860: 20 20 20 20 69 6e 73 74 61 6c 6c 5f 6d 75 74 65 install_mute
7870: 78 5f 63 6f 75 6e 74 65 72 73 20 30 0a 20 20 20 x_counters 0.
7880: 20 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 61 6c sqlite3_initial
7890: 69 7a 65 0a 20 20 20 20 61 75 74 6f 69 6e 73 74 ize. autoinst
78a0: 61 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f all_test_functio
78b0: 6e 73 0a 20 20 7d 0a 7d 0a 0a 23 20 72 75 6e 5f ns. }.}..# run_
78c0: 74 65 73 74 73 20 22 63 72 61 73 68 5f 73 61 66 tests "crash_saf
78d0: 65 5f 61 70 70 65 6e 64 22 20 2d 64 65 73 63 72 e_append" -descr
78e0: 69 70 74 69 6f 6e 20 7b 0a 23 20 20 20 52 75 6e iption {.# Run
78f0: 20 63 72 61 73 68 2e 74 65 73 74 20 77 69 74 68 crash.test with
7900: 20 70 65 72 73 69 73 74 65 6e 74 20 6a 6f 75 72 persistent jour
7910: 6e 61 6c 73 20 6f 6e 20 61 20 53 41 46 45 5f 41 nals on a SAFE_A
7920: 50 50 45 4e 44 20 66 69 6c 65 2d 73 79 73 74 65 PPEND file-syste
7930: 6d 2e 0a 23 20 7d 20 2d 69 6e 69 74 69 61 6c 69 m..# } -initiali
7940: 7a 65 20 7b 0a 23 20 20 20 72 65 6e 61 6d 65 20 ze {.# rename
7950: 63 72 61 73 68 73 71 6c 20 73 61 5f 63 72 61 73 crashsql sa_cras
7960: 68 73 71 6c 0a 23 20 20 20 70 72 6f 63 20 63 72 hsql.# proc cr
7970: 61 73 68 73 71 6c 20 7b 61 72 67 73 7d 20 7b 0a ashsql {args} {.
7980: 23 20 20 20 20 20 73 65 74 20 6f 70 74 69 6f 6e # set option
7990: 73 20 5b 6c 72 61 6e 67 65 20 24 61 72 67 73 20 s [lrange $args
79a0: 30 20 5b 65 78 70 72 20 7b 5b 6c 6c 65 6e 67 74 0 [expr {[llengt
79b0: 68 20 24 61 72 67 73 5d 2d 32 7d 5d 5d 0a 23 20 h $args]-2}]].#
79c0: 20 20 20 20 6c 61 70 70 65 6e 64 20 6f 70 74 69 lappend opti
79d0: 6f 6e 73 20 2d 63 68 61 72 20 73 61 66 65 5f 61 ons -char safe_a
79e0: 70 70 65 6e 64 0a 23 20 20 20 20 20 73 65 74 20 ppend.# set
79f0: 73 71 6c 20 5b 6c 69 6e 64 65 78 20 24 61 72 67 sql [lindex $arg
7a00: 73 20 65 6e 64 5d 0a 23 20 20 20 20 20 6c 61 70 s end].# lap
7a10: 70 65 6e 64 20 6f 70 74 69 6f 6e 73 20 22 0a 23 pend options ".#
7a20: 20 20 20 20 20 20 20 50 52 41 47 4d 41 20 6a 6f PRAGMA jo
7a30: 75 72 6e 61 6c 5f 6d 6f 64 65 3d 70 65 72 73 69 urnal_mode=persi
7a40: 73 74 65 6e 74 3b 0a 23 20 20 20 20 20 20 20 24 stent;.# $
7a50: 73 71 6c 0a 23 20 20 20 20 20 22 0a 23 20 20 20 sql.# ".#
7a60: 20 20 73 65 74 20 66 64 20 5b 6f 70 65 6e 20 74 set fd [open t
7a70: 65 73 74 2e 64 62 2d 6a 6f 75 72 6e 61 6c 20 77 est.db-journal w
7a80: 5d 0a 23 20 20 20 20 20 70 75 74 73 20 24 66 64 ].# puts $fd
7a90: 20 5b 73 74 72 69 6e 67 20 72 65 70 65 61 74 20 [string repeat
7aa0: 31 32 33 34 35 36 37 38 39 30 20 31 30 30 30 30 1234567890 10000
7ab0: 30 5d 0a 23 20 20 20 20 20 63 6c 6f 73 65 20 24 0].# close $
7ac0: 66 64 0a 23 20 20 20 20 20 65 76 61 6c 20 73 61 fd.# eval sa
7ad0: 5f 63 72 61 73 68 73 71 6c 20 24 6f 70 74 69 6f _crashsql $optio
7ae0: 6e 73 0a 23 20 20 20 7d 0a 23 20 7d 20 2d 73 68 ns.# }.# } -sh
7af0: 75 74 64 6f 77 6e 20 7b 0a 23 20 20 20 72 65 6e utdown {.# ren
7b00: 61 6d 65 20 63 72 61 73 68 73 71 6c 20 7b 7d 0a ame crashsql {}.
7b10: 23 20 20 20 72 65 6e 61 6d 65 20 73 61 5f 63 72 # rename sa_cr
7b20: 61 73 68 73 71 6c 20 63 72 61 73 68 73 71 6c 0a ashsql crashsql.
7b30: 23 20 7d 20 2d 66 69 6c 65 73 20 63 72 61 73 68 # } -files crash
7b40: 2e 74 65 73 74 0a 0a 74 65 73 74 5f 73 75 69 74 .test..test_suit
7b50: 65 20 22 73 61 66 65 5f 61 70 70 65 6e 64 22 20 e "safe_append"
7b60: 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 -description {.
7b70: 20 52 75 6e 20 73 6f 6d 65 20 74 65 73 74 73 20 Run some tests
7b80: 6f 6e 20 61 20 53 41 46 45 5f 41 50 50 45 4e 44 on a SAFE_APPEND
7b90: 20 66 69 6c 65 2d 73 79 73 74 65 6d 2e 0a 7d 20 file-system..}
7ba0: 2d 69 6e 69 74 69 61 6c 69 7a 65 20 7b 0a 20 20 -initialize {.
7bb0: 73 65 74 20 3a 3a 47 28 70 65 72 6d 3a 73 71 6c set ::G(perm:sql
7bc0: 69 74 65 33 5f 61 72 67 73 29 20 5b 6c 69 73 74 ite3_args) [list
7bd0: 20 2d 76 66 73 20 64 65 76 73 79 6d 5d 0a 20 20 -vfs devsym].
7be0: 73 71 6c 69 74 65 33 5f 73 69 6d 75 6c 61 74 65 sqlite3_simulate
7bf0: 5f 64 65 76 69 63 65 20 2d 63 68 61 72 20 73 61 _device -char sa
7c00: 66 65 5f 61 70 70 65 6e 64 0a 7d 20 2d 66 69 6c fe_append.} -fil
7c10: 65 73 20 5b 0a 20 20 74 65 73 74 5f 73 65 74 20 es [. test_set
7c20: 24 3a 3a 61 6c 6c 71 75 69 63 6b 74 65 73 74 73 $::allquicktests
7c30: 20 73 68 61 72 65 64 5f 65 72 72 2e 74 65 73 74 shared_err.test
7c40: 20 2d 65 78 63 6c 75 64 65 20 61 73 79 6e 63 33 -exclude async3
7c50: 2e 74 65 73 74 0a 5d 0a 0a 23 20 54 68 65 20 73 .test.]..# The s
7c60: 65 74 20 6f 66 20 74 65 73 74 73 20 74 6f 20 72 et of tests to r
7c70: 75 6e 20 6f 6e 20 74 68 65 20 61 6c 74 65 72 6e un on the altern
7c80: 61 74 69 76 65 2d 70 63 61 63 68 65 0a 73 65 74 ative-pcache.set
7c90: 20 70 65 72 6d 2d 61 6c 74 2d 70 63 61 63 68 65 perm-alt-pcache
7ca0: 2d 74 65 73 74 73 65 74 20 7b 0a 20 20 61 73 79 -testset {. asy
7cb0: 6e 63 2e 74 65 73 74 0a 20 20 61 74 74 61 63 68 nc.test. attach
7cc0: 2e 74 65 73 74 0a 20 20 64 65 6c 65 74 65 2e 74 .test. delete.t
7cd0: 65 73 74 20 64 65 6c 65 74 65 32 2e 74 65 73 74 est delete2.test
7ce0: 0a 20 20 69 6e 64 65 78 2e 74 65 73 74 0a 20 20 . index.test.
7cf0: 69 6e 73 65 72 74 2e 74 65 73 74 20 69 6e 73 65 insert.test inse
7d00: 72 74 32 2e 74 65 73 74 0a 20 20 6a 6f 69 6e 2e rt2.test. join.
7d10: 74 65 73 74 20 6a 6f 69 6e 32 2e 74 65 73 74 0a test join2.test.
7d20: 20 20 72 6f 6c 6c 62 61 63 6b 2e 74 65 73 74 0a rollback.test.
7d30: 20 20 73 65 6c 65 63 74 31 2e 74 65 73 74 20 73 select1.test s
7d40: 65 6c 65 63 74 32 2e 74 65 73 74 0a 20 20 74 72 elect2.test. tr
7d50: 61 6e 73 2e 74 65 73 74 0a 20 20 75 70 64 61 74 ans.test. updat
7d60: 65 2e 74 65 73 74 0a 7d 0a 0a 66 6f 72 65 61 63 e.test.}..foreac
7d70: 68 20 64 69 73 63 61 72 64 5f 72 61 74 65 20 7b h discard_rate {
7d80: 30 20 31 30 20 35 30 20 39 30 20 31 30 30 7d 20 0 10 50 90 100}
7d90: 7b 0a 20 20 74 65 73 74 5f 73 75 69 74 65 20 22 {. test_suite "
7da0: 70 63 61 63 68 65 24 7b 64 69 73 63 61 72 64 5f pcache${discard_
7db0: 72 61 74 65 7d 22 20 2d 64 65 73 63 72 69 70 74 rate}" -descript
7dc0: 69 6f 6e 20 22 0a 20 20 20 20 41 6c 74 65 72 6e ion ". Altern
7dd0: 61 74 69 76 65 20 70 63 61 63 68 65 20 69 6d 70 ative pcache imp
7de0: 6c 65 6d 65 6e 74 61 74 69 6f 6e 20 77 69 74 68 lementation with
7df0: 20 24 7b 64 69 73 63 61 72 64 5f 72 61 74 65 7d ${discard_rate}
7e00: 25 20 72 61 6e 64 6f 6d 20 64 69 73 63 61 72 64 % random discard
7e10: 0a 20 20 22 20 2d 69 6e 69 74 69 61 6c 69 7a 65 . " -initialize
7e20: 20 22 0a 20 20 20 20 63 61 74 63 68 20 7b 64 62 ". catch {db
7e30: 20 63 6c 6f 73 65 7d 0a 20 20 20 20 73 71 6c 69 close}. sqli
7e40: 74 65 33 5f 73 68 75 74 64 6f 77 6e 0a 20 20 20 te3_shutdown.
7e50: 20 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 67 5f sqlite3_config_
7e60: 61 6c 74 5f 70 63 61 63 68 65 20 31 20 24 64 69 alt_pcache 1 $di
7e70: 73 63 61 72 64 5f 72 61 74 65 20 31 0a 20 20 20 scard_rate 1.
7e80: 20 73 71 6c 69 74 65 33 5f 69 6e 69 74 69 61 6c sqlite3_initial
7e90: 69 7a 65 0a 20 20 20 20 61 75 74 6f 69 6e 73 74 ize. autoinst
7ea0: 61 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 74 69 6f all_test_functio
7eb0: 6e 73 0a 20 20 22 20 2d 73 68 75 74 64 6f 77 6e ns. " -shutdown
7ec0: 20 7b 0a 20 20 20 20 63 61 74 63 68 20 7b 64 62 {. catch {db
7ed0: 20 63 6c 6f 73 65 7d 0a 20 20 20 20 73 71 6c 69 close}. sqli
7ee0: 74 65 33 5f 73 68 75 74 64 6f 77 6e 0a 20 20 20 te3_shutdown.
7ef0: 20 73 71 6c 69 74 65 33 5f 63 6f 6e 66 69 67 5f sqlite3_config_
7f00: 61 6c 74 5f 70 63 61 63 68 65 20 30 20 30 20 30 alt_pcache 0 0 0
7f10: 0a 20 20 20 20 73 71 6c 69 74 65 33 5f 63 6f 6e . sqlite3_con
7f20: 66 69 67 5f 6c 6f 6f 6b 61 73 69 64 65 20 31 30 fig_lookaside 10
7f30: 30 20 35 30 30 0a 20 20 20 20 69 6e 73 74 61 6c 0 500. instal
7f40: 6c 5f 6d 61 6c 6c 6f 63 5f 66 61 75 6c 74 73 69 l_malloc_faultsi
7f50: 6d 20 31 20 0a 20 20 20 20 73 71 6c 69 74 65 33 m 1 . sqlite3
7f60: 5f 69 6e 69 74 69 61 6c 69 7a 65 0a 20 20 20 20 _initialize.
7f70: 61 75 74 6f 69 6e 73 74 61 6c 6c 5f 74 65 73 74 autoinstall_test
7f80: 5f 66 75 6e 63 74 69 6f 6e 73 0a 20 20 7d 20 2d _functions. } -
7f90: 66 69 6c 65 73 20 24 7b 70 65 72 6d 2d 61 6c 74 files ${perm-alt
7fa0: 2d 70 63 61 63 68 65 2d 74 65 73 74 73 65 74 7d -pcache-testset}
7fb0: 0a 7d 0a 0a 74 65 73 74 5f 73 75 69 74 65 20 22 .}..test_suite "
7fc0: 6a 6f 75 72 6e 61 6c 74 65 73 74 22 20 2d 64 65 journaltest" -de
7fd0: 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 43 68 scription {. Ch
7fe0: 65 63 6b 20 74 68 61 74 20 70 61 67 65 73 20 61 eck that pages a
7ff0: 72 65 20 73 79 6e 63 65 64 20 62 65 66 6f 72 65 re synced before
8000: 20 62 65 69 6e 67 20 77 72 69 74 74 65 6e 20 28 being written (
8010: 74 65 73 74 5f 6a 6f 75 72 6e 61 6c 2e 63 29 2e test_journal.c).
8020: 0a 7d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 20 7b .} -initialize {
8030: 0a 20 20 63 61 74 63 68 20 7b 64 62 20 63 6c 6f . catch {db clo
8040: 73 65 7d 0a 20 20 72 65 67 69 73 74 65 72 5f 6a se}. register_j
8050: 74 5f 76 66 73 20 2d 64 65 66 61 75 6c 74 20 22 t_vfs -default "
8060: 22 0a 7d 20 2d 73 68 75 74 64 6f 77 6e 20 7b 0a ".} -shutdown {.
8070: 20 20 75 6e 72 65 67 69 73 74 65 72 5f 6a 74 5f unregister_jt_
8080: 76 66 73 0a 7d 20 2d 66 69 6c 65 73 20 5b 74 65 vfs.} -files [te
8090: 73 74 5f 73 65 74 20 24 3a 3a 61 6c 6c 71 75 69 st_set $::allqui
80a0: 63 6b 74 65 73 74 73 20 2d 65 78 63 6c 75 64 65 cktests -exclude
80b0: 20 7b 0a 20 20 77 61 6c 2a 20 69 6e 63 72 76 61 {. wal* incrva
80c0: 63 75 75 6d 2e 74 65 73 74 20 69 6f 65 72 72 2e cuum.test ioerr.
80d0: 74 65 73 74 20 63 6f 72 72 75 70 74 34 2e 74 65 test corrupt4.te
80e0: 73 74 20 69 6f 2e 74 65 73 74 20 63 72 61 73 68 st io.test crash
80f0: 38 2e 74 65 73 74 20 0a 20 20 61 73 79 6e 63 34 8.test . async4
8100: 2e 74 65 73 74 20 62 69 67 66 69 6c 65 2e 74 65 .test bigfile.te
8110: 73 74 20 62 61 63 6b 63 6f 6d 70 61 74 2e 74 65 st backcompat.te
8120: 73 74 20 65 5f 77 61 6c 2a 20 66 73 74 61 74 2e st e_wal* fstat.
8130: 74 65 73 74 20 6d 6d 61 70 32 2e 74 65 73 74 0a test mmap2.test.
8140: 20 20 70 61 67 65 72 31 2e 74 65 73 74 20 73 79 pager1.test sy
8150: 73 63 61 6c 6c 2e 74 65 73 74 20 74 6b 74 33 34 scall.test tkt34
8160: 35 37 2e 74 65 73 74 20 2a 6d 61 6c 6c 6f 63 2a 57.test *malloc*
8170: 20 6d 6d 61 70 2a 20 6d 75 6c 74 69 70 6c 65 78 mmap* multiplex
8180: 2a 20 6e 6f 6c 6f 63 6b 2a 0a 20 20 70 61 67 65 * nolock*. page
8190: 72 32 2e 74 65 73 74 20 2a 66 61 75 6c 74 2a 20 r2.test *fault*
81a0: 72 6f 77 61 6c 2a 20 73 6e 61 70 73 68 6f 74 2a rowal* snapshot*
81b0: 20 73 75 70 65 72 6c 6f 63 6b 2a 20 73 79 6d 6c superlock* syml
81c0: 69 6e 6b 2e 74 65 73 74 0a 20 20 64 65 6c 65 74 ink.test. delet
81d0: 65 5f 64 62 2e 74 65 73 74 20 73 68 6d 6c 6f 63 e_db.test shmloc
81e0: 6b 2e 74 65 73 74 0a 7d 5d 0a 0a 69 66 20 7b 5b k.test.}]..if {[
81f0: 69 6e 66 6f 20 63 6f 6d 6d 61 6e 64 73 20 72 65 info commands re
8200: 67 69 73 74 65 72 5f 64 65 6d 6f 76 66 73 5d 20 gister_demovfs]
8210: 21 3d 20 22 22 7d 20 7b 0a 20 20 74 65 73 74 5f != ""} {. test_
8220: 73 75 69 74 65 20 22 64 65 6d 6f 76 66 73 22 20 suite "demovfs"
8230: 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 -description {.
8240: 20 20 20 43 68 65 63 6b 20 74 68 61 74 20 74 68 Check that th
8250: 65 20 64 65 6d 6f 76 66 73 20 28 63 6f 64 65 20 e demovfs (code
8260: 69 6e 20 74 65 73 74 5f 64 65 6d 6f 76 66 73 2e in test_demovfs.
8270: 63 29 20 6d 6f 72 65 20 6f 72 20 6c 65 73 73 20 c) more or less
8280: 77 6f 72 6b 73 2e 0a 20 20 7d 20 2d 69 6e 69 74 works.. } -init
8290: 69 61 6c 69 7a 65 20 7b 0a 20 20 20 20 72 65 67 ialize {. reg
82a0: 69 73 74 65 72 5f 64 65 6d 6f 76 66 73 0a 20 20 ister_demovfs.
82b0: 7d 20 2d 73 68 75 74 64 6f 77 6e 20 7b 0a 20 20 } -shutdown {.
82c0: 20 20 75 6e 72 65 67 69 73 74 65 72 5f 64 65 6d unregister_dem
82d0: 6f 76 66 73 0a 20 20 7d 20 2d 66 69 6c 65 73 20 ovfs. } -files
82e0: 7b 0a 20 20 20 20 69 6e 73 65 72 74 2e 74 65 73 {. insert.tes
82f0: 74 20 20 20 69 6e 73 65 72 74 32 2e 74 65 73 74 t insert2.test
8300: 20 20 69 6e 73 65 72 74 33 2e 74 65 73 74 20 72 insert3.test r
8310: 6f 6c 6c 62 61 63 6b 2e 74 65 73 74 20 0a 20 20 ollback.test .
8320: 20 20 73 65 6c 65 63 74 31 2e 74 65 73 74 20 20 select1.test
8330: 73 65 6c 65 63 74 32 2e 74 65 73 74 20 20 73 65 select2.test se
8340: 6c 65 63 74 33 2e 74 65 73 74 0a 20 20 7d 0a 7d lect3.test. }.}
8350: 0a 0a 74 65 73 74 5f 73 75 69 74 65 20 22 77 61 ..test_suite "wa
8360: 6c 22 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 l" -description
8370: 7b 0a 20 20 52 75 6e 20 74 65 73 74 73 20 77 69 {. Run tests wi
8380: 74 68 20 6a 6f 75 72 6e 61 6c 5f 6d 6f 64 65 3d th journal_mode=
8390: 57 41 4c 0a 7d 20 2d 69 6e 69 74 69 61 6c 69 7a WAL.} -initializ
83a0: 65 20 7b 0a 20 20 73 65 74 20 3a 3a 47 28 73 61 e {. set ::G(sa
83b0: 76 65 70 6f 69 6e 74 36 5f 69 74 65 72 61 74 69 vepoint6_iterati
83c0: 6f 6e 73 29 20 31 30 30 0a 7d 20 2d 73 68 75 74 ons) 100.} -shut
83d0: 64 6f 77 6e 20 7b 0a 20 20 75 6e 73 65 74 20 2d down {. unset -
83e0: 6e 6f 63 6f 6d 70 6c 61 69 6e 20 3a 3a 47 28 73 nocomplain ::G(s
83f0: 61 76 65 70 6f 69 6e 74 36 5f 69 74 65 72 61 74 avepoint6_iterat
8400: 69 6f 6e 73 29 0a 7d 20 2d 66 69 6c 65 73 20 7b ions).} -files {
8410: 0a 20 20 73 61 76 65 70 6f 69 6e 74 2e 74 65 73 . savepoint.tes
8420: 74 20 20 20 20 20 73 61 76 65 70 6f 69 6e 74 32 t savepoint2
8430: 2e 74 65 73 74 20 20 20 20 20 73 61 76 65 70 6f .test savepo
8440: 69 6e 74 36 2e 74 65 73 74 0a 20 20 74 72 61 6e int6.test. tran
8450: 73 2e 74 65 73 74 20 20 20 20 20 20 20 20 20 61 s.test a
8460: 76 74 72 61 6e 73 2e 74 65 73 74 0a 0a 20 20 66 vtrans.test.. f
8470: 74 73 33 61 61 2e 74 65 73 74 20 20 66 74 73 33 ts3aa.test fts3
8480: 61 62 2e 74 65 73 74 20 20 66 74 73 33 61 63 2e ab.test fts3ac.
8490: 74 65 73 74 20 20 66 74 73 33 61 64 2e 74 65 73 test fts3ad.tes
84a0: 74 0a 20 20 66 74 73 33 61 65 2e 74 65 73 74 20 t. fts3ae.test
84b0: 20 66 74 73 33 61 66 2e 74 65 73 74 20 20 66 74 fts3af.test ft
84c0: 73 33 61 67 2e 74 65 73 74 20 20 66 74 73 33 61 s3ag.test fts3a
84d0: 68 2e 74 65 73 74 0a 20 20 66 74 73 33 61 69 2e h.test. fts3ai.
84e0: 74 65 73 74 20 20 66 74 73 33 61 6a 2e 74 65 73 test fts3aj.tes
84f0: 74 20 20 66 74 73 33 61 6b 2e 74 65 73 74 20 20 t fts3ak.test
8500: 66 74 73 33 61 6c 2e 74 65 73 74 0a 20 20 66 74 fts3al.test. ft
8510: 73 33 61 6d 2e 74 65 73 74 20 20 66 74 73 33 61 s3am.test fts3a
8520: 6e 2e 74 65 73 74 20 20 66 74 73 33 61 6f 2e 74 n.test fts3ao.t
8530: 65 73 74 20 20 66 74 73 33 62 2e 74 65 73 74 0a est fts3b.test.
8540: 20 20 66 74 73 33 63 2e 74 65 73 74 20 20 20 66 fts3c.test f
8550: 74 73 33 64 2e 74 65 73 74 20 20 20 66 74 73 33 ts3d.test fts3
8560: 65 2e 74 65 73 74 20 20 20 66 74 73 33 71 75 65 e.test fts3que
8570: 72 79 2e 74 65 73 74 20 0a 7d 0a 0a 74 65 73 74 ry.test .}..test
8580: 5f 73 75 69 74 65 20 22 72 74 72 65 65 22 20 2d _suite "rtree" -
8590: 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 description {.
85a0: 41 6c 6c 20 52 2d 74 72 65 65 20 72 65 6c 61 74 All R-tree relat
85b0: 65 64 20 74 65 73 74 73 2e 20 50 72 6f 76 69 64 ed tests. Provid
85c0: 65 73 20 63 6f 76 65 72 61 67 65 20 6f 66 20 73 es coverage of s
85d0: 6f 75 72 63 65 20 66 69 6c 65 20 72 74 72 65 65 ource file rtree
85e0: 2e 63 2e 0a 7d 20 2d 66 69 6c 65 73 20 5b 67 6c .c..} -files [gl
85f0: 6f 62 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e 20 24 ob -nocomplain $
8600: 3a 3a 74 65 73 74 64 69 72 2f 2e 2e 2f 65 78 74 ::testdir/../ext
8610: 2f 72 74 72 65 65 2f 2a 2e 74 65 73 74 5d 0a 0a /rtree/*.test]..
8620: 74 65 73 74 5f 73 75 69 74 65 20 22 73 65 73 73 test_suite "sess
8630: 69 6f 6e 22 20 2d 64 65 73 63 72 69 70 74 69 6f ion" -descriptio
8640: 6e 20 7b 0a 20 20 41 6c 6c 20 73 65 73 73 69 6f n {. All sessio
8650: 6e 20 6d 6f 64 75 6c 65 20 72 65 6c 61 74 65 64 n module related
8660: 20 74 65 73 74 73 2e 20 0a 7d 20 2d 66 69 6c 65 tests. .} -file
8670: 73 20 5b 67 6c 6f 62 20 2d 6e 6f 63 6f 6d 70 6c s [glob -nocompl
8680: 61 69 6e 20 24 3a 3a 74 65 73 74 64 69 72 2f 2e ain $::testdir/.
8690: 2e 2f 65 78 74 2f 73 65 73 73 69 6f 6e 2f 2a 2e ./ext/session/*.
86a0: 74 65 73 74 5d 0a 0a 74 65 73 74 5f 73 75 69 74 test]..test_suit
86b0: 65 20 22 73 65 73 73 69 6f 6e 5f 65 65 63 22 20 e "session_eec"
86c0: 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 -description {.
86d0: 20 41 6c 6c 20 73 65 73 73 69 6f 6e 20 6d 6f 64 All session mod
86e0: 75 6c 65 20 72 65 6c 61 74 65 64 20 74 65 73 74 ule related test
86f0: 73 20 77 69 74 68 20 73 71 6c 69 74 65 33 5f 65 s with sqlite3_e
8700: 78 74 65 6e 64 65 64 5f 72 65 73 75 6c 74 5f 63 xtended_result_c
8710: 6f 64 65 73 28 29 20 73 65 74 2e 20 0a 7d 20 2d odes() set. .} -
8720: 66 69 6c 65 73 20 5b 0a 20 20 67 6c 6f 62 20 2d files [. glob -
8730: 6e 6f 63 6f 6d 70 6c 61 69 6e 20 24 3a 3a 74 65 nocomplain $::te
8740: 73 74 64 69 72 2f 2e 2e 2f 65 78 74 2f 73 65 73 stdir/../ext/ses
8750: 73 69 6f 6e 2f 2a 2e 74 65 73 74 0a 5d 20 2d 64 sion/*.test.] -d
8760: 62 63 6f 6e 66 69 67 20 7b 0a 20 20 73 71 6c 69 bconfig {. sqli
8770: 74 65 33 5f 65 78 74 65 6e 64 65 64 5f 72 65 73 te3_extended_res
8780: 75 6c 74 5f 63 6f 64 65 73 20 24 3a 3a 64 62 68 ult_codes $::dbh
8790: 61 6e 64 6c 65 20 31 0a 7d 0a 0a 74 65 73 74 5f andle 1.}..test_
87a0: 73 75 69 74 65 20 22 73 65 73 73 69 6f 6e 5f 73 suite "session_s
87b0: 74 72 6d 22 20 2d 64 65 73 63 72 69 70 74 69 6f trm" -descriptio
87c0: 6e 20 7b 0a 20 20 41 6c 6c 20 73 65 73 73 69 6f n {. All sessio
87d0: 6e 20 6d 6f 64 75 6c 65 20 72 65 6c 61 74 65 64 n module related
87e0: 20 74 65 73 74 73 20 75 73 69 6e 67 20 74 68 65 tests using the
87f0: 20 73 74 72 65 61 6d 69 6e 67 20 41 50 49 73 2e streaming APIs.
8800: 0a 7d 20 2d 66 69 6c 65 73 20 5b 0a 20 20 67 6c .} -files [. gl
8810: 6f 62 20 2d 6e 6f 63 6f 6d 70 6c 61 69 6e 20 24 ob -nocomplain $
8820: 3a 3a 74 65 73 74 64 69 72 2f 2e 2e 2f 65 78 74 ::testdir/../ext
8830: 2f 73 65 73 73 69 6f 6e 2f 2a 2e 74 65 73 74 0a /session/*.test.
8840: 5d 20 2d 64 62 63 6f 6e 66 69 67 20 7b 0a 20 20 ] -dbconfig {.
8850: 73 65 74 20 3a 3a 73 71 6c 69 74 65 33 73 65 73 set ::sqlite3ses
8860: 73 69 6f 6e 5f 73 74 72 65 61 6d 73 20 31 0a 7d sion_streams 1.}
8870: 0a 0a 74 65 73 74 5f 73 75 69 74 65 20 22 72 62 ..test_suite "rb
8880: 75 22 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 u" -description
8890: 7b 0a 20 20 52 42 55 20 74 65 73 74 73 2e 0a 7d {. RBU tests..}
88a0: 20 2d 66 69 6c 65 73 20 5b 0a 20 20 74 65 73 74 -files [. test
88b0: 5f 73 65 74 20 5b 67 6c 6f 62 20 2d 6e 6f 63 6f _set [glob -noco
88c0: 6d 70 6c 61 69 6e 20 24 3a 3a 74 65 73 74 64 69 mplain $::testdi
88d0: 72 2f 2e 2e 2f 65 78 74 2f 72 62 75 2f 2a 2e 74 r/../ext/rbu/*.t
88e0: 65 73 74 5d 20 2d 65 78 63 6c 75 64 65 20 72 62 est] -exclude rb
88f0: 75 2e 74 65 73 74 0a 5d 0a 0a 74 65 73 74 5f 73 u.test.]..test_s
8900: 75 69 74 65 20 22 6e 6f 5f 6f 70 74 69 6d 69 7a uite "no_optimiz
8910: 61 74 69 6f 6e 22 20 2d 64 65 73 63 72 69 70 74 ation" -descript
8920: 69 6f 6e 20 7b 0a 20 20 52 75 6e 20 74 65 73 74 ion {. Run test
8930: 20 73 63 72 69 70 74 73 20 77 69 74 68 20 6f 70 scripts with op
8940: 74 69 6d 69 7a 61 74 69 6f 6e 73 20 64 69 73 61 timizations disa
8950: 62 6c 65 64 20 75 73 69 6e 67 20 74 68 65 0a 20 bled using the.
8960: 20 73 71 6c 69 74 65 33 5f 74 65 73 74 5f 63 6f sqlite3_test_co
8970: 6e 74 72 6f 6c 28 53 51 4c 49 54 45 5f 54 45 53 ntrol(SQLITE_TES
8980: 54 43 54 52 4c 5f 4f 50 54 49 4d 49 5a 41 54 49 TCTRL_OPTIMIZATI
8990: 4f 4e 53 29 20 69 6e 74 65 72 66 61 63 65 2e 0a ONS) interface..
89a0: 7d 20 2d 66 69 6c 65 73 20 7b 0a 20 20 77 68 65 } -files {. whe
89b0: 72 65 2e 74 65 73 74 20 77 68 65 72 65 32 2e 74 re.test where2.t
89c0: 65 73 74 20 77 68 65 72 65 33 2e 74 65 73 74 20 est where3.test
89d0: 77 68 65 72 65 34 2e 74 65 73 74 20 77 68 65 72 where4.test wher
89e0: 65 35 2e 74 65 73 74 0a 20 20 77 68 65 72 65 36 e5.test. where6
89f0: 2e 74 65 73 74 20 77 68 65 72 65 37 2e 74 65 73 .test where7.tes
8a00: 74 20 77 68 65 72 65 38 2e 74 65 73 74 20 77 68 t where8.test wh
8a10: 65 72 65 39 2e 74 65 73 74 0a 20 20 77 68 65 72 ere9.test. wher
8a20: 65 41 2e 74 65 73 74 20 77 68 65 72 65 42 2e 74 eA.test whereB.t
8a30: 65 73 74 20 77 68 65 72 65 6c 69 6d 69 74 2e 74 est wherelimit.t
8a40: 65 73 74 0a 20 20 73 65 6c 65 63 74 31 2e 74 65 est. select1.te
8a50: 73 74 20 73 65 6c 65 63 74 32 2e 74 65 73 74 20 st select2.test
8a60: 73 65 6c 65 63 74 33 2e 74 65 73 74 20 73 65 6c select3.test sel
8a70: 65 63 74 34 2e 74 65 73 74 20 73 65 6c 65 63 74 ect4.test select
8a80: 35 2e 74 65 73 74 0a 20 20 73 65 6c 65 63 74 37 5.test. select7
8a90: 2e 74 65 73 74 20 73 65 6c 65 63 74 38 2e 74 65 .test select8.te
8aa0: 73 74 20 73 65 6c 65 63 74 41 2e 74 65 73 74 20 st selectA.test
8ab0: 73 65 6c 65 63 74 43 2e 74 65 73 74 0a 7d 20 2d selectC.test.} -
8ac0: 64 62 63 6f 6e 66 69 67 20 7b 0a 20 20 6f 70 74 dbconfig {. opt
8ad0: 69 6d 69 7a 61 74 69 6f 6e 5f 63 6f 6e 74 72 6f imization_contro
8ae0: 6c 20 24 3a 3a 64 62 68 61 6e 64 6c 65 20 61 6c l $::dbhandle al
8af0: 6c 20 30 0a 7d 0a 0a 74 65 73 74 5f 73 75 69 74 l 0.}..test_suit
8b00: 65 20 22 70 72 65 70 61 72 65 22 20 2d 64 65 73 e "prepare" -des
8b10: 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 52 75 6e cription {. Run
8b20: 20 74 65 73 74 73 20 77 69 74 68 20 74 68 65 20 tests with the
8b30: 64 62 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 75 73 db connection us
8b40: 69 6e 67 20 73 71 6c 69 74 65 33 5f 70 72 65 70 ing sqlite3_prep
8b50: 61 72 65 28 29 20 69 6e 73 74 65 61 64 20 6f 66 are() instead of
8b60: 20 5f 76 32 28 29 2e 0a 7d 20 2d 64 62 63 6f 6e _v2()..} -dbcon
8b70: 66 69 67 20 7b 0a 20 20 24 3a 3a 64 62 68 61 6e fig {. $::dbhan
8b80: 64 6c 65 20 76 65 72 73 69 6f 6e 20 2d 75 73 65 dle version -use
8b90: 2d 6c 65 67 61 63 79 2d 70 72 65 70 61 72 65 20 -legacy-prepare
8ba0: 31 0a 20 20 23 24 3a 3a 64 62 68 61 6e 64 6c 65 1. #$::dbhandle
8bb0: 20 63 61 63 68 65 20 73 69 7a 65 20 30 0a 7d 20 cache size 0.}
8bc0: 2d 66 69 6c 65 73 20 5b 0a 20 20 74 65 73 74 5f -files [. test_
8bd0: 73 65 74 20 24 61 6c 6c 71 75 69 63 6b 74 65 73 set $allquicktes
8be0: 74 73 20 2d 65 78 63 6c 75 64 65 20 2a 6d 61 6c ts -exclude *mal
8bf0: 6c 6f 63 2a 20 2a 69 6f 65 72 72 2a 20 2a 66 61 loc* *ioerr* *fa
8c00: 75 6c 74 2a 20 5c 0a 20 20 20 20 20 20 73 74 6d ult* \. stm
8c10: 74 76 74 61 62 31 2e 74 65 73 74 20 69 6e 64 65 tvtab1.test inde
8c20: 78 39 2e 74 65 73 74 0a 5d 0a 0a 74 65 73 74 5f x9.test.]..test_
8c30: 73 75 69 74 65 20 22 73 6f 72 74 65 72 72 65 66 suite "sorterref
8c40: 22 20 2d 70 72 65 66 69 78 20 22 22 20 2d 64 65 " -prefix "" -de
8c50: 73 63 72 69 70 74 69 6f 6e 20 7b 0a 20 20 52 75 scription {. Ru
8c60: 6e 20 74 68 65 20 22 76 65 72 79 71 75 69 63 6b n the "veryquick
8c70: 22 20 74 65 73 74 20 73 75 69 74 65 20 77 69 74 " test suite wit
8c80: 68 20 53 51 4c 49 54 45 5f 43 4f 4e 46 49 47 5f h SQLITE_CONFIG_
8c90: 53 4f 52 54 45 52 52 45 46 5f 53 49 5a 45 20 73 SORTERREF_SIZE s
8ca0: 65 74 0a 20 20 74 6f 20 30 20 73 6f 20 74 68 61 et. to 0 so tha
8cb0: 74 20 73 6f 72 74 65 72 2d 72 65 66 65 72 65 6e t sorter-referen
8cc0: 63 65 73 20 61 72 65 20 75 73 65 64 20 77 68 65 ces are used whe
8cd0: 6e 65 76 65 72 20 70 6f 73 73 69 62 6c 65 2e 0a never possible..
8ce0: 7d 20 2d 66 69 6c 65 73 20 5b 0a 20 20 74 65 73 } -files [. tes
8cf0: 74 5f 73 65 74 20 24 61 6c 6c 71 75 69 63 6b 74 t_set $allquickt
8d00: 65 73 74 73 20 2d 65 78 63 6c 75 64 65 20 2a 6d ests -exclude *m
8d10: 61 6c 6c 6f 63 2a 20 2a 69 6f 65 72 72 2a 20 2a alloc* *ioerr* *
8d20: 66 61 75 6c 74 2a 20 2a 62 69 67 66 69 6c 65 2a fault* *bigfile*
8d30: 20 2a 5f 65 72 72 2a 20 5c 0a 20 20 20 20 20 20 *_err* \.
8d40: 2a 66 74 73 35 63 6f 72 72 75 70 74 2a 20 2a 66 *fts5corrupt* *f
8d50: 74 73 35 62 69 67 2a 20 2a 66 74 73 35 61 6a 2a ts5big* *fts5aj*
8d60: 0a 5d 20 2d 69 6e 69 74 69 61 6c 69 7a 65 20 7b .] -initialize {
8d70: 0a 20 20 63 61 74 63 68 20 7b 64 62 20 63 6c 6f . catch {db clo
8d80: 73 65 7d 0a 20 20 73 71 6c 69 74 65 33 5f 73 68 se}. sqlite3_sh
8d90: 75 74 64 6f 77 6e 0a 20 20 73 71 6c 69 74 65 33 utdown. sqlite3
8da0: 5f 63 6f 6e 66 69 67 5f 73 6f 72 74 65 72 72 65 _config_sorterre
8db0: 66 20 30 0a 20 20 73 71 6c 69 74 65 33 5f 69 6e f 0. sqlite3_in
8dc0: 69 74 69 61 6c 69 7a 65 0a 20 20 61 75 74 6f 69 itialize. autoi
8dd0: 6e 73 74 61 6c 6c 5f 74 65 73 74 5f 66 75 6e 63 nstall_test_func
8de0: 74 69 6f 6e 73 0a 7d 20 2d 73 68 75 74 64 6f 77 tions.} -shutdow
8df0: 6e 20 7b 0a 20 20 63 61 74 63 68 20 7b 64 62 20 n {. catch {db
8e00: 63 6c 6f 73 65 7d 0a 20 20 73 71 6c 69 74 65 33 close}. sqlite3
8e10: 5f 73 68 75 74 64 6f 77 6e 0a 20 20 73 71 6c 69 _shutdown. sqli
8e20: 74 65 33 5f 63 6f 6e 66 69 67 5f 73 6f 72 74 65 te3_config_sorte
8e30: 72 72 65 66 20 2d 31 0a 20 20 73 71 6c 69 74 65 rref -1. sqlite
8e40: 33 5f 69 6e 69 74 69 61 6c 69 7a 65 0a 20 20 61 3_initialize. a
8e50: 75 74 6f 69 6e 73 74 61 6c 6c 5f 74 65 73 74 5f utoinstall_test_
8e60: 66 75 6e 63 74 69 6f 6e 73 0a 7d 0a 0a 23 20 45 functions.}..# E
8e70: 6e 64 20 6f 66 20 74 65 73 74 73 0a 23 23 23 23 nd of tests.####
8e80: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8e90: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8ea0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8eb0: 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 ################
8ec0: 23 23 23 23 23 23 23 23 23 0a 0a 23 20 72 75 6e #########..# run
8ed0: 5f 74 65 73 74 73 20 4e 41 4d 45 20 4f 50 54 49 _tests NAME OPTI
8ee0: 4f 4e 53 0a 23 0a 23 20 77 68 65 72 65 20 61 76 ONS.#.# where av
8ef0: 61 69 6c 61 62 6c 65 20 6f 70 74 69 6f 6e 73 20 ailable options
8f00: 61 72 65 3a 20 20 0a 23 0a 23 20 20 20 20 20 20 are: .#.#
8f10: 20 2d 64 65 73 63 72 69 70 74 69 6f 6e 20 54 49 -description TI
8f20: 54 4c 45 0a 23 20 20 20 20 20 20 20 2d 69 6e 69 TLE.# -ini
8f30: 74 69 61 6c 69 7a 65 20 20 53 43 52 49 50 54 0a tialize SCRIPT.
8f40: 23 20 20 20 20 20 20 20 2d 73 68 75 74 64 6f 77 # -shutdow
8f50: 6e 20 20 20 20 53 43 52 49 50 54 0a 23 20 20 20 n SCRIPT.#
8f60: 20 20 20 20 2d 66 69 6c 65 73 20 20 20 20 20 20 -files
8f70: 20 4c 49 53 54 2d 4f 46 2d 46 49 4c 45 53 0a 23 LIST-OF-FILES.#
8f80: 20 20 20 20 20 20 20 2d 70 72 65 66 69 78 20 20 -prefix
8f90: 20 20 20 20 4e 41 4d 45 0a 23 20 20 20 20 20 20 NAME.#
8fa0: 20 2d 64 62 63 6f 6e 66 69 67 20 20 20 20 53 43 -dbconfig SC
8fb0: 52 49 50 54 0a 23 0a 70 72 6f 63 20 72 75 6e 5f RIPT.#.proc run_
8fc0: 74 65 73 74 73 20 7b 6e 61 6d 65 20 61 72 67 73 tests {name args
8fd0: 7d 20 7b 0a 20 20 73 65 74 20 6f 70 74 69 6f 6e } {. set option
8fe0: 73 28 2d 69 6e 69 74 69 61 6c 69 7a 65 29 20 22 s(-initialize) "
8ff0: 22 0a 20 20 73 65 74 20 6f 70 74 69 6f 6e 73 28 ". set options(
9000: 2d 73 68 75 74 64 6f 77 6e 29 20 22 22 0a 20 20 -shutdown) "".
9010: 73 65 74 20 6f 70 74 69 6f 6e 73 28 2d 70 72 65 set options(-pre
9020: 66 69 78 29 20 22 22 0a 20 20 73 65 74 20 6f 70 fix) "". set op
9030: 74 69 6f 6e 73 28 2d 64 62 63 6f 6e 66 69 67 29 tions(-dbconfig)
9040: 20 22 22 0a 20 20 73 65 74 20 6f 70 74 69 6f 6e "". set option
9050: 73 28 2d 70 72 65 73 71 6c 29 20 22 22 0a 0a 20 s(-presql) ""..
9060: 20 61 72 72 61 79 20 73 65 74 20 6f 70 74 69 6f array set optio
9070: 6e 73 20 24 61 72 67 73 0a 0a 20 20 73 65 74 20 ns $args.. set
9080: 3a 3a 47 28 70 65 72 6d 3a 6e 61 6d 65 29 20 20 ::G(perm:name)
9090: 20 20 20 20 20 20 20 24 6e 61 6d 65 0a 20 20 73 $name. s
90a0: 65 74 20 3a 3a 47 28 70 65 72 6d 3a 70 72 65 66 et ::G(perm:pref
90b0: 69 78 29 20 20 20 20 20 20 20 24 6f 70 74 69 6f ix) $optio
90c0: 6e 73 28 2d 70 72 65 66 69 78 29 0a 20 20 73 65 ns(-prefix). se
90d0: 74 20 3a 3a 47 28 69 73 71 75 69 63 6b 29 20 20 t ::G(isquick)
90e0: 20 20 20 20 20 20 20 20 20 31 0a 20 20 73 65 74 1. set
90f0: 20 3a 3a 47 28 70 65 72 6d 3a 64 62 63 6f 6e 66 ::G(perm:dbconf
9100: 69 67 29 20 20 20 20 20 24 6f 70 74 69 6f 6e 73 ig) $options
9110: 28 2d 64 62 63 6f 6e 66 69 67 29 0a 20 20 73 65 (-dbconfig). se
9120: 74 20 3a 3a 47 28 70 65 72 6d 3a 70 72 65 73 71 t ::G(perm:presq
9130: 6c 29 20 20 20 20 20 20 20 24 6f 70 74 69 6f 6e l) $option
9140: 73 28 2d 70 72 65 73 71 6c 29 0a 0a 20 20 66 6f s(-presql).. fo
9150: 72 65 61 63 68 20 66 69 6c 65 20 5b 6c 73 6f 72 reach file [lsor
9160: 74 20 24 6f 70 74 69 6f 6e 73 28 2d 66 69 6c 65 t $options(-file
9170: 73 29 5d 20 7b 0a 20 20 20 20 75 70 6c 65 76 65 s)] {. upleve
9180: 6c 20 24 6f 70 74 69 6f 6e 73 28 2d 69 6e 69 74 l $options(-init
9190: 69 61 6c 69 7a 65 29 0a 20 20 20 20 69 66 20 7b ialize). if {
91a0: 5b 66 69 6c 65 20 74 61 69 6c 20 24 66 69 6c 65 [file tail $file
91b0: 5d 20 3d 3d 20 24 66 69 6c 65 7d 20 7b 20 73 65 ] == $file} { se
91c0: 74 20 66 69 6c 65 20 5b 66 69 6c 65 20 6a 6f 69 t file [file joi
91d0: 6e 20 24 3a 3a 74 65 73 74 64 69 72 20 24 66 69 n $::testdir $fi
91e0: 6c 65 5d 20 7d 0a 20 20 20 20 73 6c 61 76 65 5f le] }. slave_
91f0: 74 65 73 74 5f 66 69 6c 65 20 24 66 69 6c 65 0a test_file $file.
9200: 20 20 20 20 75 70 6c 65 76 65 6c 20 24 6f 70 74 uplevel $opt
9210: 69 6f 6e 73 28 2d 73 68 75 74 64 6f 77 6e 29 0a ions(-shutdown).
9220: 0a 20 20 20 20 75 6e 73 65 74 20 2d 6e 6f 63 6f . unset -noco
9230: 6d 70 6c 61 69 6e 20 3a 3a 47 28 70 65 72 6d 3a mplain ::G(perm:
9240: 73 71 6c 69 74 65 33 5f 61 72 67 73 29 0a 20 20 sqlite3_args).
9250: 7d 0a 0a 20 20 75 6e 73 65 74 20 3a 3a 47 28 70 }.. unset ::G(p
9260: 65 72 6d 3a 6e 61 6d 65 29 0a 20 20 75 6e 73 65 erm:name). unse
9270: 74 20 3a 3a 47 28 70 65 72 6d 3a 70 72 65 66 69 t ::G(perm:prefi
9280: 78 29 0a 20 20 75 6e 73 65 74 20 3a 3a 47 28 70 x). unset ::G(p
9290: 65 72 6d 3a 64 62 63 6f 6e 66 69 67 29 0a 20 20 erm:dbconfig).
92a0: 75 6e 73 65 74 20 3a 3a 47 28 70 65 72 6d 3a 70 unset ::G(perm:p
92b0: 72 65 73 71 6c 29 0a 7d 0a 0a 70 72 6f 63 20 72 resql).}..proc r
92c0: 75 6e 5f 74 65 73 74 5f 73 75 69 74 65 20 7b 6e un_test_suite {n
92d0: 61 6d 65 7d 20 7b 0a 20 20 69 66 20 7b 5b 69 6e ame} {. if {[in
92e0: 66 6f 20 65 78 69 73 74 73 20 3a 3a 74 65 73 74 fo exists ::test
92f0: 73 70 65 63 28 24 6e 61 6d 65 29 5d 3d 3d 30 7d spec($name)]==0}
9300: 20 7b 0a 20 20 20 20 65 72 72 6f 72 20 22 4e 6f {. error "No
9310: 20 73 75 63 68 20 74 65 73 74 20 73 75 69 74 65 such test suite
9320: 3a 20 24 6e 61 6d 65 22 0a 20 20 7d 0a 20 20 75 : $name". }. u
9330: 70 6c 65 76 65 6c 20 72 75 6e 5f 74 65 73 74 73 plevel run_tests
9340: 20 24 6e 61 6d 65 20 24 3a 3a 74 65 73 74 73 70 $name $::testsp
9350: 65 63 28 24 6e 61 6d 65 29 0a 7d 0a 0a 70 72 6f ec($name).}..pro
9360: 63 20 68 65 6c 70 20 7b 7d 20 7b 0a 20 20 70 75 c help {} {. pu
9370: 74 73 20 22 55 73 61 67 65 3a 20 24 3a 3a 61 72 ts "Usage: $::ar
9380: 67 76 30 20 54 45 53 54 53 55 49 54 45 20 3f 54 gv0 TESTSUITE ?T
9390: 45 53 54 46 49 4c 45 3f 22 0a 20 20 70 75 74 73 ESTFILE?". puts
93a0: 20 22 22 0a 20 20 70 75 74 73 20 22 41 76 61 69 "". puts "Avai
93b0: 6c 61 62 6c 65 20 74 65 73 74 2d 73 75 69 74 65 lable test-suite
93c0: 73 20 61 72 65 3a 22 0a 0a 20 20 73 65 74 20 69 s are:".. set i
93d0: 50 6f 73 20 30 0a 20 20 66 6f 72 65 61 63 68 20 Pos 0. foreach
93e0: 6b 20 24 3a 3a 74 65 73 74 73 75 69 74 65 6c 69 k $::testsuiteli
93f0: 73 74 20 7b 0a 20 20 20 20 69 66 20 7b 5b 69 6e st {. if {[in
9400: 66 6f 20 65 78 69 73 74 73 20 3a 3a 74 65 73 74 fo exists ::test
9410: 73 70 65 63 28 24 6b 29 5d 7d 20 7b 0a 20 20 20 spec($k)]} {.
9420: 20 20 20 73 77 69 74 63 68 20 24 69 50 6f 73 20 switch $iPos
9430: 7b 0a 20 20 20 20 20 20 20 20 30 20 7b 0a 20 20 {. 0 {.
9440: 20 20 20 20 20 20 20 20 70 75 74 73 20 22 22 0a puts "".
9450: 20 20 20 20 20 20 20 20 20 20 70 75 74 73 20 2d puts -
9460: 6e 6f 6e 65 77 6c 69 6e 65 20 22 20 20 5b 66 6f nonewline " [fo
9470: 72 6d 61 74 20 25 2d 33 30 73 20 24 6b 5d 22 0a rmat %-30s $k]".
9480: 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 }..
9490: 20 20 20 31 20 7b 0a 20 20 20 20 20 20 20 20 20 1 {.
94a0: 20 70 75 74 73 20 2d 6e 6f 6e 65 77 6c 69 6e 65 puts -nonewline
94b0: 20 5b 66 6f 72 6d 61 74 20 25 2d 33 30 73 20 24 [format %-30s $
94c0: 6b 5d 0a 20 20 20 20 20 20 20 20 7d 0a 0a 20 20 k]. }..
94d0: 20 20 20 20 20 20 32 20 7b 0a 20 20 20 20 20 20 2 {.
94e0: 20 20 20 20 70 75 74 73 20 2d 6e 6f 6e 65 77 6c puts -nonewl
94f0: 69 6e 65 20 24 6b 0a 20 20 20 20 20 20 20 20 7d ine $k. }
9500: 0a 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 . }..
9510: 73 65 74 20 69 50 6f 73 20 5b 65 78 70 72 20 28 set iPos [expr (
9520: 28 24 69 50 6f 73 2b 31 29 20 25 20 33 29 5d 0a ($iPos+1) % 3)].
9530: 20 20 20 20 7d 0a 20 20 7d 0a 20 20 70 75 74 73 }. }. puts
9540: 20 22 22 0a 20 20 65 78 69 74 20 2d 31 0a 7d 0a "". exit -1.}.
9550: 0a 69 66 20 7b 5b 66 69 6c 65 20 74 61 69 6c 20 .if {[file tail
9560: 24 61 72 67 76 30 5d 20 3d 3d 20 22 70 65 72 6d $argv0] == "perm
9570: 75 74 61 74 69 6f 6e 73 2e 74 65 73 74 22 7d 20 utations.test"}
9580: 7b 0a 20 20 70 72 6f 63 20 6d 61 69 6e 20 7b 61 {. proc main {a
9590: 72 67 76 7d 20 7b 0a 20 20 20 20 69 66 20 7b 5b rgv} {. if {[
95a0: 6c 6c 65 6e 67 74 68 20 24 61 72 67 76 5d 3d 3d llength $argv]==
95b0: 30 7d 20 7b 0a 20 20 20 20 20 20 68 65 6c 70 0a 0} {. help.
95c0: 20 20 20 20 7d 20 65 6c 73 65 20 7b 0a 0a 20 20 } else {..
95d0: 20 20 20 20 23 20 53 65 65 20 69 66 20 74 68 65 # See if the
95e0: 20 66 69 72 73 74 20 61 72 67 75 6d 65 6e 74 20 first argument
95f0: 69 73 20 61 20 6e 61 6d 65 64 20 74 65 73 74 2d is a named test-
9600: 73 75 69 74 65 2e 0a 20 20 20 20 20 20 23 0a 20 suite.. #.
9610: 20 20 20 20 20 73 65 74 20 73 75 69 74 65 20 5b set suite [
9620: 66 69 6c 65 20 74 61 69 6c 20 5b 6c 69 6e 64 65 file tail [linde
9630: 78 20 24 61 72 67 76 20 30 5d 5d 0a 20 20 20 20 x $argv 0]].
9640: 20 20 69 66 20 7b 5b 69 6e 66 6f 20 65 78 69 73 if {[info exis
9650: 74 73 20 3a 3a 74 65 73 74 73 70 65 63 28 24 73 ts ::testspec($s
9660: 75 69 74 65 29 5d 7d 20 7b 0a 20 20 20 20 20 20 uite)]} {.
9670: 20 20 73 65 74 20 53 20 24 3a 3a 74 65 73 74 73 set S $::tests
9680: 70 65 63 28 24 73 75 69 74 65 29 0a 20 20 20 20 pec($suite).
9690: 20 20 20 20 73 65 74 20 69 20 31 0a 20 20 20 20 set i 1.
96a0: 20 20 7d 20 65 6c 73 65 20 7b 0a 20 20 20 20 20 } else {.
96b0: 20 20 20 73 65 74 20 53 20 5b 6c 69 73 74 5d 0a set S [list].
96c0: 20 20 20 20 20 20 20 20 73 65 74 20 69 20 30 0a set i 0.
96d0: 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 73 }.. s
96e0: 65 74 20 65 78 74 72 61 20 22 22 0a 20 20 20 20 et extra "".
96f0: 20 20 69 66 20 7b 24 69 20 3c 20 5b 6c 6c 65 6e if {$i < [llen
9700: 67 74 68 20 24 61 72 67 76 5d 20 26 26 20 5b 73 gth $argv] && [s
9710: 74 72 69 6e 67 20 72 61 6e 67 65 20 5b 6c 69 6e tring range [lin
9720: 64 65 78 20 24 61 72 67 76 20 24 69 5d 20 30 20 dex $argv $i] 0
9730: 30 5d 21 3d 22 2d 22 20 7d 20 7b 0a 20 20 20 20 0]!="-" } {.
9740: 20 20 20 20 73 65 74 20 66 69 6c 65 73 20 5b 6c set files [l
9750: 69 73 74 5d 0a 20 20 20 20 20 20 20 20 66 6f 72 ist]. for
9760: 20 7b 7d 20 7b 24 69 20 3c 20 5b 6c 6c 65 6e 67 {} {$i < [lleng
9770: 74 68 20 24 61 72 67 76 5d 7d 20 7b 69 6e 63 72 th $argv]} {incr
9780: 20 69 7d 20 7b 0a 20 20 20 20 20 20 20 20 20 20 i} {.
9790: 73 65 74 20 70 61 74 74 65 72 6e 20 5b 73 74 72 set pattern [str
97a0: 69 6e 67 20 6d 61 70 20 7b 25 20 2a 7d 20 5b 6c ing map {% *} [l
97b0: 69 6e 64 65 78 20 24 61 72 67 76 20 24 69 5d 5d index $argv $i]]
97c0: 0a 20 20 20 20 20 20 20 20 20 20 69 66 20 7b 5b . if {[
97d0: 73 74 72 69 6e 67 20 72 61 6e 67 65 20 24 70 61 string range $pa
97e0: 74 74 65 72 6e 20 30 20 30 5d 3d 3d 22 2d 22 7d ttern 0 0]=="-"}
97f0: 20 62 72 65 61 6b 0a 20 20 20 20 20 20 20 20 20 break.
9800: 20 66 6f 72 65 61 63 68 20 66 20 24 3a 3a 61 6c foreach f $::al
9810: 6c 74 65 73 74 73 20 7b 0a 20 20 20 20 20 20 20 ltests {.
9820: 20 20 20 20 20 73 65 74 20 74 61 69 6c 20 5b 66 set tail [f
9830: 69 6c 65 20 74 61 69 6c 20 24 66 5d 0a 20 20 20 ile tail $f].
9840: 20 20 20 20 20 20 20 20 20 69 66 20 7b 5b 6c 73 if {[ls
9850: 65 61 72 63 68 20 24 66 69 6c 65 73 20 24 66 5d earch $files $f]
9860: 3c 30 20 26 26 20 5b 73 74 72 69 6e 67 20 6d 61 <0 && [string ma
9870: 74 63 68 20 24 70 61 74 74 65 72 6e 20 24 74 61 tch $pattern $ta
9880: 69 6c 5d 7d 20 7b 0a 20 20 20 20 20 20 20 20 20 il]} {.
9890: 20 20 20 20 20 6c 61 70 70 65 6e 64 20 66 69 6c lappend fil
98a0: 65 73 20 24 66 0a 20 20 20 20 20 20 20 20 20 20 es $f.
98b0: 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 7d 0a }. }.
98c0: 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 }.
98d0: 20 20 73 65 74 20 65 78 74 72 61 20 5b 6c 69 73 set extra [lis
98e0: 74 20 2d 66 69 6c 65 73 20 24 66 69 6c 65 73 5d t -files $files]
98f0: 0a 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 . }..
9900: 65 76 61 6c 20 72 75 6e 5f 74 65 73 74 73 20 24 eval run_tests $
9910: 73 75 69 74 65 20 24 53 20 24 65 78 74 72 61 0a suite $S $extra.
9920: 20 20 20 20 7d 0a 20 20 7d 0a 20 20 6d 61 69 6e }. }. main
9930: 20 24 61 72 67 76 0a 20 20 66 69 6e 69 73 68 5f $argv. finish_
9940: 74 65 73 74 0a 7d 0a test.}.