Add configurations featuring the -ftrapv switch and large values for SQLITE_MAX_ATTACHED to releasetest.tcl.

FossilOrigin-Name: 989588abf3e88e198b7224604d54f7dc24d2576f
This commit is contained in:
dan 2011-04-06 12:37:09 +00:00
parent fcd71b6010
commit 56089737c1
4 changed files with 128 additions and 8 deletions

View File

@ -1,5 +1,5 @@
C Suppress\smany\sharmless\scompiler\swarnings,\smostly\ssigned/unsigned\scomparisons\s\nwithin\sasserts\sor\sunused\sparameters\sin\sextensions.
D 2011-04-05T22:08:24.148
C Add\sconfigurations\sfeaturing\sthe\s-ftrapv\sswitch\sand\slarge\svalues\sfor\sSQLITE_MAX_ATTACHED\sto\sreleasetest.tcl.
D 2011-04-06T12:37:09.027
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in 7a4d9524721d40ef9ee26f93f9bd6a51dba106f2
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@ -271,6 +271,7 @@ F test/async5.test f3592d79c84d6e83a5f50d3fd500445f7d97dfdf
F test/attach.test 2bb09073d7d5499127db00f50780766dcea913e1
F test/attach2.test a295d2d7061adcee5884ef4a93c7c96a82765437
F test/attach3.test bd9830bc3a0d22ed1310c9bff6896927937017dc
F test/attach4.test d58859e62e0a70f17481eed01bf94995f72fea7f
F test/attachmalloc.test 1d5b821a676f7bf0b00d87cc106b78966789ba57
F test/auth.test b047105c32da7db70b842fd24056723125ecc2ff
F test/auth2.test 270baddc8b9c273682760cffba6739d907bd2882
@ -619,7 +620,7 @@ F test/randexpr1.test 1084050991e9ba22c1c10edd8d84673b501cc25a
F test/rdonly.test c267d050a1d9a6a321de502b737daf28821a518d
F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
F test/releasetest.mk 2eced2f9ae701fd0a29e714a241760503ccba25a
F test/releasetest.tcl 02497b7fb9c53fa65fc8757de7675987cd571068
F test/releasetest.tcl c0c0865f1dff08dde08a964ef49e83217ebedbf8
F test/rollback.test 1a83118ea6db4e7d8c10eaa63871b5e90502ffdc
F test/rowhash.test 0bc1d31415e4575d10cacf31e1a66b5cc0f8be81
F test/rowid.test e58e0acef38b527ed1b0b70d3ada588f804af287
@ -926,7 +927,7 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
P 51039b3578f948c23a810d176e81fa51a278fb28
R 18530986ff3caac2d2c1acc5867b1dce
U drh
Z 767e18c513ceaeb424f39c58cb8c31a7
P 3eeb0ff78d04891b5fd1a3d99a9fb8cfbed77a81
R 6a88c360447f99a69a5292d43478158d
U dan
Z 01815f1e39a9f88f53e178793e399240

View File

@ -1 +1 @@
3eeb0ff78d04891b5fd1a3d99a9fb8cfbed77a81
989588abf3e88e198b7224604d54f7dc24d2576f

112
test/attach4.test Normal file
View File

@ -0,0 +1,112 @@
# 200 July 1
#
# 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 script is attaching many database files to a single
# connection.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix attach4
ifcapable !attach {
finish_test
return
}
puts "Testing with SQLITE_MAX_ATTACHED=$SQLITE_MAX_ATTACHED"
set files {main test.db}
for {set ii 0} {$ii < $SQLITE_MAX_ATTACHED} {incr ii} {
lappend files aux$ii "test.db$ii"
}
do_test 1.1 {
sqlite3_limit db SQLITE_LIMIT_ATTACHED -1
} $SQLITE_MAX_ATTACHED
do_test 1.2.1 {
db close
foreach {name f} $files { forcedelete $f }
sqlite3 db test.db
foreach {name f} $files {
if {$name == "main"} continue
execsql "ATTACH '$f' AS $name"
}
db eval {PRAGMA database_list} {
lappend L $name [file tail $file]
}
set L
} $files
do_catchsql_test 1.2.2 {
ATTACH 'x.db' AS next;
} [list 1 "too many attached databases - max $SQLITE_MAX_ATTACHED"]
do_test 1.3 {
execsql BEGIN;
foreach {name f} $files {
execsql "CREATE TABLE $name.tbl(x)"
execsql "INSERT INTO $name.tbl VALUES('$f')"
}
execsql COMMIT;
} {}
do_test 1.4 {
set L [list]
foreach {name f} $files {
lappend L $name [execsql "SELECT x FROM $name.tbl"]
}
set L
} $files
set L [list]
set S ""
foreach {name f} $files {
lappend L wal
append S "
PRAGMA $name.journal_mode = WAL;
UPDATE $name.tbl SET x = '$name';
"
}
do_execsql_test 1.5 $S $L
do_test 1.6 {
set L [list]
foreach {name f} $files {
lappend L [execsql "SELECT x FROM $name.tbl"] $f
}
set L
} $files
do_test 1.7 {
execsql BEGIN;
foreach {name f} $files {
execsql "UPDATE $name.tbl SET x = '$f'"
}
execsql COMMIT;
} {}
do_test 1.8 {
set L [list]
foreach {name f} $files {
lappend L $name [execsql "SELECT x FROM $name.tbl"]
}
set L
} $files
db close
foreach {name f} $files { forcedelete $f }
finish_test

View File

@ -60,6 +60,11 @@ array set ::Configs {
"Default" {
-O2
}
"Ftrapv" {
-O2 -ftrapv
-DSQLITE_MAX_ATTACHED=55
-DSQLITE_TCL_DEFAULT_FULLMUTEX=1
}
"Unlock-Notify" {
-O2
-DSQLITE_ENABLE_UNLOCK_NOTIFY
@ -144,6 +149,7 @@ array set ::Configs {
}
"Extra-Robustness" {
-DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1
-DSQLITE_MAX_ATTACHED=62
}
}
@ -155,6 +161,7 @@ array set ::Platforms {
"Debug-One" test
"Extra-Robustness" test
"Device-Two" test
"Ftrapv" test
"Default" "threadtest test"
"Device-One" fulltest
}