/ Check-in [1b394679]
Login

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

Overview
Comment:Update a couple of test scripts so that they work on F2FS file-systems that support atomic transactions. Cherrypick of [49e58e645e].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | branch-3.19
Files: files | file ages | folders
SHA3-256: 1b3946792730b536d0084cf9936624a456749c0059cee49fd69f36bec174c9c7
User & Date: dan 2018-02-02 08:08:14
Original Comment: Update a couple of test scripts so that they work on F2FS file-systems that support atomic transactions.
Context
2018-02-02
08:14
In SQLITE_ENABLE_BATCH_ATOMIC_WRITE builds on F2FS file-systems, invoke SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE if an SQLITE_FCNTL_COMMIT_ATOMIC_WRITE call fails. Also, do not use an atomic transaction to create the initial database. This is because if an error occurs while writing to the db file, any changes to the file-size do not seem to be rolled back automatically. The only time this matters is when the file was 0 bytes in size to start with. Cherrypick of [b3122db154]. check-in: 22a228ed user: dan tags: branch-3.19
08:08
Update a couple of test scripts so that they work on F2FS file-systems that support atomic transactions. Cherrypick of [49e58e645e]. check-in: 1b394679 user: dan tags: branch-3.19
2018-01-24
06:30
Update a couple of test scripts so that they work on F2FS file-systems that support atomic transactions. check-in: 49e58e64 user: dan tags: trunk
2018-01-13
14:07
Fix a typo in test file crash8.test. check-in: 4951d91d user: dan tags: branch-3.19
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/ioerr.test.

   168    168   
   169    169   # Test handling of IO errors that occur while rolling back hot journal
   170    170   # files.
   171    171   #
   172    172   # These tests can't be run on windows because the windows version of 
   173    173   # SQLite holds a mandatory exclusive lock on journal files it has open.
   174    174   #
   175         -if {$tcl_platform(platform)!="windows"} {
          175  +if {$tcl_platform(platform)!="windows" && ![atomic_batch_write test.db]} {
   176    176     do_ioerr_test ioerr-7 -tclprep {
   177    177       db close
   178    178       sqlite3 db2 test2.db
   179    179       db2 eval {
   180    180         PRAGMA synchronous = 0;
   181    181         CREATE TABLE t1(a, b);
   182    182         INSERT INTO t1 VALUES(1, 2);
................................................................................
   207    207     sqlite3 db test.db
   208    208   } -sqlbody {
   209    209     SELECT c FROM t1;
   210    210   }
   211    211   
   212    212   # For test coverage: Cause an IO error whilst reading the master-journal
   213    213   # name from a journal file.
   214         -if {$tcl_platform(platform)=="unix"} {
          214  +if {$tcl_platform(platform)=="unix" && [atomic_batch_write test.db]==0} {
   215    215     do_ioerr_test ioerr-9 -ckrefcount true -tclprep {
   216    216       execsql {
   217    217         CREATE TABLE t1(a,b,c);
   218    218         INSERT INTO t1 VALUES(randstr(200,200), randstr(1000,1000), 2);
   219    219         BEGIN;
   220    220         INSERT INTO t1 VALUES(randstr(200,200), randstr(1000,1000), 2);
   221    221       }

Changes to test/malloc.test.

   325    325       }} err]
   326    326       if {$rc && $err!="no such table: t1"} {
   327    327         error $err
   328    328       }
   329    329     }
   330    330   }
   331    331   
   332         -if {$tcl_platform(platform)!="windows"} {
          332  +if {$tcl_platform(platform)!="windows" && [atomic_batch_write test.db]==0} {
   333    333     do_malloc_test 14 -tclprep {
   334    334       catch {db close}
   335    335       sqlite3 db2 test2.db
   336    336       sqlite3_extended_result_codes db2 1
   337    337       db2 eval {
   338    338         PRAGMA journal_mode = DELETE;    /* For inmemory_journal permutation */
   339    339         PRAGMA synchronous = 0;