/ 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 Unified Diffs Show Whitespace Changes Patch

Changes to test/lock2.test.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
38
39
40
41
42
43
44



45
46
47
48
49
50
51
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is database locks between competing processes.
#
# $Id: lock2.test,v 1.10 2009/02/05 16:31:46 drh Exp $


set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Launch another testfixture process to be controlled by this one. A
# channel name is returned that may be passed as the first argument to proc
................................................................................
  puts $chan OVER
  set r ""
  while { 1 } {
    set line [gets $chan]
    if { $line == "OVER" } { 
      return $r
    }



    append r $line
  }
}

# Write the main loop for the child testfixture processes into file
# tf_main.tcl. The parent (this script) interacts with the child processes
# via a two way pipe. The parent writes a script to the stdin of the child







|







 







>
>
>







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
..
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#    May you find forgiveness for yourself and forgive others.
#    May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this script is database locks between competing processes.
#
# $Id: lock2.test,v 1.11 2009/05/01 10:55:34 danielk1977 Exp $


set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Launch another testfixture process to be controlled by this one. A
# channel name is returned that may be passed as the first argument to proc
................................................................................
  puts $chan OVER
  set r ""
  while { 1 } {
    set line [gets $chan]
    if { $line == "OVER" } { 
      return $r
    }
    if {[eof $chan]} {
      return "ERROR: Child process hung up"
    }
    append r $line
  }
}

# Write the main loop for the child testfixture processes into file
# tf_main.tcl. The parent (this script) interacts with the child processes
# via a two way pipe. The parent writes a script to the stdin of the child