/ Check-in [6a563080]
Login

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

Overview
Comment:Updates to WAL TCL test scripts to support running on Windows.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6a5630806c87b0f4e5632c37c357f98effd9608a
User & Date: shaneh 2010-05-11 02:46:17
Original Comment: Updates for to WAL TCL test scripts to support running on Windows.
Context
2010-05-11
12:19
Changes so that WAL and exclusive-locking mode work together. check-in: 71e7b1cf user: dan tags: trunk
02:49
Initial port of WAL VFS support from os_unix.c to os_win.c. check-in: 111ad59f user: shaneh tags: wal-win32
02:46
Updates to WAL TCL test scripts to support running on Windows. check-in: 6a563080 user: shaneh tags: trunk
2010-05-10
19:51
Fix an off-by-one error while constructing the name of the mmap file for the wal-index under os_unix.c. check-in: 6e3735f7 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/wal.test.

  1281   1281     set blob
  1282   1282   }
  1283   1283   
  1284   1284   proc logcksum {ckv1 ckv2 blob} {
  1285   1285     upvar $ckv1 c1
  1286   1286     upvar $ckv2 c2
  1287   1287   
  1288         -  binary scan $blob iu* values
         1288  +  binary scan $blob i* values
  1289   1289     foreach v $values {
         1290  +    set v [expr {$v & 0xFFFFFFFF}]
  1290   1291       incr c1 $v
  1291   1292       incr c2 $c1
  1292   1293     }
  1293   1294   
  1294   1295     set c1 [expr ($c1 + ($c1>>24))&0xFFFFFFFF]
  1295   1296     set c2 [expr ($c2 + ($c2>>24))&0xFFFFFFFF]
  1296   1297   }
................................................................................
  1423   1424   #   3. Using connection 1, checkpoint the database. Make sure all
  1424   1425   #      the data is present and the database is not corrupt.
  1425   1426   #
  1426   1427   # At one point, SQLite was failing to grow the mapping of the wal-index
  1427   1428   # file in step 3 and the checkpoint was corrupting the database file.
  1428   1429   #
  1429   1430   do_test wal-20.1 {
         1431  +  catch {db close}
  1430   1432     file delete -force test.db test.db-wal test.db-journal
  1431   1433     sqlite3 db test.db
  1432   1434     execsql {
  1433   1435       PRAGMA journal_mode = WAL;
  1434   1436       CREATE TABLE t1(x);
  1435   1437       INSERT INTO t1 VALUES(randomblob(900));
  1436   1438       SELECT count(*) FROM t1;

Changes to test/walfault.test.

    57     57     PRAGMA journal_mode = WAL;
    58     58     CREATE TABLE abc(a PRIMARY KEY);
    59     59     INSERT INTO abc VALUES(randomblob(1500));
    60     60   } -sqlbody {
    61     61     DELETE FROM abc;
    62     62     PRAGMA wal_checkpoint;
    63     63   }
           64  +catch {db close}
    64     65   
    65     66   # A [testvfs] callback for the VFS created by [do_shmfault_test]. This
    66     67   # callback injects SQLITE_IOERR faults into methods for which an entry
    67     68   # in array ::shmfault_ioerr_methods is defined. For example, to enable
    68     69   # errors in xShmOpen:
    69     70   #
    70     71   #   set ::shmfault_ioerr_methods(xShmOpen) 1

Changes to test/walmode.test.

    39     39     set sqlite_sync_count 0
    40     40     execsql { PRAGMA page_size = 1024 }
    41     41     execsql { PRAGMA journal_mode = wal }
    42     42   } {wal}
    43     43   do_test walmode-1.2 {
    44     44     file size test.db
    45     45   } {1024}
           46  +
           47  +set expected_sync_count 3
           48  +if {$::tcl_platform(platform)!="windows"} {
           49  +  ifcapable dirsync {
           50  +    incr expected_sync_count
           51  +  }
           52  +}
    46     53   do_test walmode-1.3 {
    47     54     set sqlite_sync_count
    48         -} {4}
           55  +} $expected_sync_count
           56  +
    49     57   do_test walmode-1.4 {
    50     58     file exists test.db-wal
    51     59   } {0}
    52     60   do_test walmode-1.5 {
    53     61     execsql { CREATE TABLE t1(a, b) }
    54     62     file size test.db
    55     63   } {1024}