Fix bugs in the altermalloc.test and incrblob_err.test scripts. (CVS 4295)

FossilOrigin-Name: e5ec17071720a973bbd213a8b23038d3aff25315
diff --git a/test/malloc_common.tcl b/test/malloc_common.tcl
index c49f5ac..3e31ef4 100644
--- a/test/malloc_common.tcl
+++ b/test/malloc_common.tcl
@@ -1,4 +1,10 @@
 
+ifcapable !memdebug {
+  puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
+  finish_test
+  return
+}
+
 # Usage: do_malloc_test <test number> <options...>
 #
 # The first argument, <test number>, is an integer used to name the