Modify the memsubsys1-3.1.4 test so that it does not fail arbitrarily due
to variations in the behavior of system malloc(). FossilOrigin-Name: d280157da0b5275f3e3c875d2dcfb9998d374ac0
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user