Index: src/test_journal.c ================================================================== --- src/test_journal.c +++ src/test_journal.c @@ -660,11 +660,11 @@ /* ** File control method. For custom operations on an jt-file. */ static int jtFileControl(sqlite3_file *pFile, int op, void *pArg){ jt_file *p = (jt_file *)pFile; - return sqlite3OsFileControl(p->pReal, op, pArg); + return p->pReal->pMethods->xFileControl(p->pReal, op, pArg); } /* ** Return the sector-size in bytes for an jt-file. */ Index: test/malloc5.test ================================================================== --- test/malloc5.test +++ test/malloc5.test @@ -350,11 +350,11 @@ expr [nPage db] + [nPage db2] } {20} do_test malloc5-6.3.2 { # Try to release 7700 bytes. This should release all the # non-dirty pages held by db2. - sqlite3_release_memory [expr 7*1100] + sqlite3_release_memory [expr 7*1132] list [nPage db] [nPage db2] } {10 3} do_test malloc5-6.3.3 { # Try to release another 1000 bytes. This should come fromt the db # cache, since all three pages held by db2 are either in-use or diry. @@ -364,11 +364,11 @@ do_test malloc5-6.3.4 { # Now release 9900 more (about 9 pages worth). This should expunge # the rest of the db cache. But the db2 cache remains intact, because # SQLite tries to avoid calling sync(). if {$::tcl_platform(wordSize)==8} { - sqlite3_release_memory 10177 + sqlite3_release_memory 10500 } else { sqlite3_release_memory 9900 } list [nPage db] [nPage db2] } {0 3} Index: test/walcrash.test ================================================================== --- test/walcrash.test +++ test/walcrash.test @@ -74,11 +74,11 @@ # walcrash-2.* # for {set i 1} {$i < $REPEATS} {incr i} { forcedelete test.db test.db-wal do_test walcrash-2.$i.1 { - crashsql -delay 4 -file test.db-wal -seed [incr seed] { + crashsql -delay 5 -file test.db-wal -seed [incr seed] { PRAGMA journal_mode = WAL; CREATE TABLE t1(a PRIMARY KEY, b); INSERT INTO t1 VALUES(1, 2); INSERT INTO t1 VALUES(3, 4); INSERT INTO t1 VALUES(5, 9); @@ -145,11 +145,11 @@ for {set i 1} {$i < $REPEATS} {incr i} { forcedelete test.db test.db-wal forcedelete test2.db test2.db-wal do_test walcrash-4.$i.1 { - crashsql -delay 3 -file test.db-wal -seed [incr seed] -blocksize 4096 { + crashsql -delay 4 -file test.db-wal -seed [incr seed] -blocksize 4096 { PRAGMA journal_mode = WAL; PRAGMA page_size = 1024; CREATE TABLE t1(a PRIMARY KEY, b); INSERT INTO t1 VALUES(1, 2); INSERT INTO t1 VALUES(3, 4); @@ -173,11 +173,11 @@ for {set i 1} {$i < $REPEATS} {incr i} { forcedelete test.db test.db-wal forcedelete test2.db test2.db-wal do_test walcrash-5.$i.1 { - crashsql -delay 11 -file test.db-wal -seed [incr seed] -blocksize 4096 { + crashsql -delay 13 -file test.db-wal -seed [incr seed] -blocksize 4096 { PRAGMA journal_mode = WAL; PRAGMA page_size = 1024; BEGIN; CREATE TABLE t1(x PRIMARY KEY); INSERT INTO t1 VALUES(randomblob(900)); @@ -214,11 +214,11 @@ for {set i 1} {$i < $REPEATS} {incr i} { forcedelete test.db test.db-wal forcedelete test2.db test2.db-wal do_test walcrash-6.$i.1 { - crashsql -delay 12 -file test.db-wal -seed [incr seed] -blocksize 512 { + crashsql -delay 14 -file test.db-wal -seed [incr seed] -blocksize 512 { PRAGMA journal_mode = WAL; PRAGMA page_size = 1024; BEGIN; CREATE TABLE t1(x PRIMARY KEY); INSERT INTO t1 VALUES(randomblob(900)); @@ -232,13 +232,13 @@ INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 24 */ INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 28 */ INSERT INTO t1 SELECT randomblob(900) FROM t1 LIMIT 4; /* 32 */ PRAGMA wal_checkpoint; - INSERT INTO t1 VALUES(randomblob(900)); - INSERT INTO t1 VALUES(randomblob(900)); - INSERT INTO t1 VALUES(randomblob(900)); + INSERT INTO t1 VALUES(randomblob(9000)); + INSERT INTO t1 VALUES(randomblob(9000)); + INSERT INTO t1 VALUES(randomblob(9000)); } } {1 {child process exited abnormally}} do_test walcrash-6.$i.2 { sqlite3 db test.db Index: test/walfault.test ================================================================== --- test/walfault.test +++ test/walfault.test @@ -121,11 +121,10 @@ set {} {} } -test { faultsim_test_result {0 {}} } - #-------------------------------------------------------------------------- # if {[permutation] != "inmemory_journal"} { faultsim_delete_and_reopen faultsim_save_and_close @@ -139,11 +138,13 @@ INSERT INTO t1 VALUES('a', 'b'); PRAGMA wal_checkpoint; SELECT * FROM t1; } } -test { - faultsim_test_result {0 {wal 0 7 7 a b}} + # Update: The following changed from {0 {wal 0 7 7 a b}} as a result + # of PSOW being set by default. + faultsim_test_result {0 {wal 0 5 5 a b}} faultsim_integrity_check } } #-------------------------------------------------------------------------- @@ -540,12 +541,13 @@ db eval { PRAGMA wal_checkpoint = full; INSERT INTO abc VALUES(randomblob(1500)); } } -test { - faultsim_test_result {0 {0 10 10}} + faultsim_test_result {0 {0 9 9}} faultsim_integrity_check set nRow [db eval {SELECT count(*) FROM abc}] if {!(($nRow==2 && $testrc) || $nRow==3)} { error "Bad db content" } } +finish_test finish_test