Add the ability to simulate out-of-memory errors when using the default
memory allocator, mem1.c. Fix a bug that this enhancement revealed. (CVS 4875)
FossilOrigin-Name: d55a5e1c11ef90534abd2e5f18d06dd4739ade70
diff --git a/test/malloc_common.tcl b/test/malloc_common.tcl
index fafe643..534241a 100644
--- a/test/malloc_common.tcl
+++ b/test/malloc_common.tcl
@@ -12,15 +12,15 @@
# This file contains common code used by many different malloc tests
# within the test suite.
#
-# $Id: malloc_common.tcl,v 1.13 2008/02/18 22:24:58 drh Exp $
+# $Id: malloc_common.tcl,v 1.14 2008/03/18 00:07:11 drh Exp $
# If we did not compile with malloc testing enabled, then do nothing.
#
-ifcapable !memdebug&&!mem5 {
+ifcapable faultinjector {
+ set MEMDEBUG 1
+} else {
set MEMDEBUG 0
return 0
-} else {
- set MEMDEBUG 1
}
# Usage: do_malloc_test <test number> <options...>