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:
26
test/wal_common.tcl
Normal file
26
test/wal_common.tcl
Normal 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)}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user