/ Check-in [6a296d4d]
Login

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

Overview
Comment:Fix various problems in test scripts preventing "make test" from passing on F2FS file-systems with the "atomic-write" feature. Cherrypick of [56d93d07].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.19
Files: files | file ages | folders
SHA3-256:6a296d4d4d326f34f104a6632008050d1fff0e55118a428bc2df15cdef773b22
User & Date: dan 2018-01-13 13:21:04
Context
2018-01-13
14:07
Fix a typo in test file crash8.test. check-in: 4951d91d user: dan tags: branch-3.19
13:21
Fix various problems in test scripts preventing "make test" from passing on F2FS file-systems with the "atomic-write" feature. Cherrypick of [56d93d07]. check-in: 6a296d4d user: dan tags: branch-3.19
13:07
Fix various problems in test scripts preventing "make test" from passing on F2FS file-systems with the "atomic-write" feature. check-in: 56d93d07 user: dan tags: f2fs-test-fixes
2017-08-18
19:28
Version 3.19.4 check-in: 605907e7 user: drh tags: release, version-3.19.4, branch-3.19
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/crash8.test.

   138    138   # Also test that SQLite will not rollback a hot-journal file with a
   139    139   # suspect page-size. In this case "suspect" means:
   140    140   # 
   141    141   #    a) Not a power of 2, or
   142    142   #    b) Less than 512, or
   143    143   #    c) Greater than SQLITE_MAX_PAGE_SIZE
   144    144   #
          145  +if {[atomic_batch_write test.db]==0} {
   145    146   do_test crash8-3.1 {
   146    147     list [file exists test.db-joural] [file exists test.db]
   147    148   } {0 1}
   148    149   do_test crash8-3.2 {
   149    150     execsql {
   150    151       PRAGMA synchronous = off;
   151    152       BEGIN;
................................................................................
   224    225     puts -nonewline $fd $zJournal
   225    226     close $fd
   226    227     execsql { 
   227    228       SELECT count(*) FROM t1;
   228    229       PRAGMA integrity_check
   229    230     }
   230    231   } {6 ok}
          232  +}
   231    233   
   232    234   
   233    235   # If a connection running in persistent-journal mode is part of a 
   234    236   # multi-file transaction, it must ensure that the master-journal name
   235    237   # appended to the journal file contents during the commit is located
   236    238   # at the end of the physical journal file. If there was already a
   237    239   # large journal file allocated at the start of the transaction, this
................................................................................
   262    264         PRAGMA aux.journal_mode = persist;
   263    265         CREATE TABLE aux.ab(a, b);
   264    266         INSERT INTO aux.ab SELECT * FROM main.ab;
   265    267   
   266    268         UPDATE aux.ab SET b = randstr(1000,1000) WHERE a>=1;
   267    269         UPDATE ab SET b = randstr(1000,1000) WHERE a>=1;
   268    270       }
   269         -    list [file exists test.db-journal] [file exists test2.db-journal]
   270         -  } {1 1}
          271  +  } {persist persist}
          272  +  if {[atomic_batch_write test.db]==0} {
          273  +    do_test crash8.4.1.1 {
          274  +      list [file exists test.db-journal] [file exists test2.db-journal]
          275  +    } [list $bJrnl $bJrnl]
          276  +  }
   271    277   
   272    278     do_test crash8-4.2 {
   273    279       execsql {
   274    280         BEGIN;
   275    281           UPDATE aux.ab SET b = 'def' WHERE a = 0;
   276    282           UPDATE main.ab SET b = 'def' WHERE a = 0;
   277    283         COMMIT;

Changes to test/delete_db.test.

    12     12   # focus of this file is testing the code in test_delete.c (the
    13     13   # sqlite3_delete_database() API).
    14     14   #
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   set testprefix delete_db
           19  +
           20  +if {[atomic_batch_write test.db]} {
           21  +  finish_test
           22  +  return
           23  +}
    19     24   
    20     25   proc delete_all {} {
    21     26     foreach f [glob -nocomplain test2*] { file delete $f }
    22     27     foreach f [glob -nocomplain test3*] { file delete $f }
    23     28   }
    24     29   
    25     30   proc copydb {} {

Changes to test/exclusive.test.

   248    248   # truncates instead of deletes the journal file when committing 
   249    249   # a transaction.
   250    250   #
   251    251   # These tests are not run on windows because the windows backend
   252    252   # opens the journal file for exclusive access, preventing its contents 
   253    253   # from being inspected externally.
   254    254   #
   255         -if {$tcl_platform(platform) != "windows"} {
          255  +if {$tcl_platform(platform) != "windows"
          256  + && [atomic_batch_write test.db]==0
          257  +} {
   256    258   
   257    259     # Return a list of two booleans (either 0 or 1). The first is true
   258    260     # if the named file exists. The second is true only if the file
   259    261     # exists and the first 28 bytes contain at least one non-zero byte.
   260    262     #
   261    263     proc filestate {fname} {
   262    264       set exists 0
................................................................................
   387    389     }
   388    390   } {normal}
   389    391   
   390    392   #----------------------------------------------------------------------
   391    393   # Tests exclusive-5.X - test that statement journals are truncated
   392    394   # instead of deleted when in exclusive access mode.
   393    395   #
          396  +if {[atomic_batch_write test.db]==0} {
   394    397   
   395    398   # Close and reopen the database so that the temp database is no
   396    399   # longer active.
   397    400   #
   398    401   db close
   399    402   sqlite3 db test.db
   400    403   
................................................................................
   503    506     sqlite3 db test.db
   504    507   } {}
   505    508   
   506    509   do_execsql_test exclusive-6.5 {
   507    510     PRAGMA locking_mode = EXCLUSIVE;
   508    511     SELECT * FROM sqlite_master;
   509    512   } {exclusive}
          513  +
          514  +} ;# atomic_batch_write==0
   510    515   
   511    516   finish_test

Changes to test/fallocate.test.

    57     57   # causes a database file to grow, the database grows to its previous size
    58     58   # on disk, not to the minimum size required to hold the database image.
    59     59   #
    60     60   do_test fallocate-1.7 {
    61     61     execsql { BEGIN; INSERT INTO t1 VALUES(1, 2); }
    62     62     if {[permutation] != "inmemory_journal"
    63     63      && [permutation] != "atomic-batch-write"
           64  +   && [atomic_batch_write test.db]==0
    64     65     } {
    65     66       hexio_get_int [hexio_read test.db-journal 16 4]
    66     67     } else {
    67     68       set {} 1024
    68     69     }
    69     70   } {1024}
    70     71   do_test fallocate-1.8 { execsql { COMMIT } } {}

Changes to test/journal1.test.

    18     18   
    19     19   set testdir [file dirname $argv0]
    20     20   source $testdir/tester.tcl
    21     21   
    22     22   # These tests will not work on windows because windows uses
    23     23   # manditory file locking which breaks the copy_file command.
    24     24   #
    25         -if {$tcl_platform(platform)=="windows"} {
           25  +# Or with atomic_batch_write systems, as journal files are
           26  +# not created.
           27  +#
           28  +if {$tcl_platform(platform)=="windows"
           29  + || [atomic_batch_write test.db]
           30  +} {
    26     31     finish_test
    27     32     return
    28     33   }
    29     34   
    30     35   # Create a smaple database
    31     36   #
    32     37   do_test journal1-1.1 {

Changes to test/journal3.test.

    16     16   source $testdir/lock_common.tcl
    17     17   source $testdir/malloc_common.tcl
    18     18   
    19     19   #-------------------------------------------------------------------------
    20     20   # If a connection is required to create a journal file, it creates it with 
    21     21   # the same file-system permissions as the database file itself. Test this.
    22     22   #
    23         -if {$::tcl_platform(platform) == "unix"} {
           23  +if {$::tcl_platform(platform) == "unix"
           24  + && [atomic_batch_write test.db]==0
           25  +} {
    24     26   
    25     27     # Changed on 2012-02-13:  umask is deliberately ignored for -wal, -journal,
    26     28     # and -shm files.
    27     29     #set umask [exec /bin/sh -c umask]
    28     30     faultsim_delete_and_reopen
    29     31     do_test journal3-1.1 { execsql { CREATE TABLE tx(y, z) } } {}
    30     32   

Changes to test/jrnlmode.test.

   298    298     integrity_check jrnlmode-4.5
   299    299   }
   300    300   
   301    301   #------------------------------------------------------------------------
   302    302   # The following test caes, jrnlmode-5.*, test the journal_size_limit
   303    303   # pragma.
   304    304   ifcapable pragma {
          305  +if {[atomic_batch_write test.db]==0} {
   305    306     db close
   306    307     forcedelete test.db test2.db test3.db
   307    308     sqlite3 db test.db
   308    309   
   309    310     do_test jrnlmode-5.1 {
   310    311       execsql {pragma page_size=1024}
   311    312       execsql {pragma journal_mode=persist}
................................................................................
   450    451       expr {[file size test.db-journal] > 1024}
   451    452     } {1}
   452    453     do_test jrnlmode-5.22 {
   453    454       execsql COMMIT
   454    455       list [file exists test.db-journal] [file size test.db-journal]
   455    456     } {1 0}
   456    457   }
          458  +}
   457    459   
   458    460   ifcapable pragma {
          461  +if {[atomic_batch_write test.db]==0} {
   459    462     # These tests are not run as part of the "journaltest" permutation,
   460    463     # as the test_journal.c layer is incompatible with in-memory journaling.
   461    464     if {[permutation] ne "journaltest"} {
   462    465   
   463    466       do_test jrnlmode-6.1 {
   464    467         execsql {
   465    468           PRAGMA journal_mode = truncate;
................................................................................
   502    505         execsql {
   503    506           PRAGMA journal_mode = DELETE;
   504    507           BEGIN IMMEDIATE; INSERT INTO t4 VALUES(1,2); COMMIT;
   505    508         }
   506    509         file exists test.db-journal
   507    510       } {0}
   508    511     }
          512  +}
   509    513   }
   510    514   
   511    515   ifcapable pragma {
   512    516     catch { db close }
   513    517     do_test jrnlmode-7.1 {
   514    518       foreach f [glob -nocomplain test.db*] { forcedelete $f }
   515    519       sqlite3 db test.db

Changes to test/jrnlmode2.test.

    13     13   set testdir [file dirname $argv0]
    14     14   source $testdir/tester.tcl
    15     15   
    16     16   ifcapable {!pager_pragmas} {
    17     17     finish_test
    18     18     return
    19     19   }
           20  +
           21  +if {[atomic_batch_write test.db]} {
           22  +  finish_test
           23  +  return
           24  +}
    20     25   
    21     26   #-------------------------------------------------------------------------
    22     27   # The tests in this file check that the following two bugs (both now fixed)
    23     28   # do not reappear.
    24     29   #
    25     30   # jrnlmode2-1.*: Demonstrate bug #3745:
    26     31   #

Changes to test/lock4.test.

    12     12   # focus of this script is database locks.
    13     13   #
    14     14   # $Id: lock4.test,v 1.10 2009/05/06 00:52:41 drh Exp $
    15     15   
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
           19  +
           20  +if {[atomic_batch_write test.db]} {
           21  +  # This test uses two processes, one of which blocks until the other
           22  +  # creates a *-journal file. Which doesn't work if atomic writes are
           23  +  # available.
           24  +  finish_test
           25  +  return
           26  +}
    19     27   
    20     28   do_not_use_codec
    21     29   
    22     30   # Initialize the test.db database so that it is non-empty
    23     31   #
    24     32   do_test lock4-1.1 {
    25     33     db eval {

Changes to test/pager1.test.

    12     12   
    13     13   set testdir [file dirname $argv0]
    14     14   source $testdir/tester.tcl
    15     15   source $testdir/lock_common.tcl
    16     16   source $testdir/malloc_common.tcl
    17     17   source $testdir/wal_common.tcl
    18     18   set testprefix pager1
           19  +
           20  +if {[atomic_batch_write test.db]} {
           21  +  finish_test
           22  +  return
           23  +}
    19     24   
    20     25   # Do not use a codec for tests in this file, as the database file is
    21     26   # manipulated directly using tcl scripts (using the [hexio_write] command).
    22     27   #
    23     28   do_not_use_codec
    24     29   
    25     30   #

Changes to test/pager3.test.

    12     12   
    13     13   set testdir [file dirname $argv0]
    14     14   source $testdir/tester.tcl
    15     15   source $testdir/lock_common.tcl
    16     16   source $testdir/malloc_common.tcl
    17     17   source $testdir/wal_common.tcl
    18     18   
           19  +if {[atomic_batch_write test.db]} {
           20  +  finish_test
           21  +  return
           22  +}
    19     23   
    20     24   foreach {tn sql res j} {
    21     25     1 "PRAGMA journal_mode = DELETE"  delete        0
    22     26     2 "CREATE TABLE t1(a, b)"         {}            0
    23     27     3 "PRAGMA locking_mode=EXCLUSIVE" {exclusive}   0
    24     28     4 "INSERT INTO t1 VALUES(1, 2)"   {}            1
    25     29     5 "PRAGMA locking_mode=NORMAL"    {normal}      1

Changes to test/rollback.test.

    79     79     sqlite3_finalize $STMT
    80     80   } {SQLITE_OK}
    81     81   
    82     82   if {$tcl_platform(platform) == "unix" 
    83     83    && [permutation] ne "onefile"
    84     84    && [permutation] ne "inmemory_journal"
    85     85    && [permutation] ne "atomic-batch-write"
           86  + && [atomic_batch_write test.db]==0
    86     87   } {
    87     88     do_test rollback-2.1 {
    88     89       execsql {
    89     90         BEGIN;
    90     91         INSERT INTO t3 VALUES('hello world');
    91     92       }
    92     93       forcecopy test.db testA.db

Changes to test/sharedA.test.

    14     14   
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
    18     18   if {[run_thread_tests]==0} { finish_test ; return }
    19     19   db close
    20     20   set ::testprefix sharedA
           21  +
           22  +if {[atomic_batch_write test.db]} {
           23  +  finish_test
           24  +  return
           25  +}
    21     26   
    22     27   set ::enable_shared_cache [sqlite3_enable_shared_cache 1]
    23     28   
    24     29   #-------------------------------------------------------------------------
    25     30   #
    26     31   do_test 0.1 {
    27     32     sqlite3 db1 test.db

Changes to test/stmt.test.

    11     11   #
    12     12   # The tests in this file check that SQLite uses (or does not use) a
    13     13   # statement journal for various SQL statements.
    14     14   #
    15     15   
    16     16   set testdir [file dirname $argv0]
    17     17   source $testdir/tester.tcl
           18  +
           19  +if {[atomic_batch_write test.db]} {
           20  +  finish_test
           21  +  return
           22  +}
    18     23   
    19     24   do_test stmt-1.1 {
    20     25     execsql { CREATE TABLE t1(a integer primary key, b INTEGER NOT NULL) }
    21     26   } {}
    22     27   
    23     28   # The following tests verify the method used for the tests in this file -
    24     29   # that if a statement journal is required by a statement it is opened and

Changes to test/symlink.test.

    98     98     } 0
    99     99     do_test 2.$tn.2 {
   100    100       execsql {
   101    101         BEGIN;
   102    102           INSERT INTO t1 VALUES(1);
   103    103       } db2
   104    104       file exists test.db-journal
   105         -  } 1
          105  +  } [expr [atomic_batch_write test.db]==0]
   106    106     do_test 2.$tn.3 {
   107    107       list [file exists test2.db-journal] [file exists test3.db-journal]
   108    108     } {0 0}
   109    109     do_test 2.$tn.4 {
   110    110       execsql {
   111    111         COMMIT;
   112    112         PRAGMA journal_mode = wal;

Changes to test/sync.test.

    21     21   # These tests are only applicable when pager pragma are
    22     22   # enabled. Also, since every test uses an ATTACHed database, they
    23     23   # are only run when ATTACH is enabled.
    24     24   #
    25     25   ifcapable !pager_pragmas||!attach {
    26     26     finish_test
    27     27     return
           28  +}
           29  +if {[atomic_batch_write test.db]} {
           30  +  finish_test
           31  +  return
    28     32   }
    29     33   
    30     34   set sqlite_sync_count 0
    31     35   proc cond_incr_sync_count {adj} {
    32     36     global sqlite_sync_count
    33     37     if {$::tcl_platform(platform) == "windows"} {
    34     38       incr sqlite_sync_count $adj

Changes to test/sync2.test.

    25     25   ifcapable !pager_pragmas||!attach||!dirsync {
    26     26     finish_test
    27     27     return
    28     28   }
    29     29   if {$::tcl_platform(platform)!="unix" 
    30     30     || [permutation] == "journaltest"
    31     31     || [permutation] == "inmemory_journal"
           32  +  || [atomic_batch_write test.db] 
    32     33   } {
    33     34     finish_test
    34     35     return
    35     36   }
    36     37   
    37     38   proc execsql_sync {sql} {
    38     39     set s $::sqlite_sync_count

Changes to test/tempdb.test.

    12     12   # The focus of this file is in making sure that rolling back
    13     13   # a statement journal works correctly.
    14     14   #
    15     15   # $Id: tempdb.test,v 1.4 2009/06/05 17:09:12 drh Exp $
    16     16   
    17     17   set testdir [file dirname $argv0]
    18     18   source $testdir/tester.tcl
           19  +
           20  +if {[atomic_batch_write test.db]} {
           21  +  finish_test
           22  +  return
           23  +}
    19     24   
    20     25   # Use a temporary database.
    21     26   #
    22     27   db close
    23     28   sqlite3 db {}
    24     29   
    25     30   # Force a statement journal rollback on a database file that

Changes to test/tkt3457.test.

    14     14   
    15     15   set testdir [file dirname $argv0]
    16     16   source $testdir/tester.tcl
    17     17   
    18     18   if {$tcl_platform(platform) != "unix"} {
    19     19     finish_test
    20     20     return
           21  +}
           22  +if {[atomic_batch_write test.db]} {
           23  +  finish_test
           24  +  return
    21     25   }
    22     26   
    23     27   #-----------------------------------------------------------------------
    24     28   # To roll back a hot-journal file, the application needs read and write 
    25     29   # permission on the journal file in question. The following tests test
    26     30   # the outcome of trying to rollback a hot-journal file when this is not
    27     31   # the case.

Changes to test/vacuum5.test.

   139    139       INSERT INTO t1 SELECT NULL, randomblob(100) FROM s;
   140    140     }
   141    141   
   142    142     do_execsql_test 3.1 { VACUUM }
   143    143   
   144    144     db close
   145    145     tvfs delete
   146         -  do_test 3.2 {
   147         -    lrange $::openfiles 0 4
   148         -  } {test.db test.db-journal test.db-journal {} test.db-journal}
          146  +  if {[atomic_batch_write test.db]==0} {
          147  +    do_test 3.2 {
          148  +      lrange $::openfiles 0 4
          149  +    } {test.db test.db-journal test.db-journal {} test.db-journal}
          150  +  }
   149    151   } 
   150    152   
   151    153   
   152    154   
   153    155   finish_test

Changes to test/wal2.test.

   578    578     execsql { PRAGMA lock_status }
   579    579   } {main exclusive temp closed}
   580    580   do_test wal2-6.3.4 {
   581    581     execsql { 
   582    582       BEGIN;
   583    583         INSERT INTO t1 VALUES('Groucho');
   584    584     }
   585         -  list [file exists test.db-wal] [file exists test.db-journal]
   586         -} {0 1}
          585  +} {}
          586  +if {[atomic_batch_write test.db]==0} {
          587  +  do_test wal2-6.3.4.1 {
          588  +    list [file exists test.db-wal] [file exists test.db-journal]
          589  +  } {0 1}
          590  +}
   587    591   do_test wal2-6.3.5 {
   588    592     execsql { PRAGMA lock_status }
   589    593   } {main exclusive temp closed}
   590    594   do_test wal2-6.3.6 {
   591    595     execsql { COMMIT }
   592         -  list [file exists test.db-wal] [file exists test.db-journal]
   593         -} {0 1}
          596  +} {}
          597  +if {[atomic_batch_write test.db]==0} {
          598  +  do_test wal2-6.3.6.1 {
          599  +    list [file exists test.db-wal] [file exists test.db-journal]
          600  +  } {0 1}
          601  +}
   594    602   do_test wal2-6.3.7 {
   595    603     execsql { PRAGMA lock_status }
   596    604   } {main exclusive temp closed}
   597    605   db close
   598    606   
   599    607   
   600    608   # This test - wal2-6.4.* - uses a single database connection and the

Changes to test/walmode.test.

    41     41     execsql { PRAGMA page_size = 1024 }
    42     42     execsql { PRAGMA journal_mode = wal }
    43     43   } {wal}
    44     44   do_test walmode-1.2 {
    45     45     file size test.db
    46     46   } {1024}
    47     47   
    48         -set expected_sync_count 3
    49         -if {$::tcl_platform(platform)!="windows"} {
    50         -  ifcapable dirsync {
    51         -    incr expected_sync_count
           48  +if {[atomic_batch_write test.db]==0} {
           49  +  set expected_sync_count 3
           50  +  if {$::tcl_platform(platform)!="windows"} {
           51  +    ifcapable dirsync {
           52  +      incr expected_sync_count
           53  +    }
    52     54     }
           55  +  do_test walmode-1.3 {
           56  +    set sqlite_sync_count
           57  +  } $expected_sync_count
    53     58   }
    54         -do_test walmode-1.3 {
    55         -  set sqlite_sync_count
    56         -} $expected_sync_count
    57     59   
    58     60   do_test walmode-1.4 {
    59     61     file exists test.db-wal
    60     62   } {0}
    61     63   do_test walmode-1.5 {
    62     64     execsql { CREATE TABLE t1(a, b) }
    63     65     file size test.db
................................................................................
   102    104   
   103    105   # Test that changing back to journal_mode=persist works.
   104    106   #
   105    107   do_test walmode-4.1 {
   106    108     execsql { INSERT INTO t1 VALUES(1, 2) }
   107    109     execsql { PRAGMA journal_mode = persist }
   108    110   } {persist}
   109         -do_test walmode-4.2 {
   110         -  list [file exists test.db-journal] [file exists test.db-wal]
   111         -} {1 0}
          111  +if {[atomic_batch_write test.db]==0} {
          112  +  do_test walmode-4.2 {
          113  +    list [file exists test.db-journal] [file exists test.db-wal]
          114  +  } {1 0}
          115  +}
   112    116   do_test walmode-4.3 {
   113    117     execsql { SELECT * FROM t1 }
   114    118   } {1 2}
   115    119   do_test walmode-4.4 {
   116    120     db close
   117    121     sqlite3 db test.db
   118    122     execsql { SELECT * FROM t1 }
   119    123   } {1 2}
   120         -do_test walmode-4.5 {
   121         -  list [file exists test.db-journal] [file exists test.db-wal]
   122         -} {1 0}
          124  +if {[atomic_batch_write test.db]==0} {
          125  +  do_test walmode-4.5 {
          126  +    list [file exists test.db-journal] [file exists test.db-wal]
          127  +  } {1 0}
          128  +}
   123    129   
   124    130   # Test that nothing goes wrong if a connection is prevented from changing
   125    131   # from WAL to rollback mode because a second connection has the database
   126    132   # open. Or from rollback to WAL.
   127    133   #
   128    134   do_test walmode-4.6 {
   129    135     sqlite3 db2 test.db

Changes to test/zerodamage.test.

    70     70                       WHERE value BETWEEN 1 AND 400;
    71     71     }
    72     72     set ::max_journal_size 0
    73     73     db eval {
    74     74       UPDATE t1 SET y=randomblob(50) WHERE x=123;
    75     75     }
    76     76     concat [file_control_powersafe_overwrite db -1] [set ::max_journal_size]
    77         -} {0 1 2576}
           77  +} [list 0 1 [expr ([atomic_batch_write test.db]==0)*2576]]
    78     78   
    79     79   # Repeat the previous step with zero-damage turned off.  This time the
    80     80   # maximum rollback journal size should be much larger.
    81     81   #
    82     82   do_test zerodamage-2.1 {
    83     83     set ::max_journal_size 0
    84     84     db close
    85     85     sqlite3 db file:test.db?psow=FALSE -uri 1
    86     86     db eval {
    87     87       UPDATE t1 SET y=randomblob(50) WHERE x=124;
    88     88     }
    89     89     concat [file_control_powersafe_overwrite db -1] [set ::max_journal_size]
    90         -} {0 0 24704}
           90  +} [list 0 0 [expr ([atomic_batch_write test.db]==0)*24704]]
    91     91   
    92     92   if {[wal_is_capable]} {
    93     93     # Run a WAL-mode transaction with POWERSAFE_OVERWRITE on to verify that the
    94     94     # WAL file does not get too big.
    95     95     #
    96     96     do_test zerodamage-3.0 {
    97     97       db eval {