aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authordan <dan@noemail.net>2010-05-06 15:56:28 +0000
committerdan <dan@noemail.net>2010-05-06 15:56:28 +0000
commitd41a29a653313f97e2360b9a339e43f5fa04da36 (patch)
tree95782c070fb1675e24fc085d3c164200d81427c1 /test
parent84aab39782a2c19650962a81efb92269633907ff (diff)
downloadsqlite-d41a29a653313f97e2360b9a339e43f5fa04da36.tar.gz
sqlite-d41a29a653313f97e2360b9a339e43f5fa04da36.zip
Further coverage tests.
FossilOrigin-Name: 98a9713e0030a36ea99a18a12a2e7685c6db72b3
Diffstat (limited to 'test')
-rw-r--r--test/tester.tcl1
-rw-r--r--test/walfault.test17
2 files changed, 17 insertions, 1 deletions
diff --git a/test/tester.tcl b/test/tester.tcl
index 9cf4a9b59..c88061e9b 100644
--- a/test/tester.tcl
+++ b/test/tester.tcl
@@ -749,6 +749,7 @@ proc do_ioerr_test {testname args} {
# 1. We never hit the IO error and the SQL returned OK
# 2. An IO error was hit and the SQL failed
#
+ #puts "s=$s r=$r q=$q"
expr { ($s && !$r && !$q) || (!$s && $r && $q) }
} {1}
diff --git a/test/walfault.test b/test/walfault.test
index 2830321aa..dedccf236 100644
--- a/test/walfault.test
+++ b/test/walfault.test
@@ -105,6 +105,7 @@ proc do_shmfault_test {name args} {
set A(-sqlprep) ""
set A(-sqlbody) ""
set A(-methods) [list xShmGet xShmOpen xShmSize]
+ set A(-coverageonly) 0
array set A $args
# Create a VFS to use:
@@ -130,6 +131,7 @@ proc do_shmfault_test {name args} {
catch { db close }
+ if {$A(-coverageonly)} { set rc $hit_error }
do_test $name-$mode.$nDelay.1 [list set {} $hit_error] $rc
if {$hit_error==0} break
@@ -139,7 +141,6 @@ proc do_shmfault_test {name args} {
shmfault delete
}
-
do_shmfault_test walfault-shm-1 -sqlbody {
PRAGMA journal_mode = WAL;
CREATE TABLE t1(a PRIMARY KEY, b);
@@ -235,5 +236,19 @@ do_shmfault_test walfault-shm-4 -tclprep {
SELECT count(*) FROM t1;
}
+do_shmfault_test walfault-shm-5 -coverageonly 1 -sqlprep {
+ PRAGMA cache_size = 10;
+ PRAGMA journal_mode = WAL;
+ CREATE TABLE abc(a PRIMARY KEY);
+ INSERT INTO abc VALUES(randomblob(900));
+} -sqlbody {
+ BEGIN;
+ INSERT INTO abc SELECT randomblob(900) FROM abc; /* 1 */
+ INSERT INTO abc SELECT randomblob(900) FROM abc; /* 2 */
+ INSERT INTO abc SELECT randomblob(900) FROM abc; /* 4 */
+ INSERT INTO abc SELECT randomblob(900) FROM abc; /* 8 */
+ ROLLBACK;
+}
+
finish_test