SQLite

Check-in [d6f6c87c9c]
Login

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

Overview
Comment:Disable the DBSTATUS_CACHE_USED_SHARED tests on mac when memsys3/5 is disabled due to differences in the allocation sizes for the Darwin memory allocator.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d6f6c87c9c0acf609a9d5bea818bb7a5437109a1
User & Date: drh 2016-07-25 12:10:25.504
Context
2016-07-25
14:20
Changes to test scripts to get them all running on OpenBSD. (check-in: 9e7bedeee4 user: drh tags: trunk)
12:10
Disable the DBSTATUS_CACHE_USED_SHARED tests on mac when memsys3/5 is disabled due to differences in the allocation sizes for the Darwin memory allocator. (check-in: d6f6c87c9c user: drh tags: trunk)
12:01
Update the vacuummem.test script so that it works on mac as well as on linux. (check-in: ea7fb98b96 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/dbstatus.test.
375
376
377
378
379
380
381



382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411

412
413
414
  }
}

#-------------------------------------------------------------------------
# The following tests focus on DBSTATUS_CACHE_USED_SHARED
#
ifcapable shared_cache {



  proc do_cacheused_test {tn db res} {
    set cu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED 0]
    set pcu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED_SHARED 0]
    set cu [lindex $cu 1]
    set pcu [lindex $pcu 1]
    uplevel [list do_test $tn [list list $cu $pcu] "#/$res/"]
  }
  reset_db
  sqlite3 db file:test.db?cache=shared

  do_execsql_test 4.0 {
    PRAGMA auto_vacuum=NONE;
    CREATE TABLE t1(a, b, c);
    INSERT INTO t1 VALUES(1, 2, 3);
  }
  do_cacheused_test 4.0.1 db { 4568 4568 }
  do_execsql_test 4.1 {
    CREATE TEMP TABLE tt(a, b, c);
    INSERT INTO tt VALUES(1, 2, 3);
  }
  do_cacheused_test 4.1.1 db { 9000 9000 }

  sqlite3 db2 file:test.db?cache=shared
  do_cacheused_test 4.2.1 db2 { 4568 2284 }
  do_cacheused_test 4.2.2 db { 9000 6716 }
  db close
  do_cacheused_test 4.2.3 db2 { 4568 4568 }
  sqlite3 db file:test.db?cache=shared
  do_cacheused_test 4.2.4 db2 { 4568 2284 }
  db2 close

}

finish_test







>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>



375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
  }
}

#-------------------------------------------------------------------------
# The following tests focus on DBSTATUS_CACHE_USED_SHARED
#
ifcapable shared_cache {
  if {[permutation]=="memsys3"
      || [permutation]=="memsys5"
      || $::tcl_platform(os)!="Darwin"} {
    proc do_cacheused_test {tn db res} {
      set cu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED 0]
      set pcu [sqlite3_db_status $db SQLITE_DBSTATUS_CACHE_USED_SHARED 0]
      set cu [lindex $cu 1]
      set pcu [lindex $pcu 1]
      uplevel [list do_test $tn [list list $cu $pcu] "#/$res/"]
    }
    reset_db
    sqlite3 db file:test.db?cache=shared
  
    do_execsql_test 4.0 {
      PRAGMA auto_vacuum=NONE;
      CREATE TABLE t1(a, b, c);
      INSERT INTO t1 VALUES(1, 2, 3);
    }
    do_cacheused_test 4.0.1 db { 4568 4568 }
    do_execsql_test 4.1 {
      CREATE TEMP TABLE tt(a, b, c);
      INSERT INTO tt VALUES(1, 2, 3);
    }
    do_cacheused_test 4.1.1 db { 9000 9000 }
  
    sqlite3 db2 file:test.db?cache=shared
    do_cacheused_test 4.2.1 db2 { 4568 2284 }
    do_cacheused_test 4.2.2 db { 9000 6716 }
    db close
    do_cacheused_test 4.2.3 db2 { 4568 4568 }
    sqlite3 db file:test.db?cache=shared
    do_cacheused_test 4.2.4 db2 { 4568 2284 }
    db2 close
  }
}

finish_test