]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Modify the memsubsys1-3.1.4 test so that it does not fail arbitrarily due
authordrh <drh@noemail.net>
Tue, 19 Aug 2014 23:04:49 +0000 (23:04 +0000)
committerdrh <drh@noemail.net>
Tue, 19 Aug 2014 23:04:49 +0000 (23:04 +0000)
to variations in the behavior of system malloc().

FossilOrigin-Name: d280157da0b5275f3e3c875d2dcfb9998d374ac0

manifest
manifest.uuid
test/memsubsys1.test

index d226fa4f962612f6fc9c30c29b889341875cd452..c6aee7c71675b14045ccc4e311db302726bd7f0a 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C A\sbetter\sfix\sfor\sthe\ssqlite3_trace()\sproblem.\nTicket\s[11d5aa455e0d98f3c1e6a]
-D 2014-08-19T20:41:36.374
+C Modify\sthe\smemsubsys1-3.1.4\stest\sso\sthat\sit\sdoes\snot\sfail\sarbitrarily\sdue\nto\svariations\sin\sthe\sbehavior\sof\ssystem\smalloc().
+D 2014-08-19T23:04:49.204
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 5eb79e334a5de69c87740edd56af6527dd219308
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -702,7 +702,7 @@ F test/manydb.test 28385ae2087967aa05c38624cec7d96ec74feb3e
 F test/mem5.test c6460fba403c5703141348cd90de1c294188c68f
 F test/memdb.test fcb5297b321b562084fc79d64d5a12a1cd2b639b
 F test/memleak.test 10b9c6c57e19fc68c32941495e9ba1c50123f6e2
-F test/memsubsys1.test f97cfd0b30e85c2f1ed16d642e7ac58006be84b2
+F test/memsubsys1.test bf270964ab83bc2da5927960f78304a866fb9a9d
 F test/memsubsys2.test 3a1c1a9de48e5726faa85108b02459fae8cb9ee9
 F test/minmax.test 42fbad0e81afaa6e0de41c960329f2b2c3526efd
 F test/minmax2.test b44bae787fc7b227597b01b0ca5575c7cb54d3bc
@@ -1186,7 +1186,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
 F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
-P 0d4d3df4bc5e75ce1543b5539a1e9e279d2a062f
-R 3e9fe87a97e756aac5d53e0b321cfb1c
+P 44d5bd4cc3f76e9a151ba0abae1092bd184af264
+R da9b4e10fd35ea0494fda63ca4df66ec
 U drh
-Z dae8e8935ea979fe699fbe5ad58485b9
+Z 375791abd440beaccbf3e162957d1a64
index 270766200fd7750e984c1a1948e20bf489b6b88e..a915b839b0d33c24ba7498e40f19a0e94e550f5a 100644 (file)
@@ -1 +1 @@
-44d5bd4cc3f76e9a151ba0abae1092bd184af264
\ No newline at end of file
+d280157da0b5275f3e3c875d2dcfb9998d374ac0
\ No newline at end of file
index 76b79d00f6484bd9cb0e08acc8067a942df11886..8cc7c2afc1e7cabae979d575b98b262b9e235711 100644 (file)
@@ -124,7 +124,13 @@ do_test memsubsys1-3.1.3 {
 } 0
 do_test memsubsys1-3.1.4 {
   set overflow [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
-} $max_pagecache
+  # Note:  The measured PAGECACHE_OVERFLOW is amount malloc() returns, not what
+  # was requested.  System malloc() implementations might (arbitrarily) return
+  # slightly different oversize buffers, which can result in slightly different
+  # PAGECACHE_OVERFLOW sizes between consecutive runs.  So we cannot do an
+  # exact comparison.  Simply verify that the amount is within 5%.
+  expr {$overflow>=$max_pagecache*0.95 && $overflow<=$max_pagecache*1.05}
+} 1
 do_test memsubsys1-3.1.5 {
   set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2]
 } 0