]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Change to test code and scripts allowing memsys3 to be tested using a build that...
authordanielk1977 <danielk1977@noemail.net>
Wed, 1 Jul 2009 18:09:01 +0000 (18:09 +0000)
committerdanielk1977 <danielk1977@noemail.net>
Wed, 1 Jul 2009 18:09:01 +0000 (18:09 +0000)
FossilOrigin-Name: a00aeec21cca7ccf19d4cdef618149aa2773c005

manifest
manifest.uuid
src/test_malloc.c
test/permutations.test

index 79169a9ae5cb675686b53080b8864a20865d3ab6..01afcc097bfa6da271259849392b2c25de1fc2fa 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sa\s1-byte\sbuffer\soverwrite\sthat\scan\soccur\swhen\sa\svirtual\stable\soverloads\san\sSQL\sfunction.\s(CVS\s6833)
-D 2009-07-01T18:04:21
+C Change\sto\stest\scode\sand\sscripts\sallowing\smemsys3\sto\sbe\stested\susing\sa\sbuild\sthat\shas\sboth\smemsys3\sand\smemsys5\senabled.\s(CVS\s6834)
+D 2009-07-01T18:09:02
 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
 F Makefile.in 8b8fb7823264331210cddf103831816c286ba446
 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@@ -186,7 +186,7 @@ F src/test_func.c b8140bc4ed0d290d5e22972eb2a3bfd40aa798dc
 F src/test_hexio.c 2f1122aa3f012fa0142ee3c36ce5c902a70cd12f
 F src/test_journal.c dab49b7c47b53242f039c9563b18cafb67ebfe03
 F src/test_loadext.c 97dc8800e46a46ed002c2968572656f37e9c0dd9
-F src/test_malloc.c c3aabe4b48d1f4f1e78b6561ce92ca04b7495ee5
+F src/test_malloc.c d054506b095d711e4e5575558dd576a2cbf035a2
 F src/test_md5.c 032ae2bb6f81da350d2404e81fa8d560c8268026
 F src/test_mutex.c 482d9d987c1c678199691efc23c8cd3464e01ff5
 F src/test_onefile.c d2c3126633592aeef14e8d268fc40c74449b69d8
@@ -497,7 +497,7 @@ F test/pageropt.test 3ee6578891baaca967f0bd349e4abfa736229e1a
 F test/pagesize.test 0d9ff3fedfce6e5ffe8fa7aca9b6d3433a2e843b
 F test/pcache.test eebc4420b37cb07733ae9b6e99c9da7c40dd6d58
 F test/pcache2.test 46efd980a89f737847b99327bda19e08fe11e402
-F test/permutations.test 1e811e5598ca22cfa2482cf4699ddd069200c78e
+F test/permutations.test 1ce2874df8fec876d0b963c7a3ef61c4e9df8827
 F test/pragma.test a35b0be36542477183168cdb8b743f5c0d883c4d
 F test/pragma2.test 5364893491b9231dd170e3459bfc2e2342658b47
 F test/printf.test 47e9e5bbec8509023479d54ceb71c9d05a95308a
@@ -738,7 +738,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
 F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
 F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746
-P 29b48972b65a17dab343b063a620cf8d456a923c
-R 88ce6118d616e71c0f1f18756951eecb
+P bfe336a8993e06e70d3c32a929202fb015dcbb89
+R 0f03c3ef155d0847bfc480ff47fa3b16
 U danielk1977
-Z 258584205553a4e9af935a9ece340ce8
+Z 38cf89225507916cb0e9c0931bd7d0cf
index f2fd7de35559d5907710abe7ce87f23a01032665..60596de4e97c302c2cbdec8e27df7b531e3c09db 100644 (file)
@@ -1 +1 @@
-bfe336a8993e06e70d3c32a929202fb015dcbb89
\ No newline at end of file
+a00aeec21cca7ccf19d4cdef618149aa2773c005
\ No newline at end of file
index 78bb281285cc01147d0367aca6f7c4f49719e2b5..ff2ced3295af90dfed73e6e026fba1f9d240468f 100644 (file)
@@ -13,7 +13,7 @@
 ** This file contains code used to implement test interfaces to the
 ** memory allocation subsystem.
 **
-** $Id: test_malloc.c,v 1.54 2009/04/07 11:21:29 danielk1977 Exp $
+** $Id: test_malloc.c,v 1.55 2009/07/01 18:09:02 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include "tcl.h"
@@ -1342,6 +1342,24 @@ static int test_install_malloc_faultsim(
   return TCL_OK;
 }
 
+/*
+** sqlite3_install_memsys3
+*/
+static int test_install_memsys3(
+  void * clientData,
+  Tcl_Interp *interp,
+  int objc,
+  Tcl_Obj *CONST objv[]
+){
+  int rc = SQLITE_MISUSE;
+#ifdef SQLITE_ENABLE_MEMSYS3
+  const sqlite3_mem_methods *sqlite3MemGetMemsys3(void);
+  rc = sqlite3_config(SQLITE_CONFIG_MALLOC, sqlite3MemGetMemsys3());
+#endif
+  Tcl_SetResult(interp, (char *)sqlite3TestErrorName(rc), TCL_VOLATILE);
+  return TCL_OK;
+}
+
 /*
 ** Register commands with the TCL interpreter.
 */
@@ -1378,6 +1396,7 @@ int Sqlitetest_malloc_Init(Tcl_Interp *interp){
      { "sqlite3_db_config_lookaside",test_db_config_lookaside      ,0 },
      { "sqlite3_dump_memsys3",       test_dump_memsys3             ,3 },
      { "sqlite3_dump_memsys5",       test_dump_memsys3             ,5 },
+     { "sqlite3_install_memsys3",    test_install_memsys3          ,0 },
   };
   int i;
   for(i=0; i<sizeof(aObjCmd)/sizeof(aObjCmd[0]); i++){
index c875459ee6a46752740a37364b073a6110c7d68f..2dec29968f3e672d4cfd4f464ceda84060cbc3a1 100644 (file)
@@ -9,7 +9,7 @@
 #
 #***********************************************************************
 #
-# $Id: permutations.test,v 1.50 2009/05/13 14:46:10 danielk1977 Exp $
+# $Id: permutations.test,v 1.51 2009/07/01 18:09:02 danielk1977 Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -483,13 +483,21 @@ ifcapable mem3 {
     bitvec.test               index2.test               memsubsys1.test
     capi3c.test               ioerr.test                memsubsys2.test
     capi3.test                join3.test                pagesize.test
-    collate5.test             limit.test
+    collate5.test             limit.test                backup_ioerr.test
+    backup_malloc.test
   } -initialize {
     catch {db close}
     sqlite3_reset_auto_extension
     sqlite3_shutdown
     sqlite3_config_heap 25000000 0
     sqlite3_config_lookaside 0 0
+    ifcapable mem5 {
+      # If both memsys3 and memsys5 are enabled in the build, the call to
+      # [sqlite3_config_heap] will initialize the system to use memsys5.
+      # The following overrides this preference and installs the memsys3
+      # allocator.
+      sqlite3_install_memsys3
+    }
     install_malloc_faultsim 1 
     sqlite3_initialize
     autoinstall_test_functions