diff options
author | drh <drh@noemail.net> | 2007-08-12 20:07:58 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-08-12 20:07:58 +0000 |
commit | 3aefabaf94e86c11d30ced084146ece63893a12c (patch) | |
tree | ba8ee686ebb431900bc81fe955b39f2b6503498f | |
parent | 8940f4ee566959b968e6fabf3e0e18500a38b8b6 (diff) | |
download | sqlite-3aefabaf94e86c11d30ced084146ece63893a12c.tar.gz sqlite-3aefabaf94e86c11d30ced084146ece63893a12c.zip |
Updates to test scripts for better support of soft-heap-limit testing. (CVS 4209)
FossilOrigin-Name: 990f621f2247f1636e895dcf51fea1e08f202d31
-rw-r--r-- | manifest | 30 | ||||
-rw-r--r-- | manifest.uuid | 2 | ||||
-rw-r--r-- | test/avtrans.test | 4 | ||||
-rw-r--r-- | test/cache.test | 4 | ||||
-rw-r--r-- | test/capi3.test | 5 | ||||
-rw-r--r-- | test/exclusive.test | 4 | ||||
-rw-r--r-- | test/exclusive2.test | 11 | ||||
-rw-r--r-- | test/incrblob.test | 7 | ||||
-rw-r--r-- | test/lock2.test | 4 | ||||
-rw-r--r-- | test/malloc5.test | 3 | ||||
-rw-r--r-- | test/pageropt.test | 5 | ||||
-rw-r--r-- | test/softheap1.test | 10 |
12 files changed, 58 insertions, 31 deletions
@@ -1,5 +1,5 @@ -C Backout\scheck-in\s(4206)\sand\sreplace\sit\swith\sa\smuch\sbetter\sand\smore\ngeneral\sfix\sfor\sthe\sproblem\sidentified\sin\sticket\s#2565.\s(CVS\s4208) -D 2007-08-11T00:26:21 +C Updates\sto\stest\sscripts\sfor\sbetter\ssupport\sof\ssoft-heap-limit\stesting.\s(CVS\s4209) +D 2007-08-12T20:07:59 F Makefile.in 0c0e53720f658c7a551046442dd7afba0b72bfbe F Makefile.linux-gcc 65241babba6faf1152bf86574477baab19190499 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028 @@ -171,7 +171,7 @@ F test/autovacuum.test 4339e66003b9cf813dd667a83aed2dee27c4c36d F test/autovacuum_crash.test 05a63b8805b20cfba7ace82856ce4ccdda075a31 F test/autovacuum_ioerr.test c46a76869cb6eddbbb40b419b2b6c4c001766b1f F test/autovacuum_ioerr2.test dc189f323cf0546289b5a9bbda60bcb1fe52bd4b -F test/avtrans.test b77740800de0d2cdcf394ef94d2d61225a1941d8 +F test/avtrans.test 365beb46116ec0a1a5b0cab8ce0df63d62367208 F test/badutf.test e5cd3fd946b76fb0d05024156618ed905298f44a F test/between.test 16b1776c6323faadb097a52d673e8e3d8be7d070 F test/bigfile.test ebc9ce9216e08bead63734ab816d0f27858f3b80 @@ -188,9 +188,9 @@ F test/btree7.test a6d3b842db22af97dd14b989e90a2fd96066b72f F test/btree8.test fadc112bcbd6a0c622d34c813fc8a648eacf8804 F test/btree9.test 5d8711b241145b90f65dd1795d5dd8290846fa5e F test/busy.test 0271c854738e23ad76e10d4096a698e5af29d211 -F test/cache.test 9e530b55ba016ca17439f728a06898f0ade5f1da +F test/cache.test 008668c54b38ba5b4c1134ba51447b01ac5520ec F test/capi2.test 7ecc9b342cc9ec27b53bbf95724cf2e5874fd496 -F test/capi3.test 1cf80839d6224126acf82eb824308981fb054ef9 +F test/capi3.test f4e77c300d870653f9fc1b20bef6788f0790b3f1 F test/capi3b.test 664eb55318132f292f2c436f90906f578cad6b97 F test/capi3c.test 76a3fb94755288a2977ee387e95305e6224c0198 F test/cast.test 0302bbc8d1be2f94da1e16ad2eb01ea356e26d18 @@ -225,8 +225,8 @@ F test/distinctagg.test 2b89d1c5220d966a30ba4b40430338669301188b F test/enc.test e54531cd6bf941ee6760be041dff19a104c7acea F test/enc2.test 45710bacfa9df29720bc84c067dfdf8c8ddfb797 F test/enc3.test 9331988b9d72decec96995c90637e87b00d747a5 -F test/exclusive.test 5bc520ba366ae3d242420af025ab64d465b04706 -F test/exclusive2.test 62d0559b4c0c8d4ab67237e46ea6b9cdf4be03e2 +F test/exclusive.test 00d5328b243083ccda7729f275eedc6c4e02ae29 +F test/exclusive2.test d13bf66753dca46e61241d35d36ab7c868b0d313 F test/exclusive3.test 0e49c35b7e7cb8e7280b4ce3f0359d30b207d2ff F test/expr.test b8d63779b043dff06580fe4f3d85e5bebd067957 F test/filefmt.test 053b622009fbbb74dd37921ffad374d852c13cd8 @@ -271,7 +271,7 @@ F test/hook.test 7e7645fd9a033f79cce8fdff151e32715e7ec50a F test/icu.test e6bfae7f625c88fd14df6f540fe835bdfc1e4329 F test/in.test 369cb2aa1eab02296b4ec470732fe8c131260b1d F test/in2.test b1f447f4f0f67e9f83ff931e7e2e30873f9ea055 -F test/incrblob.test 1e74ef0f6df83ec8071d727d8f30295f11de0677 +F test/incrblob.test 4d3d19f4001fe038cfed54f2119b0ec090317577 F test/incrblob_err.test 2501bec57e317e7051451b5093b47fc61a96c85a F test/incrvacuum.test 569347726ea5940c3359e3d8cabb3505595cb82f F test/incrvacuum2.test 82397ceb5941cbe852fd29bb33fcdf5665bc80c2 @@ -300,7 +300,7 @@ F test/limit.test 2a87b9cb2165abb49ca0ddcf5cb43cf24074581f F test/loadext.test 9ab2cb0226329c1a62dd45d204be95158a872201 F test/loadext2.test 95ca7e2cb03fd3e068de97c3a2fe58dbdfd769e1 F test/lock.test 6825aea0b5885578b1b63a3b178803842c4ee9f1 -F test/lock2.test b95915eb4b6f8420acb30c68170d8f0ed9364efe +F test/lock2.test 5f9557b775662c2a5ee435378f39e10d64f65cb3 F test/lock3.test 615111293cf32aa2ed16d01c6611737651c96fb9 F test/lock4.test 49e22396b9be6e047b3d35469f233be79153c9d5 F test/main.test e7212ce1023957c7209778cc87fa932bd79ba89a @@ -308,7 +308,7 @@ F test/malloc.test 45a81af6328381d0630ab0a3d8cb8c58551603f7 F test/malloc2.test 4ed7d719542c4570dec9c2ebe2bbdf3a9f3b0d05 F test/malloc3.test e965954b6f808876a63d3101fd70370320b509a7 F test/malloc4.test 59cd02f71b363302a04c4e77b97c0a1572eaa210 -F test/malloc5.test 30eeb4c5222c85c62b523cf007001ece80fb3437 +F test/malloc5.test 90b1f1ce9f835e6d14fb01be1452169b21d12818 F test/malloc6.test 025ae0b78542e0ddd000d23f79d93e9be9ba0f15 F test/malloc7.test 1cf52834509eac7ebeb92105dacd4669f9ca9869 F test/malloc8.test e4054ca2a87ab1d42255bec009b177ba20b5a487 @@ -334,7 +334,7 @@ F test/null.test 9503e1f63e959544c006d9f01709c5b5eab67d54 F test/pager.test 6c644725db2a79528f67a6f3472b9c9ddee17f05 F test/pager2.test c025f91b75fe65e85febda64d9416428b8a5cab5 F test/pager3.test 2323bf27fd5bd887b580247e5bce500ceee994b4 -F test/pageropt.test b4b38eb3cf76be2be444326856248898bb0e3fc9 +F test/pageropt.test 51e3c091bc2992f5098f7576e3594e1908988939 F test/pagesize.test e0a8b3fe80f8b8e808d94a00734c7a18c76c407e F test/pragma.test b0e73879206934a835856a8b8c4cc884cd8562f3 F test/pragma2.test bb5aa7be00dae2c381fcc782358048a33c955793 @@ -363,7 +363,7 @@ F test/shared2.test 8b48f8d33494413ef4cf250110d89403e2bf6b23 F test/shared3.test 01e3e124dbb3859788aabc7cfb82f7ea04421749 F test/shared_err.test cc528f6e78665787e93d9ce3a782a2ce5179d821 F test/soak.test 64f9b27fbcdec43335a88c546ce1983e6ba40d7b -F test/softheap1.test 2fb06ccd146ed4db04fe63f39e0b02054b38b778 +F test/softheap1.test 0c49aa6eee25e7d32943e85e8d1f20eff566b1dc F test/sort.test 0e4456e729e5a92a625907c63dcdedfbe72c5dc5 F test/speed1.test 22e1b27af0683ed44dcd2f93ed817a9c3e65084a F test/speed2.test 53177056baf6556dcbdcf032bbdfc41c1aa74ded @@ -524,7 +524,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5 -P 51f3e01b7486f23b67bdfb6bb19fc5297b2c8cec -R ad24378930c883b120cb56cf85c1ba0a +P 7961a7385013d74ec78cbdfff6867c505528c163 +R 690155010e3cd347c457c2124998bd06 U drh -Z f296ba7bd96412db5f58676a175db9a3 +Z 29b329640ed678cd299e540cfde97bf2 diff --git a/manifest.uuid b/manifest.uuid index c05df8e94..d1db475c2 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -7961a7385013d74ec78cbdfff6867c505528c163
\ No newline at end of file +990f621f2247f1636e895dcf51fea1e08f202d31
\ No newline at end of file diff --git a/test/avtrans.test b/test/avtrans.test index 35dba8534..c28347e79 100644 --- a/test/avtrans.test +++ b/test/avtrans.test @@ -12,7 +12,7 @@ # file is a copy of "trans.test" modified to run under autovacuum mode. # the point is to stress the autovacuum logic and try to get it to fail. # -# $Id: avtrans.test,v 1.4 2006/02/11 01:25:51 drh Exp $ +# $Id: avtrans.test,v 1.5 2007/08/12 20:07:59 drh Exp $ set testdir [file dirname $argv0] @@ -87,6 +87,7 @@ integrity_check avtrans-2.11 # Check the locking behavior # +sqlite3_soft_heap_limit 0 do_test avtrans-3.1 { execsql { BEGIN; @@ -161,6 +162,7 @@ do_test avtrans-3.14 { } db} msg] lappend v $msg } {0 {1 2 3 4}} +sqlite3_soft_heap_limit $soft_limit integrity_check avtrans-3.15 do_test avtrans-4.1 { diff --git a/test/cache.test b/test/cache.test index 20322fec5..6a463aa8c 100644 --- a/test/cache.test +++ b/test/cache.test @@ -9,7 +9,7 @@ # #*********************************************************************** # -# $Id: cache.test,v 1.2 2007/04/06 21:42:22 drh Exp $ +# $Id: cache.test,v 1.3 2007/08/12 20:07:59 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -18,6 +18,7 @@ ifcapable {!pager_pragmas} { finish_test return } +sqlite3_soft_heap_limit 0 proc pager_cache_size {db} { set bt [btree_from_db $db] @@ -55,5 +56,6 @@ for {set ii 0} {$ii < 10} {incr ii} { } $::cache_size } +sqlite3_soft_heap_limit $soft_limit finish_test diff --git a/test/capi3.test b/test/capi3.test index ac36b890c..650cf09a0 100644 --- a/test/capi3.test +++ b/test/capi3.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script testing the callback-free C/C++ API. # -# $Id: capi3.test,v 1.50 2007/06/21 15:25:05 drh Exp $ +# $Id: capi3.test,v 1.51 2007/08/12 20:07:59 drh Exp $ # set testdir [file dirname $argv0] @@ -310,8 +310,7 @@ proc check_header {STMT test names decltypes} { proc check_origin_header {STMT test dbs tables cols} { # If sqlite3_column_origin_name() and friends are not compiled into # this build, this proc is a no-op. -ifcapable columnmetadata { - + ifcapable columnmetadata { # Use the return value of sqlite3_column_count() to build # a list of column indexes. i.e. If sqlite3_column_count # is 3, build the list {0 1 2}. diff --git a/test/exclusive.test b/test/exclusive.test index 1ce6f6cb2..20e012f8b 100644 --- a/test/exclusive.test +++ b/test/exclusive.test @@ -12,7 +12,7 @@ # of these tests is exclusive access mode (i.e. the thing activated by # "PRAGMA locking_mode = EXCLUSIVE"). # -# $Id: exclusive.test,v 1.5 2007/04/06 21:42:22 drh Exp $ +# $Id: exclusive.test,v 1.6 2007/08/12 20:07:59 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -197,6 +197,7 @@ do_test exclusive-2.5 { INSERT INTO abc VALUES(7, 8, 9); } db2 } {1 {database is locked}} +sqlite3_soft_heap_limit 0 do_test exclusive-2.6 { # Because connection 'db' only has a shared-lock, the other connection # will be able to get a RESERVED, but will fail to upgrade to EXCLUSIVE. @@ -218,6 +219,7 @@ do_test exclusive-2.8 { ROLLBACK; } db2 } {} +sqlite3_soft_heap_limit $soft_limit do_test exclusive-2.9 { # Write the database to establish the exclusive lock with connection 'db. diff --git a/test/exclusive2.test b/test/exclusive2.test index f91496f02..d0eeb19b3 100644 --- a/test/exclusive2.test +++ b/test/exclusive2.test @@ -10,7 +10,7 @@ #*********************************************************************** # This file implements regression tests for SQLite library. # -# $Id: exclusive2.test,v 1.7 2007/07/20 20:25:38 aswift Exp $ +# $Id: exclusive2.test,v 1.8 2007/08/12 20:07:59 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -20,6 +20,11 @@ ifcapable {!pager_pragmas} { return } +# This module does not work right if the cache spills at unexpected +# moments. So disable the soft-heap-limit. +# +sqlite3_soft_heap_limit 0 + proc pagerChangeCounter {filename {new ""}} { set fd [open $filename RDWR] fconfigure $fd -translation binary -encoding binary @@ -165,7 +170,8 @@ do_test exclusive2-1.11 { # # As above, this test is only applicable if the pager cache is # large enough to hold the entire database. With 1024 byte pages, -# this means 19 pages. +# this means 19 pages. We also need to disable the soft-heap-limit +# to prevent memory-induced cache spills. # do_test exclusive2-2.1 { execsql {PRAGMA locking_mode = exclusive;} @@ -286,5 +292,6 @@ do_test exclusive2-3.6 { } readPagerChangeCounter test.db } {5} +sqlite3_soft_heap_limit $soft_limit finish_test diff --git a/test/incrblob.test b/test/incrblob.test index 5cd7040e4..434ac9aaa 100644 --- a/test/incrblob.test +++ b/test/incrblob.test @@ -9,7 +9,7 @@ # #*********************************************************************** # -# $Id: incrblob.test,v 1.12 2007/06/27 00:36:14 drh Exp $ +# $Id: incrblob.test,v 1.13 2007/08/12 20:07:59 drh Exp $ # set testdir [file dirname $argv0] @@ -105,6 +105,8 @@ proc nWrite {db} { return $stats(write) } +sqlite3_soft_heap_limit 0 + foreach AutoVacuumMode [list 0 1] { if {$AutoVacuumMode>0} { @@ -202,6 +204,7 @@ foreach AutoVacuumMode [list 0 1] { nRead db } [expr $AutoVacuumMode ? 4 : 30] } +sqlite3_soft_heap_limit $soft_limit #------------------------------------------------------------------------ # incrblob-3.*: @@ -363,6 +366,7 @@ unset ::text # after the transaction is commited and the blob channel # closed. # +sqlite3_soft_heap_limit 0 do_test incrblob-6.1 { sqlite3 db2 test.db execsql { @@ -438,6 +442,7 @@ do_test incrblob-6.14 { } } {a different invocation} db2 close +sqlite3_soft_heap_limit $soft_limit #----------------------------------------------------------------------- # The following tests verify the behaviour of the incremental IO diff --git a/test/lock2.test b/test/lock2.test index db43d0aba..d071844d0 100644 --- a/test/lock2.test +++ b/test/lock2.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this script is database locks between competing processes. # -# $Id: lock2.test,v 1.7 2007/04/09 11:20:54 danielk1977 Exp $ +# $Id: lock2.test,v 1.8 2007/08/12 20:07:59 drh Exp $ set testdir [file dirname $argv0] @@ -101,6 +101,7 @@ do_test lock2-1.1 { do_test lock2-1.1.1 { execsql {pragma lock_status} } {main unlocked temp closed} +sqlite3_soft_heap_limit 0 do_test lock2-1.2 { execsql { BEGIN; @@ -163,5 +164,6 @@ do_test lock2-1.10 { catch {testfixture $::tf1 {db close}} catch {close $::tf1} +sqlite3_soft_heap_limit $soft_limit finish_test diff --git a/test/malloc5.test b/test/malloc5.test index c4148a042..4f5b7fff2 100644 --- a/test/malloc5.test +++ b/test/malloc5.test @@ -12,7 +12,7 @@ # This file contains test cases focused on the two memory-management APIs, # sqlite3_soft_heap_limit() and sqlite3_release_memory(). # -# $Id: malloc5.test,v 1.11 2007/08/10 16:41:09 drh Exp $ +# $Id: malloc5.test,v 1.12 2007/08/12 20:07:59 drh Exp $ #--------------------------------------------------------------------------- # NOTES ON EXPECTED BEHAVIOUR @@ -37,6 +37,7 @@ ifcapable !memorymanage { return } +sqlite3_soft_heap_limit 0 sqlite3 db test.db do_test malloc5-1.1 { diff --git a/test/pageropt.test b/test/pageropt.test index b03b6644c..41f3d5cb1 100644 --- a/test/pageropt.test +++ b/test/pageropt.test @@ -12,7 +12,7 @@ # The focus of the tests in this file are to verify that the # pager optimizations implemented in version 3.3.14 work. # -# $Id: pageropt.test,v 1.2 2007/04/13 03:23:21 drh Exp $ +# $Id: pageropt.test,v 1.3 2007/08/12 20:07:59 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -51,6 +51,7 @@ proc pagercount_sql {sql {db db}} { # Setup the test database # do_test pageropt-1.1 { + sqlite3_soft_heap_limit 0 execsql { PRAGMA auto_vacuum = OFF; PRAGMA page_size = 1024; @@ -195,6 +196,6 @@ do_test pageroot-4.2 { } } {12 3 3 0} - +sqlite3_soft_heap_limit $soft_limit catch {db2 close} finish_test diff --git a/test/softheap1.test b/test/softheap1.test index 62231a446..97f5aac34 100644 --- a/test/softheap1.test +++ b/test/softheap1.test @@ -13,7 +13,7 @@ # A database corruption bug that occurs in auto_vacuum mode when # the soft_heap_limit is set low enough to be triggered. # -# $Id: softheap1.test,v 1.1 2007/08/10 19:46:44 drh Exp $ +# $Id: softheap1.test,v 1.2 2007/08/12 20:07:59 drh Exp $ set testdir [file dirname $argv0] @@ -24,10 +24,16 @@ do_test softheap1-1.1 { execsql { PRAGMA auto_vacuum=1; CREATE TABLE t1(x); - INSERT INTO t1 VALUES(hex(randomblob(5000))); + INSERT INTO t1 VALUES(hex(randomblob(1000))); BEGIN; + } + execsql { CREATE TABLE t2 AS SELECT * FROM t1; + } + execsql { ROLLBACK; + } + execsql { PRAGMA integrity_check; } } {ok} |