diff options
author | drh <drh@noemail.net> | 2007-08-30 02:26:53 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-08-30 02:26:53 +0000 |
commit | c1a7f9409898df17377cc17be3a498448340fd3d (patch) | |
tree | 7b0d9f24d6fe180fcfaab6d986cdc3c072103de3 | |
parent | fb98264aaba7d2c6cc1661cd21b15281014b8246 (diff) | |
download | sqlite-c1a7f9409898df17377cc17be3a498448340fd3d.tar.gz sqlite-c1a7f9409898df17377cc17be3a498448340fd3d.zip |
Test case fixes for fulltest. (CVS 4329)
FossilOrigin-Name: cddce4950569ac49c1a5224b200b00dcd83a2ba4
-rw-r--r-- | manifest | 14 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | test/rollback.test | 7 | ||||
-rw-r--r-- | test/shared_err.test | 45 |
4 files changed, 37 insertions, 31 deletions
@@ -1,5 +1,5 @@ -C Fix\sfor\sthe\ssqlite3AbortOtherActiveVdbes()\sproblem.\s(CVS\s4328) -D 2007-08-30T01:19:59 +C Test\scase\sfixes\sfor\sfulltest.\s(CVS\s4329) +D 2007-08-30T02:26:54 F Makefile.in bfcc303429a5d9dcd552d807ee016c77427418c3 F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -387,7 +387,7 @@ F test/quick.test 88844a19f6d9dc5c990e01c7dd611d33d022a1c1 F test/quote.test 215897dbe8de1a6f701265836d6601cc6ed103e6 F test/rdonly.test b34db316525440d3b42c32e83942c02c37d28ef0 F test/reindex.test 38b138abe36bf9a08c791ed44d9f76cd6b97b78b -F test/rollback.test 673cd8c44c685ad54987fe7f0eeba84efa09685d +F test/rollback.test ee0bbe2b5bf30aba3e6eeb50a2a7e475ac79eb70 F test/rowid.test d125991eea1ffdea800d48471afd8fc4acc10b01 F test/safety.test 4a06934e45d03b8b50ebcd8d174eb0367d2fd851 F test/schema.test 401585200727464ef6bb0b3ba0f085f99a87cdce @@ -403,7 +403,7 @@ F test/server1.test f5b790d4c0498179151ca8a7715a65a7802c859c F test/shared.test 08b30d5f1939efff0517e7ff8ec7b74ad31c151b F test/shared2.test 0ee9de8964d70e451936a48c41cb161d9134ccf4 F test/shared3.test 01e3e124dbb3859788aabc7cfb82f7ea04421749 -F test/shared_err.test 494a24f6ba5994d4e4e8fe57ce8c6253e545409a +F test/shared_err.test ae8ba4ccca50e742c1b5fdbd504a2a0f3b3e67dd F test/soak.test 64f9b27fbcdec43335a88c546ce1983e6ba40d7b F test/softheap1.test 0c49aa6eee25e7d32943e85e8d1f20eff566b1dc F test/sort.test 0e4456e729e5a92a625907c63dcdedfbe72c5dc5 @@ -567,7 +567,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 35cb63ecfd9d8ca7304aae1b150ee5d1c3498bde -R 29b78abcd06801b9626610a433b86a61 +P e40d40a5d41c491bef852a92e5846b273b206909 +R c839fab02b445dc9c276b91a0eebee5f U drh -Z 1ee4e75dc5784f54890a8213aed8fba0 +Z 319e3e5c3c386bc32b0490ba9c2b3ff7 diff --git a/manifest.uuid b/manifest.uuid index 0ff5f1b9d..9998f7879 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e40d40a5d41c491bef852a92e5846b273b206909
\ No newline at end of file +cddce4950569ac49c1a5224b200b00dcd83a2ba4
\ No newline at end of file diff --git a/test/rollback.test b/test/rollback.test index 0dfdd3f3a..9d4c1b5ba 100644 --- a/test/rollback.test +++ b/test/rollback.test @@ -13,7 +13,7 @@ # caused by an ON CONFLICT ROLLBACK clause aborts any other pending # statements. # -# $Id: rollback.test,v 1.4 2006/01/17 09:35:02 danielk1977 Exp $ +# $Id: rollback.test,v 1.5 2007/08/30 02:26:54 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -58,16 +58,17 @@ ifcapable conflict { # Try to continue with the SELECT statement # +btree_breakpoint do_test rollback-1.5 { sqlite3_step $STMT - } {SQLITE_ABORT} + } {SQLITE_ERROR} } # Restart the SELECT statement # do_test rollback-1.6 { sqlite3_reset $STMT -} {SQLITE_OK} +} {SQLITE_ABORT} do_test rollback-1.7 { sqlite3_step $STMT } {SQLITE_ROW} diff --git a/test/shared_err.test b/test/shared_err.test index 0496cd37d..5000d2783 100644 --- a/test/shared_err.test +++ b/test/shared_err.test @@ -13,7 +13,7 @@ # cache context. What happens to connection B if one connection A encounters # an IO-error whilst reading or writing the file-system? # -# $Id: shared_err.test,v 1.14 2007/08/28 23:28:09 drh Exp $ +# $Id: shared_err.test,v 1.15 2007/08/30 02:26:54 drh Exp $ proc skip {args} {} @@ -202,7 +202,7 @@ do_ioerr_test shared_ioerr-3 -tclprep { expr { ($::steprc eq "SQLITE_ROW" && $::finalrc eq "SQLITE_OK") || ($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_IOERR") || - ($::steprc eq "SQLITE_ABORT" && $::finalrc eq "SQLITE_OK") + ($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_ABORT") } } {1} @@ -282,7 +282,7 @@ do_ioerr_test shared_ioerr-3rev -tclprep { expr { ($::steprc eq "SQLITE_ROW" && $::finalrc eq "SQLITE_OK") || ($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_IOERR") || - ($::steprc eq "SQLITE_ABORT" && $::finalrc eq "SQLITE_OK") + ($::steprc eq "SQLITE_ERROR" && $::finalrc eq "SQLITE_ABORT") } } {1} @@ -292,7 +292,7 @@ do_ioerr_test shared_ioerr-3rev -tclprep { # Only run these tests if memory debugging is turned on. # -if {[info command sqlite_malloc_stat]==""} { +ifcapable !memdebug { puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..." db close sqlite3_enable_shared_cache $::enable_shared_cache @@ -309,7 +309,7 @@ if {[info command sqlite_malloc_stat]==""} { # owns the cursor (the one for which the position is not saved) should # continue unaffected. # -do_malloc_test 4 -tclprep { +do_malloc_test shared_err-4 -tclprep { sqlite3 db2 test.db execsql { PRAGMA read_uncommitted = 1; @@ -333,7 +333,7 @@ do_malloc_test 4 -tclprep { } -cleanup { do_test shared_malloc-4.$::n.cleanup.1 { set ::rc [sqlite3_step $::STMT] - expr {$::rc=="SQLITE_ROW" || $::rc=="SQLITE_ABORT"} + expr {$::rc=="SQLITE_ROW" || $::rc=="SQLITE_ERROR"} } {1} if {$::rc=="SQLITE_ROW"} { do_test shared_malloc-4.$::n.cleanup.2 { @@ -341,13 +341,15 @@ do_malloc_test 4 -tclprep { } {2222222222} } do_test shared_malloc-4.$::n.cleanup.3 { - sqlite3_finalize $::STMT - } {SQLITE_OK} + set rc [sqlite3_finalize $::STMT] + expr {$rc=="SQLITE_OK" || $rc=="SQLITE_ABORT" || $rc=="SQLITE_NOMEM"} + } {1} # db2 eval {select * from sqlite_master} db2 close } -do_malloc_test 5 -tclbody { +do_malloc_test shared_err-5 -tclbody { + db close sqlite3 dbX test.db sqlite3 dbY test.db dbX close @@ -357,7 +359,7 @@ do_malloc_test 5 -tclbody { catch {dbY close} } -do_malloc_test 6 -tclbody { +do_malloc_test shared_err-6 -tclbody { catch {db close} sqlite3_thread_cleanup sqlite3_enable_shared_cache 0 @@ -365,13 +367,15 @@ do_malloc_test 6 -tclbody { sqlite3_enable_shared_cache 1 } -do_test shared_misuse-7.1 { - sqlite3 db test.db - catch { - sqlite3_enable_shared_cache 0 - } msg - set msg -} {library routine called out of sequence} +# As of 3.5.0, sqlite3_enable_shared_cache can be called at +# any time and from any thread +#do_test shared_err-misuse-7.1 { +# sqlite3 db test.db +# catch { +# sqlite3_enable_shared_cache 0 +# } msg +# set msg +#} {library routine called out of sequence} # Again provoke a malloc() failure when a cursor position is being saved, # this time during a ROLLBACK operation by some other handle. @@ -381,7 +385,7 @@ do_test shared_misuse-7.1 { # be aborted. # set ::aborted 0 -do_malloc_test 8 -tclprep { +do_malloc_test shared_err-8 -tclprep { sqlite3 db2 test.db execsql { PRAGMA read_uncommitted = 1; @@ -413,12 +417,13 @@ do_malloc_test 8 -tclprep { do_test shared_malloc-8.$::n.cleanup.2 { set rc1 [sqlite3_step $::STMT] set rc2 [sqlite3_finalize $::STMT] - if {$rc1=="SQLITE_ABORT"} { + if {$rc2=="SQLITE_ABORT"} { incr ::aborted } expr { ($rc1=="SQLITE_DONE" && $rc2=="SQLITE_OK") || - ($rc1=="SQLITE_ABORT" && $rc2=="SQLITE_OK") + ($rc1=="SQLITE_ERROR" && $rc2=="SQLITE_ABORT") || + ($rc1=="SQLITE_ERROR" && $rc2=="SQLITE_NOMEM") } } {1} db2 close |