/ Check-in [ddadc25d]
Login

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

Overview
Comment:Make sure the finished() array in thread005.test is cleared before the script starts. (CVS 6351)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ddadc25d550efd56e319bf5508c27d66e346be1b
User & Date: drh 2009-03-16 17:07:57
Context
2009-03-17
15:39
Fix test script bugs in the thread002.test and thread_common.tcl. (CVS 6352) check-in: d137e841 user: drh tags: trunk
2009-03-16
17:07
Make sure the finished() array in thread005.test is cleared before the script starts. (CVS 6351) check-in: ddadc25d user: drh tags: trunk
14:48
Modify quick.test to support the QUICKTEST_INCLUDE environment variable, which can be used to override the built-in EXCLUDE list. (CVS 6350) check-in: fdfe22f0 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/thread002.test.

     8      8   #    May you share freely, never taking more than you give.
     9      9   #
    10     10   #***********************************************************************
    11     11   #
    12     12   #   This test attempts to deadlock SQLite in shared-cache mode.
    13     13   #     
    14     14   #
    15         -# $Id: thread002.test,v 1.6 2009/02/12 17:06:41 drh Exp $
           15  +# $Id: thread002.test,v 1.7 2009/03/16 17:07:57 drh Exp $
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   
    19     19   source $testdir/tester.tcl
    20     20   source $testdir/thread_common.tcl
    21     21   if {[info commands sqlthread] eq ""} {
    22     22     finish_test
................................................................................
    84     84   
    85     85   # Wait for all threads to finish,  then check they all returned "OK".
    86     86   #
    87     87   for {set i 0} {$i < $::NTHREAD} {incr i} {
    88     88     if {![info exists finished($i)]} {
    89     89       vwait finished($i)
    90     90     }
    91         -  do_test thread001.2.$i {
           91  +  do_test thread002.2.$i {
    92     92       set ::finished($i)
    93     93     } OK
    94     94   }
    95     95   
    96     96   # Check all three databases are Ok.
    97     97   for {set ii 0} {$ii < 3} {incr ii} {
    98     98     do_test thread002.3.$ii {

Changes to test/thread005.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   #
    12     12   # Test a race-condition that shows up in shared-cache mode.
    13     13   #
    14         -# $Id: thread005.test,v 1.1 2009/03/12 14:43:28 danielk1977 Exp $
           14  +# $Id: thread005.test,v 1.2 2009/03/16 17:07:57 drh Exp $
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   
    18     18   source $testdir/tester.tcl
    19     19   ifcapable !mutex||!shared_cache {
    20     20     return
    21     21   }
................................................................................
    76     76   # Use shared-cache mode for this test.
    77     77   # 
    78     78   db close
    79     79   set ::enable_shared_cache [sqlite3_enable_shared_cache]
    80     80   sqlite3_enable_shared_cache 1
    81     81   
    82     82   file delete -force test.db test2.db
           83  +unset -nocomplain finished
    83     84   
    84     85   do_test thread005-1.1 {
    85     86     sqlite3 db test.db
    86     87     execsql { ATTACH 'test2.db' AS aux }
    87     88     execsql {
    88     89       CREATE TABLE aux.t1(a INTEGER PRIMARY KEY, b UNIQUE);
    89     90       INSERT INTO t1 VALUES(1, 1);
................................................................................
   167    168     sqlite3 db test.db
   168    169     execsql { ATTACH 'test2.db' AS aux }
   169    170     execsql { SELECT count(*) FROM t1 WHERE b IS NULL }
   170    171   } {0}
   171    172   
   172    173   sqlite3_enable_shared_cache $::enable_shared_cache
   173    174   finish_test
   174         -