/ Check-in [d66e08fd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Enable threadsafe builds by default in configure. Ticket #2606. Changes to test scripts to do better testing under all configurations. (CVS 4379)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d66e08fd4f12407e565dc9fc53a5802216808378
User & Date: drh 2007-09-03 16:12:09
Context
2007-09-03
16:45
Fix the incrblob.test on windows. Disable line terminator translation. (CVS 4380) check-in: ccbd2efe user: drh tags: trunk
16:12
Enable threadsafe builds by default in configure. Ticket #2606. Changes to test scripts to do better testing under all configurations. (CVS 4379) check-in: d66e08fd user: drh tags: trunk
15:42
Test script fixes to get things running under varying configurations. No changes to code. (CVS 4378) check-in: 340a6d09 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

    48     48   
    49     49   # The library that programs using readline() must link against.
    50     50   #
    51     51   LIBREADLINE = @TARGET_READLINE_LIBS@
    52     52   
    53     53   # Should the database engine be compiled threadsafe
    54     54   #
    55         -TCC += -DTHREADSAFE=@THREADSAFE@
           55  +TCC += -DSQLITE_THREADSAFE=@SQLITE_THREADSAFE@
    56     56   
    57     57   # The pthreads library if needed
    58     58   #
    59     59   LIBPTHREAD=@TARGET_THREAD_LIB@
    60     60   
    61     61   # Do threads override each others locks by default (1), or do we test (-1)
    62     62   #

Changes to configure.

   841    841   AWK
   842    842   program_prefix
   843    843   VERSION
   844    844   RELEASE
   845    845   VERSION_NUMBER
   846    846   BUILD_CC
   847    847   BUILD_CFLAGS
   848         -THREADSAFE
          848  +SQLITE_THREADSAFE
   849    849   TARGET_THREAD_LIB
   850    850   XTHREADCONNECT
   851    851   THREADSOVERRIDELOCKS
   852    852   ALLOWRELEASE
   853    853   TEMP_STORE
   854    854   BUILD_EXEEXT
   855    855   OS_UNIX
................................................................................
  1927   1927   ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  1928   1928   ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
  1929   1929   ac_compiler_gnu=$ac_cv_c_compiler_gnu
  1930   1930   
  1931   1931   
  1932   1932   
  1933   1933   # The following RCS revision string applies to configure.in
  1934         -# $Revision: 1.42 $
         1934  +# $Revision: 1.43 $
  1935   1935   
  1936   1936   #########
  1937   1937   # Programs needed
  1938   1938   #
  1939   1939   # Check whether --enable-shared was given.
  1940   1940   if test "${enable_shared+set}" = set; then
  1941   1941     enableval=$enable_shared; p=${PACKAGE-default}
................................................................................
 18879  18879   ##########
 18880  18880   # Do we want to support multithreaded use of sqlite
 18881  18881   #
 18882  18882   # Check whether --enable-threadsafe was given.
 18883  18883   if test "${enable_threadsafe+set}" = set; then
 18884  18884     enableval=$enable_threadsafe;
 18885  18885   else
 18886         -  enable_threadsafe=no
        18886  +  enable_threadsafe=yes
 18887  18887   fi
 18888  18888   
 18889  18889   { echo "$as_me:$LINENO: checking whether to support threadsafe operation" >&5
 18890  18890   echo $ECHO_N "checking whether to support threadsafe operation... $ECHO_C" >&6; }
 18891  18891   if test "$enable_threadsafe" = "no"; then
 18892         -  THREADSAFE=0
        18892  +  SQLITE_THREADSAFE=0
 18893  18893     { echo "$as_me:$LINENO: result: no" >&5
 18894  18894   echo "${ECHO_T}no" >&6; }
 18895  18895   else
 18896         -  THREADSAFE=1
        18896  +  SQLITE_THREADSAFE=1
 18897  18897     { echo "$as_me:$LINENO: result: yes" >&5
 18898  18898   echo "${ECHO_T}yes" >&6; }
 18899  18899   fi
 18900  18900   
 18901  18901   
 18902         -if test "$THREADSAFE" = "1"; then
        18902  +if test "$SQLITE_THREADSAFE" = "1"; then
 18903  18903     LIBS=""
 18904  18904   
 18905  18905   { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
 18906  18906   echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
 18907  18907   if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
 18908  18908     echo $ECHO_N "(cached) $ECHO_C" >&6
 18909  18909   else
................................................................................
 20735  20735   AWK!$AWK$ac_delim
 20736  20736   program_prefix!$program_prefix$ac_delim
 20737  20737   VERSION!$VERSION$ac_delim
 20738  20738   RELEASE!$RELEASE$ac_delim
 20739  20739   VERSION_NUMBER!$VERSION_NUMBER$ac_delim
 20740  20740   BUILD_CC!$BUILD_CC$ac_delim
 20741  20741   BUILD_CFLAGS!$BUILD_CFLAGS$ac_delim
 20742         -THREADSAFE!$THREADSAFE$ac_delim
        20742  +SQLITE_THREADSAFE!$SQLITE_THREADSAFE$ac_delim
 20743  20743   TARGET_THREAD_LIB!$TARGET_THREAD_LIB$ac_delim
 20744  20744   XTHREADCONNECT!$XTHREADCONNECT$ac_delim
 20745  20745   THREADSOVERRIDELOCKS!$THREADSOVERRIDELOCKS$ac_delim
 20746  20746   ALLOWRELEASE!$ALLOWRELEASE$ac_delim
 20747  20747   TEMP_STORE!$TEMP_STORE$ac_delim
 20748  20748   BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim
 20749  20749   OS_UNIX!$OS_UNIX$ac_delim
................................................................................
 21138  21138     exec 5>/dev/null
 21139  21139     $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
 21140  21140     exec 5>>config.log
 21141  21141     # Use ||, not &&, to avoid exiting from the if with $? = 1, which
 21142  21142     # would make configure fail if this is the last instruction.
 21143  21143     $ac_cs_success || { (exit 1); exit 1; }
 21144  21144   fi
 21145         -

Changes to configure.ac.

    88     88   # the corresponding code.
    89     89   #
    90     90   AC_INIT(src/sqlite.h.in)
    91     91   
    92     92   dnl Put the RCS revision string after AC_INIT so that it will also
    93     93   dnl show in in configure.
    94     94   # The following RCS revision string applies to configure.in
    95         -# $Revision: 1.29 $
           95  +# $Revision: 1.30 $
    96     96   
    97     97   #########
    98     98   # Programs needed
    99     99   #
   100    100   AC_PROG_LIBTOOL
   101    101   AC_PROG_INSTALL
   102    102   AC_PROG_AWK
................................................................................
   174    174   AC_SUBST(BUILD_CC)
   175    175   AC_SUBST(BUILD_CFLAGS)
   176    176   
   177    177   ##########
   178    178   # Do we want to support multithreaded use of sqlite
   179    179   #
   180    180   AC_ARG_ENABLE(threadsafe, 
   181         -AC_HELP_STRING([--enable-threadsafe],[Support threadsafe operation]),,enable_threadsafe=no)
          181  +AC_HELP_STRING([--enable-threadsafe],[Support threadsafe operation]),,enable_threadsafe=yes)
   182    182   AC_MSG_CHECKING([whether to support threadsafe operation])
   183    183   if test "$enable_threadsafe" = "no"; then
   184         -  THREADSAFE=0
          184  +  SQLITE_THREADSAFE=0
   185    185     AC_MSG_RESULT([no])
   186    186   else
   187         -  THREADSAFE=1
          187  +  SQLITE_THREADSAFE=1
   188    188     AC_MSG_RESULT([yes])
   189    189   fi
   190         -AC_SUBST(THREADSAFE)
          190  +AC_SUBST(SQLITE_THREADSAFE)
   191    191   
   192         -if test "$THREADSAFE" = "1"; then
          192  +if test "$SQLITE_THREADSAFE" = "1"; then
   193    193     LIBS=""
   194    194     AC_CHECK_LIB(pthread, pthread_create)
   195    195     TARGET_THREAD_LIB="$LIBS"
   196    196     LIBS=""
   197    197   else
   198    198     TARGET_THREAD_LIB=""
   199    199   fi

Changes to test/malloc3.test.

     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   # This file contains tests to ensure that the library handles malloc() failures
    13     13   # correctly. The emphasis of these tests are the _prepare(), _step() and
    14     14   # _finalize() calls.
    15     15   #
    16         -# $Id: malloc3.test,v 1.14 2007/08/31 05:00:49 danielk1977 Exp $
           16  +# $Id: malloc3.test,v 1.15 2007/09/03 16:12:10 drh Exp $
    17     17   
    18     18   set testdir [file dirname $argv0]
    19     19   source $testdir/tester.tcl
    20     20   
    21     21   # Only run these tests if memory debugging is turned on.
    22     22   #
    23     23   ifcapable !memdebug {
    24         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           24  +   puts "Skipping malloc3 tests: not compiled with -DSQLITE_MEMDEBUG..."
    25     25      finish_test
    26     26      return
    27     27   }
    28     28   
    29     29   #--------------------------------------------------------------------------
    30     30   # NOTES ON RECOVERING FROM A MALLOC FAILURE
    31     31   # 

Changes to test/malloc4.test.

     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   # This file contains tests to ensure that the library handles malloc() failures
    13     13   # correctly. The emphasis in this file is on sqlite3_column_XXX() APIs.
    14     14   #
    15         -# $Id: malloc4.test,v 1.8 2007/08/30 15:16:05 danielk1977 Exp $
           15  +# $Id: malloc4.test,v 1.9 2007/09/03 16:12:10 drh Exp $
    16     16   
    17     17   #---------------------------------------------------------------------------
    18     18   # NOTES ON EXPECTED BEHAVIOUR
    19     19   #
    20     20   # [193] When a memory allocation failure occurs during sqlite3_column_name(),
    21     21   #       sqlite3_column_name16(), sqlite3_column_decltype(), or
    22     22   #       sqlite3_column_decltype16() the function shall return NULL.
................................................................................
    23     23   #
    24     24   #---------------------------------------------------------------------------
    25     25   
    26     26   set testdir [file dirname $argv0]
    27     27   source $testdir/tester.tcl
    28     28   
    29     29   # Only run these tests if memory debugging is turned on.
    30         -if {[info command sqlite3_memdebug_pending]==""} {
    31         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           30  +ifcapable !memdebug {
           31  +   puts "Skipping malloc4 tests: not compiled with -DSQLITE_MEMDEBUG..."
    32     32      finish_test
    33     33      return
    34     34   }
    35     35   
    36     36   ifcapable !utf16 {
    37     37     finish_test
    38     38     return

Changes to test/malloc5.test.

     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   # This file contains test cases focused on the two memory-management APIs, 
    13     13   # sqlite3_soft_heap_limit() and sqlite3_release_memory().
    14     14   #
    15         -# $Id: malloc5.test,v 1.15 2007/09/03 11:04:22 danielk1977 Exp $
           15  +# $Id: malloc5.test,v 1.16 2007/09/03 16:12:10 drh Exp $
    16     16   
    17     17   #---------------------------------------------------------------------------
    18     18   # NOTES ON EXPECTED BEHAVIOUR
    19     19   #
    20     20   #---------------------------------------------------------------------------
    21     21   
    22     22   
................................................................................
    23     23   set testdir [file dirname $argv0]
    24     24   source $testdir/tester.tcl
    25     25   db close
    26     26   
    27     27   # Only run these tests if memory debugging is turned on.
    28     28   #
    29     29   ifcapable !memdebug {
    30         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           30  +   puts "Skipping malloc5 tests: not compiled with -DSQLITE_MEMDEBUG..."
    31     31      finish_test
    32     32      return
    33     33   }
    34     34   
    35     35   # Skip these tests if OMIT_MEMORY_MANAGEMENT was defined at compile time.
    36     36   ifcapable !memorymanage {
    37     37      finish_test

Changes to test/malloc6.test.

     6      6   #    May you do good and not evil.
     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file attempts to check the library in an out-of-memory situation.
    12     12   #
    13         -# $Id: malloc6.test,v 1.2 2007/08/22 22:04:37 drh Exp $
           13  +# $Id: malloc6.test,v 1.3 2007/09/03 16:12:10 drh Exp $
    14     14   
    15     15   set testdir [file dirname $argv0]
    16     16   source $testdir/tester.tcl
    17     17   
    18     18   # Only run these tests if memory debugging is turned on.
    19     19   #
    20     20   ifcapable !memdebug {
    21         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           21  +   puts "Skipping malloc6 tests: not compiled with -DSQLITE_MEMDEBUG..."
    22     22      finish_test
    23     23      return
    24     24   }
    25     25   source $testdir/malloc_common.tcl
    26     26   
    27     27   
    28     28   set sqlite_os_trace 0

Changes to test/malloc7.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file contains additional out-of-memory checks (see malloc.tcl)
    12     12   # added to expose a bug in out-of-memory handling for sqlite3_prepare16().
    13     13   #
    14         -# $Id: malloc7.test,v 1.3 2007/08/22 22:04:37 drh Exp $
           14  +# $Id: malloc7.test,v 1.4 2007/09/03 16:12:10 drh Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   # Only run these tests if memory debugging is turned on.
    20     20   #
    21     21   ifcapable !memdebug {
    22         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           22  +   puts "Skipping malloc7 tests: not compiled with -DSQLITE_MEMDEBUG..."
    23     23      finish_test
    24     24      return
    25     25   }
    26     26   source $testdir/malloc_common.tcl
    27     27   
    28     28   
    29     29   do_malloc_test malloc7-1 -sqlprep {

Changes to test/malloc8.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file contains additional out-of-memory checks (see malloc.tcl)
    12     12   # added to expose a bug in out-of-memory handling for sqlite3_value_text()
    13     13   #
    14         -# $Id: malloc8.test,v 1.4 2007/08/22 22:04:37 drh Exp $
           14  +# $Id: malloc8.test,v 1.5 2007/09/03 16:12:10 drh Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   # Only run these tests if memory debugging is turned on.
    20     20   #
    21     21   ifcapable !memdebug {
    22         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           22  +   puts "Skipping malloc8 tests: not compiled with -DSQLITE_MEMDEBUG..."
    23     23      finish_test
    24     24      return
    25     25   }
    26     26   
    27     27   source $testdir/malloc_common.tcl
    28     28   
    29     29   # The setup is a database with UTF-16 encoding that contains a single

Changes to test/malloc9.test.

     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file contains additional out-of-memory checks (see malloc.tcl)
    12     12   # added to expose a bug in out-of-memory handling for sqlite3_prepare().
    13     13   #
    14         -# $Id: malloc9.test,v 1.2 2007/08/22 22:04:37 drh Exp $
           14  +# $Id: malloc9.test,v 1.3 2007/09/03 16:12:10 drh Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   
    19     19   # Only run these tests if memory debugging is turned on.
    20     20   #
    21     21   ifcapable !memdebug {
    22         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           22  +   puts "Skipping malloc9 tests: not compiled with -DSQLITE_MEMDEBUG..."
    23     23      finish_test
    24     24      return
    25     25   }
    26     26   
    27     27   source $testdir/malloc_common.tcl
    28     28   
    29     29   do_malloc_test 1 -tclprep {

Changes to test/mallocA.test.

     6      6   #    May you do good and not evil.
     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # This file contains additional out-of-memory checks (see malloc.tcl).
    12     12   #
    13         -# $Id: mallocA.test,v 1.4 2007/08/29 12:31:29 danielk1977 Exp $
           13  +# $Id: mallocA.test,v 1.5 2007/09/03 16:12:10 drh Exp $
    14     14   
    15     15   set testdir [file dirname $argv0]
    16     16   source $testdir/tester.tcl
    17     17   
    18     18   # Only run these tests if memory debugging is turned on.
    19     19   #
    20     20   ifcapable !memdebug {
    21         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           21  +   puts "Skipping mallocA tests: not compiled with -DSQLITE_MEMDEBUG..."
    22     22      finish_test
    23     23      return
    24     24   }
    25     25   
    26     26   source $testdir/malloc_common.tcl
    27     27   
    28     28   # Construct a test database

Changes to test/mallocB.test.

     9      9   #
    10     10   #***********************************************************************
    11     11   # This file contains additional out-of-memory checks (see malloc.tcl).
    12     12   # These were all discovered by fuzzy generation of SQL. Apart from
    13     13   # that they have little in common.
    14     14   #
    15     15   #
    16         -# $Id: mallocB.test,v 1.4 2007/08/22 22:04:37 drh Exp $
           16  +# $Id: mallocB.test,v 1.5 2007/09/03 16:12:10 drh Exp $
    17     17   
    18     18   set testdir [file dirname $argv0]
    19     19   source $testdir/tester.tcl
    20     20   source $testdir/malloc_common.tcl
    21     21   
    22     22   # Only run these tests if memory debugging is turned on.
    23     23   #
    24     24   ifcapable !memdebug {
    25         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           25  +   puts "Skipping mallocB tests: not compiled with -DSQLITE_MEMDEBUG..."
    26     26      finish_test
    27     27      return
    28     28   }
    29     29   source $testdir/malloc_common.tcl
    30     30   
    31     31   do_malloc_test mallocB-1 -sqlbody {SELECT - 456}
    32     32   do_malloc_test mallocB-2 -sqlbody {SELECT - 456.1}

Changes to test/mallocC.test.

     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   # 
    12     12   # This file tests aspects of the malloc failure while parsing
    13     13   # CREATE TABLE statements in auto_vacuum mode.
    14     14   #
    15         -# $Id: mallocC.test,v 1.4 2007/08/29 12:31:29 danielk1977 Exp $
           15  +# $Id: mallocC.test,v 1.5 2007/09/03 16:12:10 drh Exp $
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   # Only run these tests if memory debugging is turned on.
    21     21   #
    22     22   ifcapable !memdebug {
    23         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
           23  +   puts "Skipping mallocC tests: not compiled with -DSQLITE_MEMDEBUG..."
    24     24      finish_test
    25     25      return
    26     26   }
    27     27   
    28     28   # Generate a checksum based on the contents of the database. If the
    29     29   # checksum of two databases is the same, and the integrity-check passes
    30     30   # for both, the two databases are identical.

Changes to test/malloc_common.tcl.

            1  +# 2007 May 05
            2  +#
            3  +# The author disclaims copyright to this source code.  In place of
            4  +# a legal notice, here is a blessing:
            5  +#
            6  +#    May you do good and not evil.
            7  +#    May you find forgiveness for yourself and forgive others.
            8  +#    May you share freely, never taking more than you give.
            9  +#
           10  +#***********************************************************************
           11  +#
           12  +# This file contains common code used by many different malloc tests
           13  +# within the test suite.
           14  +#
           15  +# $Id: malloc_common.tcl,v 1.8 2007/09/03 16:12:10 drh Exp $
     1     16   
           17  +# If we did not compile with malloc testing enabled, then do nothing.
           18  +#
     2     19   ifcapable !memdebug {
     3         -  puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
     4         -  finish_test
     5     20     return 0
     6     21   }
     7     22   
     8     23   # Usage: do_malloc_test <test number> <options...>
     9     24   #
    10     25   # The first argument, <test number>, is an integer used to name the
    11     26   # tests executed by this proc. Options are as follows:
................................................................................
    95    110           #
    96    111           #     isFail  - True if an error (any error) was reported by sqlite.
    97    112           #     nFail   - The total number of simulated malloc() failures.
    98    113           #     nBenign - The number of benign simulated malloc() failures.
    99    114           #
   100    115           set isFail [catch $::mallocbody msg]
   101    116           set nFail [sqlite3_memdebug_fail -1 -benigncnt nBenign]
   102         -#puts "isFail=$isFail nFail=$nFail nBenign=$nBenign msg=$msg"
   103    117   
   104    118           # If one or more mallocs failed, run this loop body again.
   105    119           #
   106    120           set go [expr {$nFail>0}]
   107    121   
   108    122           if {($nFail-$nBenign)==0} {
   109    123             if {$isFail} {
................................................................................
   127    141           catch [list uplevel #0 $::mallocopts(-cleanup)] msg
   128    142         }
   129    143       }
   130    144     }
   131    145     unset ::mallocopts
   132    146     sqlite3_memdebug_fail -1
   133    147   }
   134         -
   135         -return 1

Changes to test/shared_err.test.

     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   # The focus of the tests in this file are IO errors that occur in a shared
    13     13   # cache context. What happens to connection B if one connection A encounters
    14     14   # an IO-error whilst reading or writing the file-system?
    15     15   #
    16         -# $Id: shared_err.test,v 1.16 2007/08/30 10:07:39 danielk1977 Exp $
           16  +# $Id: shared_err.test,v 1.17 2007/09/03 16:12:10 drh Exp $
    17     17   
    18     18   proc skip {args} {}
    19     19   
    20     20   
    21     21   set testdir [file dirname $argv0]
    22     22   source $testdir/tester.tcl
    23     23   source $testdir/malloc_common.tcl
................................................................................
   289    289   # db2 eval {select * from sqlite_master}
   290    290     db2 close
   291    291   }
   292    292   
   293    293   # Only run these tests if memory debugging is turned on.
   294    294   #
   295    295   ifcapable !memdebug {
   296         -   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."
          296  +   puts "Skipping tests shared_err-4 through -9:\
          297  +         not compiled with -DSQLITE_MEMDEBUG..."
   297    298      db close
   298    299      sqlite3_enable_shared_cache $::enable_shared_cache
   299    300      finish_test
   300    301      return
   301    302   }
   302    303   
   303    304   # Provoke a malloc() failure when a cursor position is being saved. This

Changes to test/vtab_err.test.

     5      5   #
     6      6   #    May you do good and not evil.
     7      7   #    May you find forgiveness for yourself and forgive others.
     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12         -# $Id: vtab_err.test,v 1.7 2007/08/29 12:31:29 danielk1977 Exp $
           12  +# $Id: vtab_err.test,v 1.8 2007/09/03 16:12:10 drh Exp $
    13     13   
    14     14   set testdir [file dirname $argv0]
    15     15   source $testdir/tester.tcl
    16     16   
    17         -source $testdir/malloc_common.tcl
    18         -
    19     17   ifcapable !vtab {
    20     18     finish_test
    21     19     return
    22     20   }
           21  +
           22  +
    23     23   
    24     24   unset -nocomplain echo_module_begin_fail
    25     25   do_ioerr_test vtab_err-1 -tclprep {
    26     26     register_echo_module [sqlite3_connection_pointer db]
    27     27   } -sqlbody {
    28     28     BEGIN;
    29     29     CREATE TABLE r(a PRIMARY KEY, b, c);
................................................................................
    35     35     COMMIT;
    36     36     BEGIN;
    37     37       CREATE TABLE r2(a, b, c);
    38     38       INSERT INTO r2 SELECT * FROM e;
    39     39       INSERT INTO e SELECT a||'x', b, c FROM r2;
    40     40     COMMIT;
    41     41   }
           42  +
           43  +ifcapable !memdebug {
           44  +   puts "Skipping vtab_err-2 tests: not compiled with -DSQLITE_MEMDEBUG..."
           45  +   finish_test
           46  +   return
           47  +}
           48  +source $testdir/malloc_common.tcl
           49  +
    42     50   
    43     51   do_malloc_test vtab_err-2 -tclprep { 
    44     52     register_echo_module [sqlite3_connection_pointer db]
    45     53   } -sqlbody {
    46     54     BEGIN;
    47     55     CREATE TABLE r(a PRIMARY KEY, b, c);
    48     56     CREATE VIRTUAL TABLE e USING echo(r);