1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Some fixes to the test suite so that it works with ZERO_DAMAGE set to true.

Still lots more problems remain.

FossilOrigin-Name: 41891b231e20a1d32b1d7449e7863470eb38ca0a
This commit is contained in:
drh
2011-12-19 00:31:09 +00:00
parent 374f4a0447
commit 1eaaf93a83
8 changed files with 29 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
C For\simproved\sclarity\sof\spresentation,\s\nrefactor\ssome\sof\sthe\scode\sassociated\swith\sZERO_DAMAGE\sand\ssector-size. C Some\sfixes\sto\sthe\stest\ssuite\sso\sthat\sit\sworks\swith\sZERO_DAMAGE\sset\sto\strue.\nStill\slots\smore\sproblems\sremain.
D 2011-12-17T20:02:11.301 D 2011-12-19T00:31:09.781
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07 F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -230,7 +230,7 @@ F src/test_superlock.c 2b97936ca127d13962c3605dbc9a4ef269c424cd
F src/test_syscall.c a992d8c80ea91fbf21fb2dd570db40e77dd7e6ae F src/test_syscall.c a992d8c80ea91fbf21fb2dd570db40e77dd7e6ae
F src/test_tclvar.c f4dc67d5f780707210d6bb0eb6016a431c04c7fa F src/test_tclvar.c f4dc67d5f780707210d6bb0eb6016a431c04c7fa
F src/test_thread.c 35022393dd54d147b998b6b7f7e945b01114d666 F src/test_thread.c 35022393dd54d147b998b6b7f7e945b01114d666
F src/test_vfs.c 01d5732a8dbdc3f6b75d4ec79aeb9455942243a0 F src/test_vfs.c b241a08b5fa5bfec22983eba323e0ca621d3cea6
F src/test_vfstrace.c 065c7270a614254b2c68fbc7ba8d1fb1d5cbc823 F src/test_vfstrace.c 065c7270a614254b2c68fbc7ba8d1fb1d5cbc823
F src/test_wholenumber.c 6129adfbe7c7444f2e60cc785927f3aa74e12290 F src/test_wholenumber.c 6129adfbe7c7444f2e60cc785927f3aa74e12290
F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9 F src/test_wsd.c 41cadfd9d97fe8e3e4e44f61a4a8ccd6f7ca8fe9
@@ -514,7 +514,7 @@ F test/incrblob3.test aedbb35ea1b6450c33b98f2b6ed98e5020be8dc7
F test/incrblob_err.test d2562d2771ebffd4b3af89ef64c140dd44371597 F test/incrblob_err.test d2562d2771ebffd4b3af89ef64c140dd44371597
F test/incrblobfault.test 917c0292224c64a56ef7215fd633a3a82f805be0 F test/incrblobfault.test 917c0292224c64a56ef7215fd633a3a82f805be0
F test/incrvacuum.test d2a6ddf5e429720b5fe502766af747915ccf6c32 F test/incrvacuum.test d2a6ddf5e429720b5fe502766af747915ccf6c32
F test/incrvacuum2.test 62fbeb85459fe4e501684d8fb5b6e98a23e3b0c0 F test/incrvacuum2.test 379eeb8740b0ef60c372c439ad4cbea20b34bb9b
F test/incrvacuum_ioerr.test 22f208d01c528403240e05beecc41dc98ed01637 F test/incrvacuum_ioerr.test 22f208d01c528403240e05beecc41dc98ed01637
F test/index.test b5429732b3b983fa810e3ac867d7ca85dae35097 F test/index.test b5429732b3b983fa810e3ac867d7ca85dae35097
F test/index2.test ee83c6b5e3173a3d7137140d945d9a5d4fdfb9d6 F test/index2.test ee83c6b5e3173a3d7137140d945d9a5d4fdfb9d6
@@ -544,7 +544,7 @@ F test/join4.test 1a352e4e267114444c29266ce79e941af5885916
F test/join5.test 86675fc2919269aa923c84dd00ee4249b97990fe F test/join5.test 86675fc2919269aa923c84dd00ee4249b97990fe
F test/join6.test bf82cf3f979e9eade83ad0d056a66c5ed71d1901 F test/join6.test bf82cf3f979e9eade83ad0d056a66c5ed71d1901
F test/journal1.test 8b71ef1ed5798bdc0e6eb616d8694e2c2c188d4d F test/journal1.test 8b71ef1ed5798bdc0e6eb616d8694e2c2c188d4d
F test/journal2.test 29937bdbb253bbfd92057610120bdc0aa7e84a0a F test/journal2.test 81f51a9f3e9b67c0efd4cdbb93752e064027ad96
F test/journal3.test 6fd28532c88b447db844186bc190523108b6dbb4 F test/journal3.test 6fd28532c88b447db844186bc190523108b6dbb4
F test/jrnlmode.test 9ee3a78f53d52cca737db69293d15dc41c0cbd36 F test/jrnlmode.test 9ee3a78f53d52cca737db69293d15dc41c0cbd36
F test/jrnlmode2.test 81610545a4e6ed239ea8fa661891893385e23a1d F test/jrnlmode2.test 81610545a4e6ed239ea8fa661891893385e23a1d
@@ -619,7 +619,7 @@ F test/notnull.test cc7c78340328e6112a13c3e311a9ab3127114347
F test/null.test a8b09b8ed87852742343b33441a9240022108993 F test/null.test a8b09b8ed87852742343b33441a9240022108993
F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394 F test/openv2.test 0d3040974bf402e19b7df4b783e447289d7ab394
F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3 F test/oserror.test 50417780d0e0d7cd23cf12a8277bb44024765df3
F test/pager1.test 1b630b3248c7d28862fe9e190cfe52234b502504 F test/pager1.test 6fad92deb869a67197dd6afb8646375ecd57ca66
F test/pager2.test 745b911dde3d1f24ae0870bd433dfa83d7c658c1 F test/pager2.test 745b911dde3d1f24ae0870bd433dfa83d7c658c1
F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f F test/pager3.test 3856d9c80839be0668efee1b74811b1b7f7fc95f
F test/pagerfault.test 452f2cc23e3bfcfa935f4442aec1da4fe1dc0442 F test/pagerfault.test 452f2cc23e3bfcfa935f4442aec1da4fe1dc0442
@@ -705,7 +705,7 @@ F test/subselect.test d24fd8757daf97dafd2e889c73ea4c4272dcf4e4
F test/substr.test 18f57c4ca8a598805c4d64e304c418734d843c1a F test/substr.test 18f57c4ca8a598805c4d64e304c418734d843c1a
F test/superlock.test 7b1167925e9d30a5d1f0701d24812fdda42c3a86 F test/superlock.test 7b1167925e9d30a5d1f0701d24812fdda42c3a86
F test/sync.test a34cd43e98b7fb84eabbf38f7ed8f7349b3f3d85 F test/sync.test a34cd43e98b7fb84eabbf38f7ed8f7349b3f3d85
F test/syscall.test 2a922050dbee032f587249b070fb42692f5e1e22 F test/syscall.test 265cda616f56a297406728ee1e74c9b4a93aa6dd
F test/sysfault.test c79441d88d23696fbec7b147dba98d42a04f523f F test/sysfault.test c79441d88d23696fbec7b147dba98d42a04f523f
F test/table.test a59d985ca366e39b17b175f387f9d5db5a18d4e2 F test/table.test a59d985ca366e39b17b175f387f9d5db5a18d4e2
F test/tableapi.test 2674633fa95d80da917571ebdd759a14d9819126 F test/tableapi.test 2674633fa95d80da917571ebdd759a14d9819126
@@ -901,7 +901,7 @@ F test/vtabF.test fd5ad376f5a34fe0891df1f3cddb4fe7c3eb077e
F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5 F test/vtab_alter.test 9e374885248f69e251bdaacf480b04a197f125e5
F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8 F test/vtab_err.test 0d4d8eb4def1d053ac7c5050df3024fd47a3fbd8
F test/vtab_shared.test 0eff9ce4f19facbe0a3e693f6c14b80711a4222d F test/vtab_shared.test 0eff9ce4f19facbe0a3e693f6c14b80711a4222d
F test/wal.test c743be787e60c1242fa6cdf73b410e64b2977e25 F test/wal.test 626ada15351fb27838f4a6e3047f34b1491286b1
F test/wal2.test 29e2cbe840582fc6efd0487b4f6337caed4b3e80 F test/wal2.test 29e2cbe840582fc6efd0487b4f6337caed4b3e80
F test/wal3.test 29a6e8843e5f5fd13f33cb0407d2923107020d32 F test/wal3.test 29a6e8843e5f5fd13f33cb0407d2923107020d32
F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c F test/wal4.test 4744e155cd6299c6bd99d3eab1c82f77db9cdb3c
@@ -984,7 +984,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381 F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
P a0be6ea464695fdf1eaf2b7cf0652778617814f2 P 1dde96c9ee88af1c4e37c2e65acb7c0fe6a20e2a
R a3ac9d3b46a9e1f98e50427074558d5c R 62e195e48920f4d65e051058065d4cbf
U drh U drh
Z c1eb985167dfc5f7ffec7a557d306f46 Z 81e91113a96aa8ccbd0fc3b095654fd3

View File

@@ -1 +1 @@
1dde96c9ee88af1c4e37c2e65acb7c0fe6a20e2a 41891b231e20a1d32b1d7449e7863470eb38ca0a

View File

@@ -1208,7 +1208,7 @@ static int testvfs_obj_cmd(
iNew |= aFlag[idx].iValue; iNew |= aFlag[idx].iValue;
} }
p->iDevchar = iNew; p->iDevchar = iNew| 0x10000000;
} }
pRet = Tcl_NewObj(); pRet = Tcl_NewObj();

View File

@@ -191,7 +191,7 @@ ifcapable wal {
PRAGMA wal_checkpoint; PRAGMA wal_checkpoint;
} }
file size test.db-wal file size test.db-wal
} {1640} } [expr {32+2*(512+24)}]
do_test 4.3 { do_test 4.3 {
db close db close
@@ -205,7 +205,7 @@ ifcapable wal {
if {$newsz>$maxsz} {set maxsz $newsz} if {$newsz>$maxsz} {set maxsz $newsz}
} }
set maxsz set maxsz
} {2176} } [expr {32+3*(512+24)}]
} }
finish_test finish_test

View File

@@ -34,7 +34,7 @@ proc a_string {n} {
# characteristics flags to "SAFE_DELETE". # characteristics flags to "SAFE_DELETE".
# #
testvfs tvfs -default 1 testvfs tvfs -default 1
tvfs devchar undeletable_when_open tvfs devchar {undeletable_when_open zero_damage}
# Set up a hook so that each time a journal file is opened, closed or # Set up a hook so that each time a journal file is opened, closed or
# deleted, the method name ("xOpen", "xClose" or "xDelete") and the final # deleted, the method name ("xOpen", "xClose" or "xDelete") and the final
@@ -231,4 +231,3 @@ ifcapable wal {
tvfs delete tvfs delete
finish_test finish_test

View File

@@ -1312,6 +1312,7 @@ foreach sectorsize {
4096 8192 16384 32768 65536 131072 262144 4096 8192 16384 32768 65536 131072 262144
} { } {
tv sectorsize $sectorsize tv sectorsize $sectorsize
tv devchar {}
set eff $sectorsize set eff $sectorsize
if {$sectorsize < 512} { set eff 512 } if {$sectorsize < 512} { set eff 512 }
if {$sectorsize > 65536} { set eff 65536 } if {$sectorsize > 65536} { set eff 65536 }

View File

@@ -59,7 +59,8 @@ do_test 2.1.2 { test_syscall exists nosuchcall } 0
foreach s { foreach s {
open close access getcwd stat fstat ftruncate open close access getcwd stat fstat ftruncate
fcntl read pread write pwrite fchmod fallocate fcntl read pread write pwrite fchmod fallocate
pread64 pwrite64 unlink openDirectory mkdir rmdir pread64 pwrite64 unlink openDirectory mkdir rmdir
statvfs
} { } {
if {[test_syscall exists $s]} {lappend syscall_list $s} if {[test_syscall exists $s]} {lappend syscall_list $s}
} }

View File

@@ -546,7 +546,7 @@ do_multiclient_test tn {
} {1 2 3 4 5 6 7 8 9 10} } {1 2 3 4 5 6 7 8 9 10}
do_test wal-10.$tn.12 { do_test wal-10.$tn.12 {
catchsql { PRAGMA wal_checkpoint } catchsql { PRAGMA wal_checkpoint }
} {0 {0 13 13}} ;# Reader no longer block checkpoints } {0 {0 7 7}} ;# Reader no longer block checkpoints
do_test wal-10.$tn.13 { do_test wal-10.$tn.13 {
execsql { INSERT INTO t1 VALUES(11, 12) } execsql { INSERT INTO t1 VALUES(11, 12) }
sql2 {SELECT * FROM t1} sql2 {SELECT * FROM t1}
@@ -556,7 +556,7 @@ do_multiclient_test tn {
# #
do_test wal-10.$tn.14 { do_test wal-10.$tn.14 {
catchsql { PRAGMA wal_checkpoint } catchsql { PRAGMA wal_checkpoint }
} {0 {0 15 13}} } {0 {0 8 7}}
# The following series of test cases used to verify another blocking # The following series of test cases used to verify another blocking
# case in WAL - a case which no longer blocks. # case in WAL - a case which no longer blocks.
@@ -566,10 +566,10 @@ do_multiclient_test tn {
} {1 2 3 4 5 6 7 8 9 10 11 12} } {1 2 3 4 5 6 7 8 9 10 11 12}
do_test wal-10.$tn.16 { do_test wal-10.$tn.16 {
catchsql { PRAGMA wal_checkpoint } catchsql { PRAGMA wal_checkpoint }
} {0 {0 15 15}} } {0 {0 8 8}}
do_test wal-10.$tn.17 { do_test wal-10.$tn.17 {
execsql { PRAGMA wal_checkpoint } execsql { PRAGMA wal_checkpoint }
} {0 15 15} } {0 8 8}
do_test wal-10.$tn.18 { do_test wal-10.$tn.18 {
sql3 { BEGIN; SELECT * FROM t1 } sql3 { BEGIN; SELECT * FROM t1 }
} {1 2 3 4 5 6 7 8 9 10 11 12} } {1 2 3 4 5 6 7 8 9 10 11 12}
@@ -592,13 +592,13 @@ do_multiclient_test tn {
# #
do_test wal-10.$tn.23 { do_test wal-10.$tn.23 {
execsql { PRAGMA wal_checkpoint } execsql { PRAGMA wal_checkpoint }
} {0 17 17} } {0 9 9}
do_test wal-10.$tn.24 { do_test wal-10.$tn.24 {
sql2 { BEGIN; SELECT * FROM t1; } sql2 { BEGIN; SELECT * FROM t1; }
} {1 2 3 4 5 6 7 8 9 10 11 12 13 14} } {1 2 3 4 5 6 7 8 9 10 11 12 13 14}
do_test wal-10.$tn.25 { do_test wal-10.$tn.25 {
execsql { PRAGMA wal_checkpoint } execsql { PRAGMA wal_checkpoint }
} {0 17 17} } {0 9 9}
do_test wal-10.$tn.26 { do_test wal-10.$tn.26 {
catchsql { INSERT INTO t1 VALUES(15, 16) } catchsql { INSERT INTO t1 VALUES(15, 16) }
} {0 {}} } {0 {}}
@@ -615,11 +615,11 @@ do_multiclient_test tn {
do_test wal-10.$tn.29 { do_test wal-10.$tn.29 {
execsql { INSERT INTO t1 VALUES(19, 20) } execsql { INSERT INTO t1 VALUES(19, 20) }
catchsql { PRAGMA wal_checkpoint } catchsql { PRAGMA wal_checkpoint }
} {0 {0 6 0}} } {0 {0 3 0}}
do_test wal-10.$tn.30 { do_test wal-10.$tn.30 {
code3 { sqlite3_finalize $::STMT } code3 { sqlite3_finalize $::STMT }
execsql { PRAGMA wal_checkpoint } execsql { PRAGMA wal_checkpoint }
} {0 6 0} } {0 3 0}
# At one point, if a reader failed to upgrade to a writer because it # At one point, if a reader failed to upgrade to a writer because it
# was reading an old snapshot, the write-locks were not being released. # was reading an old snapshot, the write-locks were not being released.
@@ -658,7 +658,7 @@ do_multiclient_test tn {
} {a b c d} } {a b c d}
do_test wal-10.$tn.36 { do_test wal-10.$tn.36 {
catchsql { PRAGMA wal_checkpoint } catchsql { PRAGMA wal_checkpoint }
} {0 {0 16 16}} } {0 {0 8 8}}
do_test wal-10.$tn.36 { do_test wal-10.$tn.36 {
sql3 { INSERT INTO t1 VALUES('e', 'f') } sql3 { INSERT INTO t1 VALUES('e', 'f') }
sql2 { SELECT * FROM t1 } sql2 { SELECT * FROM t1 }
@@ -666,7 +666,7 @@ do_multiclient_test tn {
do_test wal-10.$tn.37 { do_test wal-10.$tn.37 {
sql2 COMMIT sql2 COMMIT
execsql { PRAGMA wal_checkpoint } execsql { PRAGMA wal_checkpoint }
} {0 18 18} } {0 9 9}
} }
#------------------------------------------------------------------------- #-------------------------------------------------------------------------