/ Check-in [6631e1e6]
Login

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

Overview
Comment:Fix more test-case errors in the Apple configuration.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6631e1e655604a7d1fb45b4d151938d4a13b47f3
User & Date: drh 2016-03-18 00:19:48
Context
2016-03-18
00:39
Fix FTS5 so that it works with SQLITE_OMIT_AUTORESET. check-in: b199637d user: drh tags: trunk
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
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_config.c.

    99     99   #endif
   100    100   
   101    101   #ifdef SQLITE_DISABLE_LFS
   102    102     Tcl_SetVar2(interp, "sqlite_options", "lfs", "0", TCL_GLOBAL_ONLY);
   103    103   #else
   104    104     Tcl_SetVar2(interp, "sqlite_options", "lfs", "1", TCL_GLOBAL_ONLY);
   105    105   #endif
          106  +
          107  +#ifdef SQLITE_DISABLE_PAGECACHE_OVERFLOW_STATS
          108  +  Tcl_SetVar2(interp, "sqlite_options", "pagecache_overflow_stats","0",TCL_GLOBAL_ONLY);
          109  +#else
          110  +  Tcl_SetVar2(interp, "sqlite_options", "pagecache_overflow_stats","1",TCL_GLOBAL_ONLY);
          111  +#endif
   106    112   
   107    113   #if SQLITE_MAX_MMAP_SIZE>0
   108    114     Tcl_SetVar2(interp, "sqlite_options", "mmap", "1", TCL_GLOBAL_ONLY);
   109    115   #else
   110    116     Tcl_SetVar2(interp, "sqlite_options", "mmap", "0", TCL_GLOBAL_ONLY);
   111    117   #endif
   112    118   
................................................................................
   579    585   #ifdef SQLITE_OMIT_TCL_VARIABLE
   580    586     Tcl_SetVar2(interp, "sqlite_options", "tclvar", "0", TCL_GLOBAL_ONLY);
   581    587   #else
   582    588     Tcl_SetVar2(interp, "sqlite_options", "tclvar", "1", TCL_GLOBAL_ONLY);
   583    589   #endif
   584    590   
   585    591     Tcl_SetVar2(interp, "sqlite_options", "threadsafe", 
   586         -      STRINGVALUE(SQLITE_THREADSAFE), TCL_GLOBAL_ONLY);
          592  +      SQLITE_THREADSAFE ? "1" : "0", TCL_GLOBAL_ONLY);
          593  +  Tcl_SetVar2(interp, "sqlite_options", "threadsafe1", 
          594  +      SQLITE_THREADSAFE==1 ? "1" : "0", TCL_GLOBAL_ONLY);
          595  +  Tcl_SetVar2(interp, "sqlite_options", "threadsafe2", 
          596  +      SQLITE_THREADSAFE==2 ? "1" : "0", TCL_GLOBAL_ONLY);
   587    597     assert( sqlite3_threadsafe()==SQLITE_THREADSAFE );
   588    598   
   589    599   #ifdef SQLITE_OMIT_TEMPDB
   590    600     Tcl_SetVar2(interp, "sqlite_options", "tempdb", "0", TCL_GLOBAL_ONLY);
   591    601   #else
   592    602     Tcl_SetVar2(interp, "sqlite_options", "tempdb", "1", TCL_GLOBAL_ONLY);
   593    603   #endif

Changes to test/memsubsys1.test.

    96     96   sqlite3_shutdown
    97     97   sqlite3_config_pagecache [expr 1024+$xtra_size] 20
    98     98   sqlite3_initialize
    99     99   reset_highwater_marks
   100    100   build_test_db memsubsys1-2 {PRAGMA page_size=1024; PRAGMA mmap_size=0}
   101    101   #show_memstats
   102    102   set MEMORY_MANAGEMENT $sqlite_options(memorymanage)
   103         -ifcapable !malloc_usable_size {
   104         - do_test memsubsys1-2.3 {
   105         -    set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
   106         -  } [expr ($TEMP_STORE>1 || $MEMORY_MANAGEMENT==0)*1024]
          103  +ifcapable pagecache_overflow_stats {
          104  +  ifcapable !malloc_usable_size {
          105  +    do_test memsubsys1-2.3 {
          106  +      set pg_ovfl [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_OVERFLOW 0] 2]
          107  +    } [expr ($TEMP_STORE>1 || $MEMORY_MANAGEMENT==0)*1024]
          108  +  }
   107    109   }
   108    110   do_test memsubsys1-2.4 {
   109    111     set pg_used [lindex [sqlite3_status SQLITE_STATUS_PAGECACHE_USED 0] 2]
   110    112   } 20
   111    113   do_test memsubsys1-2.5 {
   112    114     set s_used [lindex [sqlite3_status SQLITE_STATUS_SCRATCH_USED 0] 2]
   113    115   } 0

Changes to test/mutex1.test.

    93     93   # Tests mutex1-2.* test the three thread-safety related modes that
    94     94   # can be selected using sqlite3_config:
    95     95   #
    96     96   #   * Serialized mode,
    97     97   #   * Multi-threaded mode,
    98     98   #   * Single-threaded mode.
    99     99   #
   100         -ifcapable threadsafe&&shared_cache {
          100  +ifcapable threadsafe1&&shared_cache {
   101    101     set enable_shared_cache [sqlite3_enable_shared_cache 1]
   102    102     foreach {mode mutexes} {
   103    103       singlethread {}
   104    104       multithread  {
   105    105         fast static_app1 static_app2 static_app3
   106    106         static_lru static_master static_mem static_open
   107    107         static_prng static_pmem static_vfs1 static_vfs2