Add a test to ensure os_unix.c works with 64KiB OS pages.
FossilOrigin-Name: e3d2be3ba47cdaafd26347620ae3bc2813203f16
This commit is contained in:
@@ -61,6 +61,7 @@ foreach s {
|
||||
fcntl read pread write pwrite fchmod fallocate
|
||||
pread64 pwrite64 unlink openDirectory mkdir rmdir
|
||||
statvfs fchown umask mmap munmap mremap
|
||||
getpagesize
|
||||
} {
|
||||
if {[test_syscall exists $s]} {lappend syscall_list $s}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# 2010 April 13
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
# This file implements regression tests for SQLite library. The
|
||||
# focus of this file is testing the operation of the library in
|
||||
# "PRAGMA journal_mode=WAL" mode.
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
set testprefix wal64k
|
||||
|
||||
ifcapable !wal {finish_test ; return }
|
||||
|
||||
db close
|
||||
test_syscall pagesize 65536
|
||||
sqlite3 db test.db
|
||||
|
||||
do_execsql_test 1.0 {
|
||||
PRAGMA journal_mode = WAL;
|
||||
CREATE TABLE t1(x);
|
||||
CREATE INDEX i1 ON t1(x);
|
||||
} {wal}
|
||||
do_test 1.1 { file size test.db-shm } {65536}
|
||||
|
||||
do_test 1.2 {
|
||||
execsql BEGIN
|
||||
while {[file size test.db-shm]==65536} {
|
||||
execsql { INSERT INTO t1 VALUES( randstr(900,1100) ) }
|
||||
}
|
||||
execsql COMMIT
|
||||
file size test.db-shm
|
||||
} {131072}
|
||||
|
||||
integrity_check 1.3
|
||||
|
||||
db close
|
||||
test_syscall pagesize -1
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user