/ Check-in [399c6076]
Login

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

Overview
Comment:Fix some test cases so that they work under the Apple configuration.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:399c60764d3fdec49dab1745c30930ca1dbafe70
User & Date: drh 2016-03-17 23:56:23
Context
2016-03-18
00:19
Fix more test-case errors in the Apple configuration. check-in: 6631e1e6 user: drh tags: trunk
2016-03-17
23:56
Fix some test cases so that they work under the Apple configuration. check-in: 399c6076 user: drh tags: trunk
23:16
Fix harmless compiler warnings that arise with -DSQLITE_OMIT_LOAD_EXTENSION check-in: 65ba2f0b user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Show Whitespace Changes Patch

Changes to src/test_config.c.

    74     74   #endif
    75     75   
    76     76   #ifdef SQLITE_DEBUG
    77     77     Tcl_SetVar2(interp, "sqlite_options", "debug", "1", TCL_GLOBAL_ONLY);
    78     78   #else
    79     79     Tcl_SetVar2(interp, "sqlite_options", "debug", "0", TCL_GLOBAL_ONLY);
    80     80   #endif
           81  +
           82  +#ifdef SQLITE_DEFAULT_CKPTFULLFSYNC
           83  +  Tcl_SetVar2(interp, "sqlite_options", "default_ckptfullfsync", 
           84  +              SQLITE_DEFAULT_CKPTFULLFSYNC ? "1" : "0", TCL_GLOBAL_ONLY);
           85  +#else
           86  +  Tcl_SetVar2(interp, "sqlite_options", "default_ckptfullfsync", "0", TCL_GLOBAL_ONLY);
           87  +#endif
    81     88   
    82     89   #ifdef SQLITE_DIRECT_OVERFLOW_READ
    83     90     Tcl_SetVar2(interp, "sqlite_options", "direct_read", "1", TCL_GLOBAL_ONLY);
    84     91   #else
    85     92     Tcl_SetVar2(interp, "sqlite_options", "direct_read", "0", TCL_GLOBAL_ONLY);
    86     93   #endif
    87     94   

Changes to test/capi3.test.

   921    921   } {0 {}}
   922    922   do_test capi3-11.9.3 {
   923    923     sqlite3_get_autocommit $DB
   924    924   } 1
   925    925   do_test capi3-11.10 {
   926    926     sqlite3_step $STMT
   927    927   } {SQLITE_ROW}
   928         -ifcapable !autoreset {
   929         -  # If SQLITE_OMIT_AUTORESET is defined, then the statement must be
   930         -  # reset() before it can be passed to step() again.
   931         -  do_test capi3-11.11a { sqlite3_step $STMT } {SQLITE_MISUSE}
   932         -  do_test capi3-11.11b { sqlite3_reset $STMT } {SQLITE_ABORT}
   933         -}
   934    928   do_test capi3-11.11 {
   935    929     sqlite3_step $STMT
   936    930   } {SQLITE_DONE}
          931  +ifcapable api_armor {
          932  +  do_test capi3-11.12armor {
          933  +    sqlite3_step $STMT
          934  +    sqlite3_step $STMT
          935  +  } {SQLITE_MISUSE}
          936  +} else {
   937    937   do_test capi3-11.12 {
   938    938     sqlite3_step $STMT
   939    939     sqlite3_step $STMT
   940    940   } {SQLITE_ROW}
          941  +}
   941    942   do_test capi3-11.13 {
   942    943     sqlite3_finalize $STMT
   943    944   } {SQLITE_OK}
   944    945   do_test capi3-11.14 {
   945    946     execsql {
   946    947       SELECT a FROM t2;
   947    948     }

Changes to test/capi3c.test.

   861    861   } {0 {}}
   862    862   do_test capi3c-11.9.3 {
   863    863     sqlite3_get_autocommit $DB
   864    864   } 1
   865    865   do_test capi3c-11.10 {
   866    866     sqlite3_step $STMT
   867    867   } {SQLITE_ROW}
   868         -ifcapable !autoreset {
   869         -  # If SQLITE_OMIT_AUTORESET is defined, then the statement must be
   870         -  # reset() before it can be passed to step() again.
   871         -  do_test capi3-11.11a { sqlite3_step $STMT } {SQLITE_MISUSE}
   872         -  do_test capi3-11.11b { sqlite3_reset $STMT } {SQLITE_ABORT}
   873         -}
   874    868   do_test capi3c-11.11 {
   875    869     sqlite3_step $STMT
   876    870   } {SQLITE_DONE}
          871  +ifcapable api_armor {
          872  +  do_test capi3c-11.12armor {
          873  +    sqlite3_step $STMT
          874  +    sqlite3_step $STMT
          875  +  } {SQLITE_MISUSE}
          876  +} else {
   877    877   do_test capi3c-11.12 {
   878    878     sqlite3_step $STMT
   879    879     sqlite3_step $STMT
   880    880   } {SQLITE_ROW}
          881  +}
   881    882   do_test capi3c-11.13 {
   882    883     sqlite3_finalize $STMT
   883    884   } {SQLITE_OK}
   884    885   do_test capi3c-11.14 {
   885    886     execsql {
   886    887       SELECT a FROM t2;
   887    888     }

Changes to test/wal2.test.

  1190   1190   # Test that "PRAGMA checkpoint_fullsync" appears to be working.
  1191   1191   #
  1192   1192   foreach {tn sql reslist} {
  1193   1193     1 { }                                 {10 0 4 0 6 0}
  1194   1194     2 { PRAGMA checkpoint_fullfsync = 1 } {10 4 4 2 6 2}
  1195   1195     3 { PRAGMA checkpoint_fullfsync = 0 } {10 0 4 0 6 0}
  1196   1196   } {
         1197  +  ifcapable default_ckptfullfsync {
         1198  +    if {[string trim $sql]==""} continue
         1199  +  }
  1197   1200     faultsim_delete_and_reopen
  1198   1201   
  1199   1202     execsql {PRAGMA auto_vacuum = 0; PRAGMA synchronous = FULL;}
  1200   1203     execsql $sql
  1201   1204     do_execsql_test wal2-14.$tn.0 { PRAGMA page_size = 4096 }   {}
  1202   1205     do_execsql_test wal2-14.$tn.1 { PRAGMA journal_mode = WAL } {wal}
  1203   1206   

Changes to test/wal3.test.

   216    216     
   217    217       testvfs T
   218    218       T filter {} 
   219    219       T script sync_counter
   220    220       sqlite3 db test.db -vfs T
   221    221     
   222    222       execsql "PRAGMA synchronous = $syncmode"
          223  +    execsql "PRAGMA checkpoint_fullfsync = 0"
   223    224       execsql { PRAGMA journal_mode = WAL }
   224    225       execsql { CREATE TABLE filler(a,b,c); }
   225    226   
   226    227       set ::syncs [list]
   227    228       T filter xSync
   228    229       execsql {
   229    230         CREATE TABLE x(y);