diff options
author | dan <dan@noemail.net> | 2011-12-17 08:10:34 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2011-12-17 08:10:34 +0000 |
commit | 533100d3a3aed47416b23e2e349282b9508e766b (patch) | |
tree | 5fcf55e641ff8bc8c678de9ee361fd5c0bda9d48 | |
parent | d2980310d01601abd215e01a255b8dffcccada29 (diff) | |
download | sqlite-533100d3a3aed47416b23e2e349282b9508e766b.tar.gz sqlite-533100d3a3aed47416b23e2e349282b9508e766b.zip |
Add tests to walcrash3.test.
FossilOrigin-Name: d76880428013ae2c5be00d87bb3e1695af6f706f
-rw-r--r-- | manifest | 16 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | test/permutations.test | 4 | ||||
-rw-r--r-- | test/walcrash3.test | 54 |
4 files changed, 65 insertions, 11 deletions
@@ -1,5 +1,5 @@ -C Make\ssure\sthe\sSalt-1\svalue\sin\sthe\sWAL\sfile\sis\ssequentially\snumbered\sat\neach\scheckpoint,\sas\sit\ssays\sit\sshould\sbe\sin\sthe\sdocumentation. -D 2011-12-17T01:31:44.448 +C Add\stests\sto\swalcrash3.test. +D 2011-12-17T08:10:34.481 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -629,7 +629,7 @@ F test/pageropt.test 9191867ed19a2b3db6c42d1b36b6fbc657cd1ab0 F test/pagesize.test 1dd51367e752e742f58e861e65ed7390603827a0 F test/pcache.test 065aa286e722ab24f2e51792c1f093bf60656b16 F test/pcache2.test a83efe2dec0d392f814bfc998def1d1833942025 -F test/permutations.test 522823b47238cb1754198f80817fe9f9158ede55 +F test/permutations.test 8db6d3b72e6ce423cfb94d87926e5edcb4b0078f F test/pragma.test 7fa35e53085812dac94c2bfcbb02c2a4ad35df5e F test/pragma2.test 3a55f82b954242c642f8342b17dffc8b47472947 F test/printf.test ec9870c4dce8686a37818e0bf1aba6e6a1863552 @@ -914,7 +914,7 @@ F test/walbig.test 0ab8a430ef420a3114f7092e0f30fc9585ffa155 F test/walcksum.test f5447800a157c9e2234fbb8e80243f0813941bde F test/walcrash.test 4fcb661faf71db91214156d52d43ee327f52bde1 F test/walcrash2.test 019d60b89d96c1937adb2b30b850ac7e86e5a142 -F test/walcrash3.test 26d251a6dfaa1daae983268ccc6da0521d61e2e7 +F test/walcrash3.test 595e44c6197f0d0aa509fc135be2fd0209d11a2c F test/walfault.test efb0d5724893133e71b8d9d90abdb781845a6bb0 F test/walhook.test ed00a40ba7255da22d6b66433ab61fab16a63483 F test/walmode.test 4022fe03ae6e830583672caa101f046438a0473c @@ -984,7 +984,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 -P 49d21ce50fcf535e470d284ccbb9eb4d4bcfa3a6 -R 4fa928f2229c3510e15bdde794cf4c8f -U drh -Z 1119fcc0458452314585b8d9dc3542f8 +P 7b63b11b93396079131686abb36c4221354fa50e +R 177c457106f4a322f13cf8ef2b836d21 +U dan +Z c66e15671707eedc5457d2cd5fb751c5 diff --git a/manifest.uuid b/manifest.uuid index 25ecc50cf..47932d748 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7b63b11b93396079131686abb36c4221354fa50e
\ No newline at end of file +d76880428013ae2c5be00d87bb3e1695af6f706f
\ No newline at end of file diff --git a/test/permutations.test b/test/permutations.test index 7c3b026c6..922e6e37e 100644 --- a/test/permutations.test +++ b/test/permutations.test @@ -110,8 +110,8 @@ set allquicktests [test_set $alltests -exclude { speed4p.test sqllimits1.test tkt2686.test thread001.test thread002.test thread003.test thread004.test thread005.test trans2.test vacuum3.test incrvacuum_ioerr.test autovacuum_crash.test btree8.test shared_err.test - vtab_err.test walslow.test walcrash.test - walthread.test rtree3.test indexfault.test + vtab_err.test walslow.test walcrash.test walcrash3.test + walthread.test rtree3.test indexfault.test }] if {[info exists ::env(QUICKTEST_INCLUDE)]} { set allquicktests [concat $allquicktests $::env(QUICKTEST_INCLUDE)] diff --git a/test/walcrash3.test b/test/walcrash3.test index 156c2bd1c..c2c9a6d51 100644 --- a/test/walcrash3.test +++ b/test/walcrash3.test @@ -70,6 +70,60 @@ for {set i 2} {$i<1000} {incr i} { db2 close } } +catch { db close } +tvfs delete + +#-------------------------------------------------------------------------- +# +catch { db close } +forcedelete test.db + +do_test 2.1 { + sqlite3 db test.db + execsql { + PRAGMA page_size = 512; + PRAGMA journal_mode = WAL; + PRAGMA wal_autocheckpoint = 128; + CREATE TABLE t1(a PRIMARY KEY, b); + INSERT INTO t1 VALUES(randomblob(25), randomblob(200)); + } + + for {set i 0} {$i < 1500} {incr i} { + execsql { INSERT INTO t1 VALUES(randomblob(25), randomblob(200)) } + } + + db_save + db close +} {} + +set nInitialErr [set_test_counter errors] +for {set i 2} {$i<10000 && [set_test_counter errors]==$nInitialErr} {incr i} { + + do_test 2.$i.1 { + catch { db close } + db_restore + crashsql -delay 2 -file test.db-wal -seed $i { + SELECT * FROM sqlite_master; + PRAGMA synchronous = full; + PRAGMA wal_checkpoint; + BEGIN; + INSERT INTO t1 VALUES(randomblob(26), randomblob(200)); + INSERT INTO t1 VALUES(randomblob(26), randomblob(200)); + INSERT INTO t1 VALUES(randomblob(26), randomblob(200)); + INSERT INTO t1 VALUES(randomblob(26), randomblob(200)); + INSERT INTO t1 VALUES(randomblob(26), randomblob(200)); + INSERT INTO t1 VALUES(randomblob(26), randomblob(200)); + INSERT INTO t1 VALUES(randomblob(26), randomblob(200)); + INSERT INTO t1 VALUES(randomblob(26), randomblob(200)); + COMMIT; + } + } {1 {child process exited abnormally}} + + do_test 2.$i.2 { + sqlite3 db test.db + execsql { PRAGMA integrity_check } + } {ok} +} finish_test |