Update the multiplex.test script to conform to that found in the "experimental"
branch off of trunk. FossilOrigin-Name: 2eb79efbff9cdab843b172e9fa9fb400c542fab1
This commit is contained in:
parent
5b1626aa47
commit
658dd586ed
13
manifest
13
manifest
@ -1,5 +1,5 @@
|
||||
C Move\sthe\smultiplexor\schanges\sin\sthe\sexperimental\sbranch\n(check-ins\s[255d21499b]\sand\s[199f52bced])\sinto\sthe\snx-devkit\sbranch.
|
||||
D 2011-12-13T15:02:54.819
|
||||
C Update\sthe\smultiplex.test\sscript\sto\sconform\sto\sthat\sfound\sin\sthe\s"experimental"\nbranch\soff\sof\strunk.
|
||||
D 2011-12-13T15:25:06.872
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 5b4a3e12a850b021547e43daf886b25133b44c07
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -605,7 +605,8 @@ F test/misc5.test 528468b26d03303b1f047146e5eefc941b9069f5
|
||||
F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91
|
||||
F test/misc7.test eafaa41b9133d7a2ded4641bbe5f340731d35a52
|
||||
F test/misuse.test ba4fb5d1a6101d1c171ea38b3c613d0661c83054
|
||||
F test/multiplex.test 9df8bf738b3b97c718fceb3fadb30900ba494418
|
||||
F test/multiplex.test 8bc3c71f73fe833bc8a659d454d320044a33b5da
|
||||
F test/multiplex3.test 2860177d0ec8d494c538f2199b8812df1c09c7c5
|
||||
F test/mutex1.test 78b2b9bb320e51d156c4efdb71b99b051e7a4b41
|
||||
F test/mutex2.test bfeaeac2e73095b2ac32285d2756e3a65e681660
|
||||
F test/nan.test e9648b9d007c7045242af35e11a984d4b169443a
|
||||
@ -976,7 +977,7 @@ F tool/tostr.awk e75472c2f98dd76e06b8c9c1367f4ab07e122d06
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings-clang.sh 9f406d66e750e8ac031c63a9ef3248aaa347ef2a
|
||||
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
|
||||
P ce55f250f56fa3a1ca864f81e9e86f911b981490
|
||||
R cc774ebd7c088b6b617c7f855781c545
|
||||
P eb95d2f72c625bcfd0f8e9db1db2cb8799854b57
|
||||
R f11319d97c8d3b9123b61c079ca9c86c
|
||||
U drh
|
||||
Z 1b3d8d40cb48e276ed9ae7077034a64e
|
||||
Z b47be607cba7caec297cb5893d5ae313
|
||||
|
@ -1 +1 @@
|
||||
eb95d2f72c625bcfd0f8e9db1db2cb8799854b57
|
||||
2eb79efbff9cdab843b172e9fa9fb400c542fab1
|
@ -14,6 +14,16 @@ set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
source $testdir/malloc_common.tcl
|
||||
|
||||
# The tests in this file assume that SQLite is compiled without
|
||||
# ENABLE_8_3_NAMES.
|
||||
#
|
||||
ifcapable 8_3_names {
|
||||
puts -nonewline "SQLite compiled with SQLITE_ENABLE_8_3_NAMES. "
|
||||
puts "Skipping tests multiplex-*."
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
set g_chunk_size [ expr ($::SQLITE_MAX_PAGE_SIZE*16384) ]
|
||||
set g_max_chunks 32
|
||||
|
||||
@ -24,7 +34,7 @@ set g_max_chunks 32
|
||||
# file name with the chunk number.
|
||||
proc multiplex_name {name chunk} {
|
||||
if {$chunk==0} { return $name }
|
||||
set num [format "%02d" $chunk]
|
||||
set num [format "%03d" $chunk]
|
||||
ifcapable {multiplex_ext_overwrite} {
|
||||
set name [string range $name 0 [expr [string length $name]-2-1]]
|
||||
}
|
||||
|
99
test/multiplex3.test
Normal file
99
test/multiplex3.test
Normal file
@ -0,0 +1,99 @@
|
||||
|
||||
# 2011 December 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 contains tests for error (IO, OOM etc.) handling when using
|
||||
# the multiplexor extension with 8.3 filenames.
|
||||
#
|
||||
|
||||
set testdir $env(SQLITE_TEST_DIR)
|
||||
source $testdir/tester.tcl
|
||||
source $testdir/malloc_common.tcl
|
||||
set ::testprefix multiplex3
|
||||
|
||||
ifcapable !8_3_names {
|
||||
puts -nonewline "SQLite compiled without SQLITE_ENABLE_8_3_NAMES. "
|
||||
puts "Skipping tests zipvfsD-*."
|
||||
finish_test
|
||||
return
|
||||
}
|
||||
|
||||
db close
|
||||
sqlite3_shutdown
|
||||
sqlite3_config_uri 1
|
||||
autoinstall_test_functions
|
||||
|
||||
sqlite3_multiplex_initialize "" 1
|
||||
|
||||
proc destroy_vfs_stack {} {
|
||||
generic_unregister stack
|
||||
sqlite3_multiplex_shutdown
|
||||
}
|
||||
|
||||
proc multiplex_delete_db {} {
|
||||
forcedelete test.db
|
||||
for {set i 1} {$i <= 1000} {incr i} {
|
||||
forcedelete test.[format %03d $i]
|
||||
}
|
||||
}
|
||||
|
||||
# Procs to save and restore the current muliplexed database.
|
||||
#
|
||||
proc multiplex_save_db {} {
|
||||
foreach f [glob -nocomplain sv_test.*] { forcedelete $f }
|
||||
foreach f [glob -nocomplain test.*] { forcecopy $f "sv_$f" }
|
||||
}
|
||||
proc multiplex_restore_db {} {
|
||||
foreach f [glob -nocomplain test.*] {forcedelete $f}
|
||||
foreach f [glob -nocomplain sv_test.*] {forcecopy $f [string range $f 3 end]} }
|
||||
|
||||
|
||||
do_test 1.0 {
|
||||
multiplex_delete_db
|
||||
sqlite3 db file:test.db?8_3_names=1
|
||||
sqlite3_multiplex_control db main chunk_size [expr 256*1024]
|
||||
execsql {
|
||||
CREATE TABLE t1(a PRIMARY KEY, b);
|
||||
INSERT INTO t1 VALUES(randomblob(15), randomblob(2000));
|
||||
INSERT INTO t1 SELECT randomblob(15), randomblob(2000) FROM t1; -- 2
|
||||
INSERT INTO t1 SELECT randomblob(15), randomblob(2000) FROM t1; -- 4
|
||||
INSERT INTO t1 SELECT randomblob(15), randomblob(2000) FROM t1; -- 8
|
||||
INSERT INTO t1 SELECT randomblob(15), randomblob(2000) FROM t1; -- 16
|
||||
INSERT INTO t1 SELECT randomblob(15), randomblob(2000) FROM t1; -- 32
|
||||
INSERT INTO t1 SELECT randomblob(15), randomblob(2000) FROM t1; -- 64
|
||||
INSERT INTO t1 SELECT randomblob(15), randomblob(2000) FROM t1; -- 128
|
||||
INSERT INTO t1 SELECT randomblob(15), randomblob(2000) FROM t1; -- 256
|
||||
INSERT INTO t1 SELECT randomblob(15), randomblob(2000) FROM t1; -- 512
|
||||
}
|
||||
set ::cksum1 [execsql {SELECT md5sum(a, b) FROM t1 ORDER BY a}]
|
||||
db close
|
||||
multiplex_save_db
|
||||
} {}
|
||||
|
||||
do_faultsim_test 1 -prep {
|
||||
multiplex_restore_db
|
||||
sqlite3 db file:test.db?8_3_names=1
|
||||
sqlite3_multiplex_control db main chunk_size [expr 256*1024]
|
||||
} -body {
|
||||
execsql "UPDATE t1 SET a=randomblob(12), b=randomblob(1500) WHERE (rowid%32)=0"
|
||||
} -test {
|
||||
faultsim_test_result {0 {}}
|
||||
if {$testrc!=0} {
|
||||
set cksum2 [execsql {SELECT md5sum(a, b) FROM t1 ORDER BY a}]
|
||||
if {$cksum2 != $::cksum1} { error "data mismatch" }
|
||||
}
|
||||
}
|
||||
|
||||
catch { db close }
|
||||
|
||||
sqlite3_multiplex_shutdown
|
||||
finish_test
|
||||
|
Loading…
x
Reference in New Issue
Block a user