diff --git a/manifest b/manifest index b170f0e40b..57b68d37a5 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Fix\ssome\sproblems\swith\stest\scases\sin\sshared_err.test.\sAlso\sa\sreal\sbug\scausing\sa\ssegfault\safter\san\sIO\serror\sin\spager.c.\s(CVS\s3703) -D 2007-03-19T13:53:38 +C Add\ssome\stest\scases\ssimulating\scrashes\swith\svarious\sstorage\smedium\ssector\ssizes.\s(CVS\s3704) +D 2007-03-19T15:04:54 F Makefile.in 1fe3d0b46e40fd684e1e61f8e8056cefed16de9f F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -184,7 +184,7 @@ F test/conflict.test 8a59399f61a14296a9bfed02e0570590a8a79cba F test/corrupt.test 18c7a995b1af76a8c8600b996257f2c7b7bff083 F test/corrupt2.test 572f8df0303d0ce63ddad5c5c9101a83a345ae46 F test/crash.test 167eb4652eccbedb199b6f21850346c3f5d779fb -F test/crash2.test 18bbb71c41de2b7892562679f3cdb72b86d4cd27 +F test/crash2.test ccc7d5f202aeadc3c13003829e6bb6561129f419 F test/crashtest1.c 09c1c7d728ccf4feb9e481671e29dda5669bbcc2 F test/date.test 63cc718e1d209b10c6b7be8ce72b11addb9f1e04 F test/default.test 252298e42a680146b1dd64f563b95bdf088d94fb @@ -437,7 +437,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513 -P 05700c11a9e5177a437d2240e72fb61ea47b973b -R 5b98dd2b31d3223324e5610c7e38647f +P 9f62ef1ec385d9f1a1913439dc4c2d710373f12a +R 784c351e0fe2c19f26c03e7b8875efc3 U danielk1977 -Z e38c1767e7ac582db2f50d60881eead5 +Z bcc4c2f06f6fc376240bcf364d3a6431 diff --git a/manifest.uuid b/manifest.uuid index e066da992a..144e318cc8 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -9f62ef1ec385d9f1a1913439dc4c2d710373f12a \ No newline at end of file +c3c5f658cf9c69b6e81e63fbde5dd0a854be9fc7 \ No newline at end of file diff --git a/test/crash2.test b/test/crash2.test index 6083de60be..06a2721eee 100644 --- a/test/crash2.test +++ b/test/crash2.test @@ -16,7 +16,7 @@ # specifically, the tests in this file verify this functionality # for storage mediums with various sector sizes. # -# $Id: crash2.test,v 1.2 2007/03/19 05:54:50 danielk1977 Exp $ +# $Id: crash2.test,v 1.3 2007/03/19 15:04:54 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -60,5 +60,65 @@ for {set ii 0} {$ii < 5} {incr ii} { } {ok} } +proc signature {} { + return [db eval {SELECT count(*), md5sum(a), md5sum(b), md5sum(c) FROM abc}] +} + +# Test case for crashing during journal sync with simulated +# sector-size values from 1024 to 8192. +# +do_test crash2-2.0 { + execsql BEGIN + for {set n 0} {$n < 1000} {incr n} { + execsql "INSERT INTO abc VALUES($n, [expr 2*$n], [expr 3*$n])" + } + execsql { + INSERT INTO abc SELECT * FROM abc; + INSERT INTO abc SELECT * FROM abc; + INSERT INTO abc SELECT * FROM abc; + INSERT INTO abc SELECT * FROM abc; + INSERT INTO abc SELECT * FROM abc; + } + execsql COMMIT + expr ([file size test.db] / 1024) > 450 +} {1} +for {set i 1} {$i < 30} {incr i} { + set sig [signature] + set sector [expr 1024 * 1<<($i%4)] + do_test crash-2.$i.1 { + crashsql -blocksize $sector -delay [expr $i%5 + 1] -file test.db-journal " + BEGIN; + SELECT random() FROM abc LIMIT $i; + INSERT INTO abc SELECT randstr(10,10), 0, 0 FROM abc WHERE random()%2==0; + DELETE FROM abc WHERE random()%2!=0; + COMMIT; + " + } {1 {child process exited abnormally}} + do_test crash-2.$i.2 { + signature + } $sig +} + + +# Test case for crashing during database sync with simulated +# sector-size values from 1024 to 8192. +# +for {set i 1} {$i < 10} {incr i} { + set sig [signature] + set sector [expr 1024 * 1<<($i%4)] + do_test crash-3.$i.1 { + crashsql -blocksize $sector -file test.db " + BEGIN; + SELECT random() FROM abc LIMIT $i; + INSERT INTO abc SELECT randstr(10,10), 0, 0 FROM abc WHERE random()%2==0; + DELETE FROM abc WHERE random()%2!=0; + COMMIT; + " + } {1 {child process exited abnormally}} + do_test crash-3.$i.2 { + signature + } $sig +} + finish_test