/ Check-in [164a7f5a]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Change lock2.test so that it does not enter a busy loop if the child process exists unexpectedly. (CVS 6586)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 164a7f5a45c3e7f7a73899678c374535b270b130
User & Date: danielk1977 2009-05-01 10:55:34
Context
2009-05-01
13:16
Update PRAGMA integrity_check so that it treats SQLITE_IOERR_NOMEM errors from underlying components the same as SQLITE_NOMEM errors. (CVS 6587) check-in: 26444f2a user: drh tags: trunk
10:55
Change lock2.test so that it does not enter a busy loop if the child process exists unexpectedly. (CVS 6586) check-in: 164a7f5a user: danielk1977 tags: trunk
06:19
Remove a NEVER() clause from a condition that is true at least once when running attachmalloc.test. (CVS 6585) check-in: 514efc73 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/lock2.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 implements regression tests for SQLite library.  The
    12     12   # focus of this script is database locks between competing processes.
    13     13   #
    14         -# $Id: lock2.test,v 1.10 2009/02/05 16:31:46 drh Exp $
           14  +# $Id: lock2.test,v 1.11 2009/05/01 10:55:34 danielk1977 Exp $
    15     15   
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
    19     19   
    20     20   # Launch another testfixture process to be controlled by this one. A
    21     21   # channel name is returned that may be passed as the first argument to proc
................................................................................
    38     38     puts $chan OVER
    39     39     set r ""
    40     40     while { 1 } {
    41     41       set line [gets $chan]
    42     42       if { $line == "OVER" } { 
    43     43         return $r
    44     44       }
           45  +    if {[eof $chan]} {
           46  +      return "ERROR: Child process hung up"
           47  +    }
    45     48       append r $line
    46     49     }
    47     50   }
    48     51   
    49     52   # Write the main loop for the child testfixture processes into file
    50     53   # tf_main.tcl. The parent (this script) interacts with the child processes
    51     54   # via a two way pipe. The parent writes a script to the stdin of the child