sqlite/test/wal_common.tcl
dan 961ff45104 Have test_vfs.c simulate IO errors in xShmLock.
FossilOrigin-Name: fcbf7cf189506e43fc2f0820aedffb195038d3a9
2010-06-03 18:20:19 +00:00

27 lines
627 B
Tcl

# 2010 June 03
#
# 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 contains common code used by many different malloc tests
# within the test suite.
#
proc wal_file_size {nFrame pgsz} {
expr {24 + ($pgsz+24)*$nFrame}
}
proc wal_frame_count {zFile pgsz} {
set f [file size $zFile]
expr {($f - 24) / ($pgsz+24)}
}