aboutsummaryrefslogtreecommitdiff
path: root/test/mallocA.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/mallocA.test')
-rw-r--r--test/mallocA.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/test/mallocA.test b/test/mallocA.test
index 61e88a61e..d6d6de822 100644
--- a/test/mallocA.test
+++ b/test/mallocA.test
@@ -25,7 +25,6 @@ if {!$MEMDEBUG} {
return
}
-
# Construct a test database
#
forcedelete test.db.bu
@@ -116,6 +115,28 @@ ifcapable stat3 {
}
}
+do_execsql_test 7.0 {
+ PRAGMA cache_size = 5;
+}
+do_faultsim_test 7 -faults oom-trans* -prep {
+ if {$iFail < 500} { set iFail 2000 }
+ if {$iFail > 1215} { set iFail 2000 }
+} -body {
+ execsql {
+ WITH r(x,y) AS (
+ SELECT 1, randomblob(100)
+ UNION ALL
+ SELECT x+1, randomblob(100) FROM r
+ LIMIT 1000
+ )
+ SELECT count(x), length(y) FROM r GROUP BY (x%5)
+ }
+} -test {
+ set res [list 200 100 200 100 200 100 200 100 200 100]
+ faultsim_test_result [list 0 $res]
+}
+
+
# Ensure that no file descriptors were leaked.
do_test malloc-99.X {
catch {db close}