/ Check-in [f83b07ac]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix some test cases in walfault.test. Extend one test case to restore code coverage. Add wal5.test to the "coverage-wal" permutation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f83b07ace340c9dd3e0cbe3cd3c106db003b0bd4
User & Date: dan 2011-02-07 16:24:39
Context
2011-02-07
23:56
Cleanup to the OP_Checkpoint opcode. check-in: f611a5a8 user: drh tags: trunk
16:24
Fix some test cases in walfault.test. Extend one test case to restore code coverage. Add wal5.test to the "coverage-wal" permutation. check-in: f83b07ac user: dan tags: trunk
15:12
Change blocking-checkpoint tests so that they run once using "PRAGMA wal_checkpoint" and once using calls to sqlite3_wal_checkpoint_v2(). Also fix edge cases surrounding the output variables set by wal_checkpoint_v2(). check-in: 5a4b6652 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/permutations.test.

   194    194   #
   195    195   test_suite "coverage-wal" -description {
   196    196     Coverage tests for file wal.c.
   197    197   } -files {
   198    198     wal.test       wal2.test     wal3.test       walmode.test    
   199    199     walbak.test    walhook.test  walcrash2.test  walcksum.test
   200    200     walfault.test  walbig.test   walnoshm.test
          201  +  wal5.test
   201    202   } 
   202    203   
   203    204   test_suite "coverage-pager" -description {
   204    205     Coverage tests for file pager.c.
   205    206   } -files {
   206    207     pager1.test    pager2.test  pagerfault.test  pagerfault2.test
   207    208     walfault.test  walbak.test  journal2.test    tkt-9d68c883.test

Changes to test/walfault.test.

   114    114   do_faultsim_test walfault-3 -prep {
   115    115     faultsim_restore_and_reopen
   116    116   } -body {
   117    117     db eval {
   118    118       DELETE FROM abc;
   119    119       PRAGMA wal_checkpoint;
   120    120     }
          121  +  set {} {}
   121    122   } -test {
   122    123     faultsim_test_result {0 {}}
   123    124   }
   124    125   
   125    126   
   126    127   #--------------------------------------------------------------------------
   127    128   #
................................................................................
   135    136         PRAGMA journal_mode = WAL;
   136    137         CREATE TABLE t1(a PRIMARY KEY, b);
   137    138         INSERT INTO t1 VALUES('a', 'b');
   138    139         PRAGMA wal_checkpoint;
   139    140         SELECT * FROM t1;
   140    141       }
   141    142     } -test {
   142         -    faultsim_test_result {0 {wal a b}}
          143  +    faultsim_test_result {0 {wal 0 7 7 a b}}
   143    144       faultsim_integrity_check
   144    145     } 
   145    146   }
   146    147   
   147    148   #--------------------------------------------------------------------------
   148    149   #
   149    150   do_test walfault-5-pre-1 {
................................................................................
   405    406     catch { db2 close }
   406    407     faultsim_restore_and_reopen
   407    408     shmfault filter xShmMap
   408    409   } -body {
   409    410     db eval { SELECT count(*) FROM abc }
   410    411     sqlite3 db2 test.db -vfs shmfault
   411    412     db2 eval { PRAGMA wal_checkpoint }
          413  +  set {} {}
   412    414   } -test {
   413    415     faultsim_test_result {0 {}}
   414    416   }
   415    417   
   416    418   #-------------------------------------------------------------------------
   417    419   # Test the handling of the various IO/OOM/SHM errors that may occur during 
   418    420   # a log recovery operation undertaken as part of a call to 
................................................................................
   530    532     }
   531    533     faultsim_save_and_close
   532    534   } {}
   533    535   do_faultsim_test walfault-14 -prep {
   534    536     faultsim_restore_and_reopen
   535    537   } -body {
   536    538     db eval { 
   537         -    PRAGMA wal_checkpoint;
          539  +    PRAGMA wal_checkpoint = full;
   538    540       INSERT INTO abc VALUES(randomblob(1500));
   539    541     }
   540    542   } -test {
   541         -  faultsim_test_result {0 {}}
          543  +  faultsim_test_result {0 {0 10 10}}
   542    544     faultsim_integrity_check
   543    545     set nRow [db eval {SELECT count(*) FROM abc}]
   544    546     if {!(($nRow==2 && $testrc) || $nRow==3)} { error "Bad db content" }
   545    547   }
   546    548   
   547    549   finish_test