Skip to content

Commit

Permalink
Modify test cases so that veryquick.test passes with PAGECACHE_BLOCKA…
Browse files Browse the repository at this point in the history
…LLOC defined.
  • Loading branch information
danielk-1977 committed Aug 22, 2011
1 parent f5deb31 commit b1c3ba1
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/test_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,12 @@ Tcl_SetVar2(interp, "sqlite_options", "long_double",
Tcl_SetVar2(interp, "sqlite_options", "yytrackmaxstackdepth", "0", TCL_GLOBAL_ONLY);
#endif

#ifdef SQLITE_PAGECACHE_BLOCKALLOC
Tcl_SetVar2(interp, "sqlite_options", "blockalloc", "1", TCL_GLOBAL_ONLY);
#else
Tcl_SetVar2(interp, "sqlite_options", "blockalloc", "0", TCL_GLOBAL_ONLY);
#endif

#define LINKVAR(x) { \
static const int cv_ ## x = SQLITE_ ## x; \
Tcl_LinkVar(interp, "SQLITE_" #x, (char *)&(cv_ ## x), \
Expand Down
2 changes: 1 addition & 1 deletion test/memdb.test
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ do_test memdb-8.2 {

# Test that auto-vacuum works with in-memory databases.
#
ifcapable autovacuum {
ifcapable autovacuum&&!blockalloc {
do_test memdb-9.1 {
db close
sqlite3 db test.db
Expand Down
7 changes: 7 additions & 0 deletions test/memsubsys1.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ if {[permutation] == "memsubsys1"} {
return
}

# Nor will it work if the pager is allocating memory in blocks.
#
ifcapable blockalloc {
finish_test
return
}

# This procedure constructs a new database in test.db. It fills
# this database with many small records (enough to force multiple
# rebalance operations in the btree-layer and to require a large
Expand Down
7 changes: 7 additions & 0 deletions test/pcache2.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
set testdir [file dirname $argv0]
source $testdir/tester.tcl

# If compiled with blockalloc, pagecache memory is not used. Which
# causes these tests to fail.
#
ifcapable blockalloc {
finish_test
return
}

# Set up a pcache memory pool so that we can easily track how many
# pages are being used for cache.
Expand Down

0 comments on commit b1c3ba1

Please sign in to comment.