1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Have test_vfs.c simulate IO errors in xShmLock.

FossilOrigin-Name: fcbf7cf189506e43fc2f0820aedffb195038d3a9
This commit is contained in:
dan
2010-06-03 18:20:19 +00:00
parent 05cb5b244b
commit 961ff45104
5 changed files with 40 additions and 24 deletions

26
test/wal_common.tcl Normal file
View File

@ -0,0 +1,26 @@
# 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)}
}