Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Adjust the lock.test and lock3.test scripts so that they work with the asynchronous VFS. (CVS 6380) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
40df926b4606b3abe8c797bf17163f99 |
User & Date: | drh 2009-03-24 16:55:44.000 |
Context
2009-03-24
| ||
17:43 | Get the OOM tester in async2.test working again. (CVS 6381) (check-in: f398a2d1b0 user: drh tags: trunk) | |
16:55 | Adjust the lock.test and lock3.test scripts so that they work with the asynchronous VFS. (CVS 6380) (check-in: 40df926b46 user: drh tags: trunk) | |
16:27 | Include sqliteInt.h in test_async.c so that the asynchronous VFS tests will run even if SQLITE_OS_UNIX is not explicitly defined. (CVS 6379) (check-in: 29b0d6a3fe user: drh tags: trunk) | |
Changes
Changes to test/async.test.
1 2 3 4 5 6 7 8 | # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file runs all tests. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file runs all tests. # # $Id: async.test,v 1.15 2009/03/24 16:55:44 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl if {[catch {sqlite3async_enable}]} { # The async logic is not built into this system finish_test |
︙ | ︙ | |||
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | sqlite3async_wait sqlite3async_halt never } foreach testfile [lsort -dictionary [glob $testdir/*.test]] { set tail [file tail $testfile] if {[lsearch -exact $INCLUDE $tail]<0} continue source $testfile # Make sure everything is flushed through. This is because [source]ing # the next test file will delete the database file on disk (using # [file delete]). If the asynchronous backend still has the file # open, it will become confused. # sqlite3async_halt idle | > > | 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | sqlite3async_wait sqlite3async_halt never } foreach testfile [lsort -dictionary [glob $testdir/*.test]] { set tail [file tail $testfile] if {[lsearch -exact $INCLUDE $tail]<0} continue set ::ASYNC 1 source $testfile unset ::ASYNC # Make sure everything is flushed through. This is because [source]ing # the next test file will delete the database file on disk (using # [file delete]). If the asynchronous backend still has the file # open, it will become confused. # sqlite3async_halt idle |
︙ | ︙ |
Changes to test/lock.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # 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. # | | > > > | | | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # 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. # # $Id: lock.test,v 1.38 2009/03/24 16:55:44 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Create an alternative connection to the database # do_test lock-1.0 { if {[info exists ::ASYNC]} { sqlite3 db2 test.db } else { # Give a complex pathnme to stress the path simplification logic in # the vxworks driver. file mkdir tempdir/t1/t2 sqlite3 db2 ./tempdir/../tempdir/t1/.//t2/../../..//test.db } set dummy {} } {} do_test lock-1.1 { execsql {SELECT name FROM sqlite_master WHERE type='table' ORDER BY name} } {} do_test lock-1.2 { execsql {SELECT name FROM sqlite_master WHERE type='table' ORDER BY name} db2 |
︙ | ︙ |
Changes to test/lock3.test.
︙ | ︙ | |||
9 10 11 12 13 14 15 | # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this script is database locks and the operation of the # DEFERRED, IMMEDIATE, and EXCLUSIVE keywords as modifiers to the # BEGIN command. # | | > | | > > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this script is database locks and the operation of the # DEFERRED, IMMEDIATE, and EXCLUSIVE keywords as modifiers to the # BEGIN command. # # $Id: lock3.test,v 1.3 2009/03/24 16:55:44 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Establish two connections to the same database. Put some # sample data into the database. # do_test lock3-1.1 { if {![info exists ::ASYNC]} { file mkdir tempdir/t1/t2/t3 sqlite3 db2 ./tempdir/t1//t2/./t3//./../..//./../../tempdir/..//test.db// } else { sqlite3 db2 test.db } execsql { CREATE TABLE t1(a); INSERT INTO t1 VALUES(1); } execsql { SELECT * FROM t1 } db2 |
︙ | ︙ |