]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a coverage test to pagerfault.test.
authordan <dan@noemail.net>
Thu, 24 Jun 2010 13:24:26 +0000 (13:24 +0000)
committerdan <dan@noemail.net>
Thu, 24 Jun 2010 13:24:26 +0000 (13:24 +0000)
FossilOrigin-Name: b58db67e972b5660e62a9b7daa2c1e87c3cf0a68

manifest
manifest.uuid
test/pagerfault.test

index f70103bc90899eaa23093082fdf89a1f6f40333e..f8510203a8ed81b0c0aba0da3cee2ec1696a7830 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Add\scoverage\stests.\sRemove\sa\sNEVER\smacro\sfrom\spager.c,\sas\sthe\scondition\scan\snow\sbe\strue\sin\swal\smode.
-D 2010-06-24T10:50:18
+C Add\sa\scoverage\stest\sto\spagerfault.test.
+D 2010-06-24T13:24:26
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -536,7 +536,7 @@ F test/null.test a8b09b8ed87852742343b33441a9240022108993
 F test/openv2.test af02ed0a9cbc0d2a61b8f35171d4d117e588e4ec
 F test/pager1.test 2fb769a4f121b4e27525ea7e38d6d0176a0c2a9f
 F test/pager2.test f5c757c271ce642d36a393ecbfb3aef1c240dcef
-F test/pagerfault.test d0112f04b2759d74dda4c2ff1352e344a6d162f9
+F test/pagerfault.test 07675504c11afc17aaad80e29eb52280410b32fd
 F test/pageropt.test 8146bf448cf09e87bb1867c2217b921fb5857806
 F test/pagesize.test 76aa9f23ecb0741a4ed9d2e16c5fa82671f28efb
 F test/pcache.test 4118a183908ecaed343a06fcef3ba82e87e0129d
@@ -825,7 +825,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
-P 2e6a462cebc05bfd4648d26dd5ae70b68844aa5f
-R 6f0d6e2596113b96c1a8578d8b29dee5
+P 7aac9ad6dd14b1c56eb8e4750ac769c6197c30bd
+R 6bfdd9c466b6b731b932420ffb1520cb
 U dan
-Z e559ebbb3187a59709a564e36f19cc0a
+Z 5231888a9214ebb7e83363a5d8c6dab6
index bb95efc390a9565f2ad01ca5c65251e5e5142699..0788c1e582d0070ff1ff8f2caac24806a1786bb9 100644 (file)
@@ -1 +1 @@
-7aac9ad6dd14b1c56eb8e4750ac769c6197c30bd
\ No newline at end of file
+b58db67e972b5660e62a9b7daa2c1e87c3cf0a68
\ No newline at end of file
index 0656376108ca24e040d8ddaf4ace7d33f350c3c7..b6b0d277a63b089ef9d270fb4568e1ecea790b16 100644 (file)
@@ -378,7 +378,6 @@ do_test pagerfault-8-pre2 {
   execsql { DELETE FROM t1 WHERE a>32 }
   expr {[file size test.db] < $filesize}
 } {1}
-breakpoint
 do_faultsim_test pagerfault-8 -prep {
   faultsim_restore_and_reopen
   execsql { 
@@ -392,4 +391,46 @@ do_faultsim_test pagerfault-8 -prep {
   faultsim_integrity_check
 }
 
+do_test pagerfault-9-pre1 {
+  faultsim_delete_and_reopen
+  execsql {
+    PRAGMA auto_vacuum = incremental;
+    CREATE TABLE t1(x);
+    CREATE TABLE t2(y);
+    CREATE TABLE t3(z);
+
+    INSERT INTO t1 VALUES(randomblob(900));
+    INSERT INTO t1 VALUES(randomblob(900));
+    DELETE FROM t1;
+  }
+  faultsim_save_and_close
+} {}
+
+do_faultsim_test pagerfault-9 -faults oom-transient -prep {
+  faultsim_restore_and_reopen
+  execsql { 
+    BEGIN;
+      INSERT INTO t1 VALUES(randomblob(900));
+      INSERT INTO t1 VALUES(randomblob(900));
+      DROP TABLE t3;
+      DROP TABLE t2;
+      SAVEPOINT abc;
+        PRAGMA incremental_vacuum;
+  }
+} -body {
+  execsql {
+    ROLLBACK TO abc;
+    COMMIT;
+    PRAGMA freelist_count
+  }
+} -test {
+  faultsim_test_result {0 2}
+  faultsim_integrity_check
+
+  set sl [db one { SELECT COALESCE(sum(length(x)), 'null') FROM t1 }]
+  if {$sl!="null" && $sl!=1800} { 
+    error "Content looks no good... ($sl)" 
+  }
+}
+
 finish_test