/ Check-in [d0b16bae]
Login

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

Overview
Comment:Update ioerr.test to be more deterministic. (CVS 2287)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d0b16bae6555f723400821b22916b66609a26b9c
User & Date: danielk1977 2005-01-29 08:36:45
Context
2005-01-29
09:00
Fix a test bug causing a segfault in bind.test. (CVS 2288) check-in: a8b921d4 user: danielk1977 tags: trunk
08:36
Update ioerr.test to be more deterministic. (CVS 2287) check-in: d0b16bae user: danielk1977 tags: trunk
08:32
Modify sub-query handling. Tickets #1083 and #1084. (CVS 2286) check-in: b1b50f31 user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/ioerr.test.

    11     11   # This file implements regression tests for SQLite library.  The
    12     12   # focus of this file is testing for correct handling of I/O errors
    13     13   # such as writes failing because the disk is full.
    14     14   # 
    15     15   # The tests in this file use special facilities that are only
    16     16   # available in the SQLite test fixture.
    17     17   #
    18         -# $Id: ioerr.test,v 1.17 2005/01/22 03:39:39 danielk1977 Exp $
           18  +# $Id: ioerr.test,v 1.18 2005/01/29 08:36:45 danielk1977 Exp $
    19     19   
    20     20   set testdir [file dirname $argv0]
    21     21   source $testdir/tester.tcl
    22     22   
    23     23   # If SQLITE_DEFAULT_AUTOVACUUM is set to true, then a simulated IO error
    24     24   # on the 8th IO operation in the SQL script below doesn't report an error.
    25     25   #
................................................................................
    49     49   #
    50     50   # The first IO call is excluded from the test. This call attempts to read
    51     51   # the file-header of the temporary database used by VACUUM. Since the
    52     52   # database doesn't exist at that point, the IO error is not detected.
    53     53   # 
    54     54   # Additionally, if auto-vacuum is enabled, the 12th IO error is not 
    55     55   # detected. Same reason as the 8th in the test case above.
    56         -#
    57         -# IO error 134 is omitted because this occurs while closing the 
    58         -# temporary database used by vacuum and is not reported.
    59         -#
    60         -do_ioerr_test ioerr-2 -cksum true -sqlprep {
    61         -  BEGIN;
    62         -  CREATE TABLE t1(a, b, c);
    63         -  INSERT INTO t1 VALUES(1, randstr(5,50), randstr(5,50));
    64         -  INSERT INTO t1 SELECT a+2, b||'-'||rowid, c||'-'||rowid FROM t1;
           56  +# 
           57  +do_ioerr_test ioerr-2 -cksum true -sqlprep { 
           58  +  BEGIN; 
           59  +  CREATE TABLE t1(a, b, c); 
           60  +  INSERT INTO t1 VALUES(1, randstr(50,50), randstr(50,50)); 
           61  +  INSERT INTO t1 SELECT a+2, b||'-'||rowid, c||'-'||rowid FROM t1; 
    65     62     INSERT INTO t1 SELECT a+4, b||'-'||rowid, c||'-'||rowid FROM t1;
    66     63     INSERT INTO t1 SELECT a+8, b||'-'||rowid, c||'-'||rowid FROM t1;
    67     64     INSERT INTO t1 SELECT a+16, b||'-'||rowid, c||'-'||rowid FROM t1;
    68     65     INSERT INTO t1 SELECT a+32, b||'-'||rowid, c||'-'||rowid FROM t1;
    69     66     INSERT INTO t1 SELECT a+64, b||'-'||rowid, c||'-'||rowid FROM t1;
    70     67     INSERT INTO t1 SELECT a+128, b||'-'||rowid, c||'-'||rowid FROM t1;
    71     68     INSERT INTO t1 VALUES(1, randstr(600,600), randstr(600,600));
................................................................................
    72     69     CREATE TABLE t2 AS SELECT * FROM t1;
    73     70     CREATE TABLE t3 AS SELECT * FROM t1;
    74     71     COMMIT;
    75     72     DROP TABLE t2;
    76     73   } -sqlbody {
    77     74     VACUUM;
    78     75   } -exclude [list \
    79         -    1 134 [expr [string match [execsql {pragma auto_vacuum}] 1]?12:-1]]
           76  +    1 [expr [string match [execsql {pragma auto_vacuum}] 1]?12:-1]]
    80     77   
    81     78   do_ioerr_test ioerr-3 -tclprep {
    82     79     execsql {
    83     80       PRAGMA cache_size = 10;
    84     81       BEGIN;
    85     82       CREATE TABLE abc(a);
    86     83       INSERT INTO abc VALUES(randstr(1500,1500)); -- Page 4 is overflow