mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Identify tests that depend on system load and
processor speed. (CVS 192) FossilOrigin-Name: 4b0ba23807a57eaa3649622cff3be66cd75e7561
This commit is contained in:
20
manifest
20
manifest
@ -1,9 +1,9 @@
|
|||||||
C Version\s1.0.24\s(CVS\s479)
|
C Identify\stests\sthat\sdepend\son\ssystem\sload\sand\nprocessor\sspeed.\s(CVS\s192)
|
||||||
D 2001-03-14T13:00:00
|
D 2001-03-15T18:21:22
|
||||||
F COPYRIGHT 74a8a6531a42e124df07ab5599aad63870fa0bd4
|
F COPYRIGHT 74a8a6531a42e124df07ab5599aad63870fa0bd4
|
||||||
F Makefile.in 7efa81e2985b45ba73db27d55b70cc927f5abfd7
|
F Makefile.in 7efa81e2985b45ba73db27d55b70cc927f5abfd7
|
||||||
F README 51f6a4e7408b34afa5bc1c0485f61b6a4efb6958
|
F README 51f6a4e7408b34afa5bc1c0485f61b6a4efb6958
|
||||||
F VERSION 404ea684e576d2b596e185903cea48b3e984c7fd
|
F VERSION 80af39f0d764a13d57b92a38c6d21a7d4e5f7197
|
||||||
F configure 3dc1edb9dcf60215e31ff72b447935ab62211442 x
|
F configure 3dc1edb9dcf60215e31ff72b447935ab62211442 x
|
||||||
F configure.in d892ca33db7e88a055519ce2f36dcb11020e8fff
|
F configure.in d892ca33db7e88a055519ce2f36dcb11020e8fff
|
||||||
F doc/lemon.html e233a3e97a779c7a87e1bc4528c664a58e49dd47
|
F doc/lemon.html e233a3e97a779c7a87e1bc4528c664a58e49dd47
|
||||||
@ -53,17 +53,17 @@ F test/in.test 2c560c0f55fb777029fd9bb5378f2997582aa603
|
|||||||
F test/index.test ee060ef8912be47ba616e50cce7985259a68d58a
|
F test/index.test ee060ef8912be47ba616e50cce7985259a68d58a
|
||||||
F test/insert.test 66f4c3bd600fec8eb1e733b928cbe6fa885eff0c
|
F test/insert.test 66f4c3bd600fec8eb1e733b928cbe6fa885eff0c
|
||||||
F test/insert2.test 732405e30331635af8d159fccabe835eea5cd0c6
|
F test/insert2.test 732405e30331635af8d159fccabe835eea5cd0c6
|
||||||
F test/lock.test bf6d3f8a0a91c6673ff5e357b7a1397e241f7f14
|
F test/lock.test a58af9b98b4351dc80896767781d8e6cab1b3666
|
||||||
F test/main.test 83cfa58b0b9b69924cc915d5c50b12f0ac9e40e7
|
F test/main.test 83cfa58b0b9b69924cc915d5c50b12f0ac9e40e7
|
||||||
F test/select1.test 68ff778c24fc8982e63dda37acb5b0396913adf7
|
F test/select1.test 68ff778c24fc8982e63dda37acb5b0396913adf7
|
||||||
F test/select2.test 0c24b9bb8825ebb96e6cc65f1eb61bace0e02aa0
|
F test/select2.test 04ac3bd69298f58c7d0883159bab42ab9ad6021c
|
||||||
F test/select3.test a9234b8424b6c6d71de534f43b91ade9be68e9cc
|
F test/select3.test a9234b8424b6c6d71de534f43b91ade9be68e9cc
|
||||||
F test/select4.test cb5374d7c87680e294ac749307459a5cc547609d
|
F test/select4.test cb5374d7c87680e294ac749307459a5cc547609d
|
||||||
F test/select5.test e2b9d51d88cbd6c307c2c05b0ef55fe7ba811ac2
|
F test/select5.test e2b9d51d88cbd6c307c2c05b0ef55fe7ba811ac2
|
||||||
F test/sort.test d582086c4bb7df3fbf50aa72e69d7e235e9f8e31
|
F test/sort.test d582086c4bb7df3fbf50aa72e69d7e235e9f8e31
|
||||||
F test/subselect.test bf8b251a92fb091973c1c469ce499dc9648a41d5
|
F test/subselect.test bf8b251a92fb091973c1c469ce499dc9648a41d5
|
||||||
F test/table.test eaa25951c0f18615763cd3dc248ea4bc38739c05
|
F test/table.test eaa25951c0f18615763cd3dc248ea4bc38739c05
|
||||||
F test/tester.tcl e24caef6d07c58c16b24e7afc967464b288a4065
|
F test/tester.tcl 2afa947ed17c4633864fbd6506f20e26e884103c
|
||||||
F test/update.test 72c0c93310483b86dc904a992220c5b84c7ce100
|
F test/update.test 72c0c93310483b86dc904a992220c5b84c7ce100
|
||||||
F test/vacuum.test 2127748ff4ddb409212efbb6d9fb9c469ea1b49c
|
F test/vacuum.test 2127748ff4ddb409212efbb6d9fb9c469ea1b49c
|
||||||
F test/where.test bbab5a308055fb6087dc23d600b4ad2b72797397
|
F test/where.test bbab5a308055fb6087dc23d600b4ad2b72797397
|
||||||
@ -80,7 +80,7 @@ F www/arch.fig 4f246003b7da23bd63b8b0af0618afb4ee3055c8
|
|||||||
F www/arch.png 8dae0766d42ed3de9ed013c1341a5792bcf633e6
|
F www/arch.png 8dae0766d42ed3de9ed013c1341a5792bcf633e6
|
||||||
F www/arch.tcl a40380c1fe0080c43e6cc5c20ed70731511b06be
|
F www/arch.tcl a40380c1fe0080c43e6cc5c20ed70731511b06be
|
||||||
F www/c_interface.tcl 11be2d5826eb7d6efd629751d3b483c1ed78ba14
|
F www/c_interface.tcl 11be2d5826eb7d6efd629751d3b483c1ed78ba14
|
||||||
F www/changes.tcl a8cbb3496ae35184fabc5f7b47242bf33a5637d1
|
F www/changes.tcl 1698d3b1636ec70c77d22aebccc12f43ba4c1c57
|
||||||
F www/crosscompile.tcl c99efacb3aefaa550c6e80d91b240f55eb9fd33e
|
F www/crosscompile.tcl c99efacb3aefaa550c6e80d91b240f55eb9fd33e
|
||||||
F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
|
F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
|
||||||
F www/fileformat.tcl cfb7fba80b7275555281ba2f256c00734bcdd1c9
|
F www/fileformat.tcl cfb7fba80b7275555281ba2f256c00734bcdd1c9
|
||||||
@ -91,7 +91,7 @@ F www/opcode.tcl cb3a1abf8b7b9be9f3a228d097d6bf8b742c2b6f
|
|||||||
F www/sqlite.tcl cb0d23d8f061a80543928755ec7775da6e4f362f
|
F www/sqlite.tcl cb0d23d8f061a80543928755ec7775da6e4f362f
|
||||||
F www/tclsqlite.tcl 06f81c401f79a04f2c5ebfb97e7c176225c0aef2
|
F www/tclsqlite.tcl 06f81c401f79a04f2c5ebfb97e7c176225c0aef2
|
||||||
F www/vdbe.tcl 0c8aaa529dd216ccbf7daaabd80985e413d5f9ad
|
F www/vdbe.tcl 0c8aaa529dd216ccbf7daaabd80985e413d5f9ad
|
||||||
P 8f79ca2acaf765ecb3274c353284c55b6790f657
|
P 34b17e6ce15dd24dc2ca609ef9c136fe4dc1b4b5
|
||||||
R 360be56ced6760c85770c34d6c105ac8
|
R 9278e0d1b4fb4a58660b2bd6644e304b
|
||||||
U drh
|
U drh
|
||||||
Z 7f6063d380c9dc73dddd8b75f41104c4
|
Z 6ff756cd972c647d04eb15cb7f8ae57c
|
||||||
|
@ -1 +1 @@
|
|||||||
34b17e6ce15dd24dc2ca609ef9c136fe4dc1b4b5
|
4b0ba23807a57eaa3649622cff3be66cd75e7561
|
@ -23,14 +23,13 @@
|
|||||||
# This file implements regression tests for SQLite library. The
|
# This file implements regression tests for SQLite library. The
|
||||||
# focus of this script is database locks.
|
# focus of this script is database locks.
|
||||||
#
|
#
|
||||||
# $Id: lock.test,v 1.5 2001/01/04 14:20:18 drh Exp $
|
# $Id: lock.test,v 1.6 2001/03/15 18:21:22 drh Exp $
|
||||||
|
|
||||||
if {$dbprefix=="gdbm:"} {
|
if {$dbprefix=="gdbm:"} {
|
||||||
|
|
||||||
set testdir [file dirname $argv0]
|
set testdir [file dirname $argv0]
|
||||||
source $testdir/tester.tcl
|
source $testdir/tester.tcl
|
||||||
|
|
||||||
|
|
||||||
# Create a largish table
|
# Create a largish table
|
||||||
#
|
#
|
||||||
do_test lock-1.0 {
|
do_test lock-1.0 {
|
||||||
@ -56,14 +55,14 @@ do_test lock-1.1 {
|
|||||||
set v {}
|
set v {}
|
||||||
} {}
|
} {}
|
||||||
|
|
||||||
do_test lock-1.2 {
|
do_probtest lock-1.2 {
|
||||||
# Now try to update the database
|
# Now try to update the database
|
||||||
#
|
#
|
||||||
set v [catch {execsql {UPDATE big SET f2='xyz' WHERE f1=11}} msg]
|
set v [catch {execsql {UPDATE big SET f2='xyz' WHERE f1=11}} msg]
|
||||||
lappend v $msg
|
lappend v $msg
|
||||||
} {5 {table big is locked}}
|
} {5 {table big is locked}}
|
||||||
|
|
||||||
do_test lock-1.3 {
|
do_probtest lock-1.3 {
|
||||||
# Try to update the database in a separate process
|
# Try to update the database in a separate process
|
||||||
#
|
#
|
||||||
set f [open update.sql w]
|
set f [open update.sql w]
|
||||||
@ -74,7 +73,7 @@ do_test lock-1.3 {
|
|||||||
exec ./sqlite testdb <update.sql
|
exec ./sqlite testdb <update.sql
|
||||||
} "UPDATE big SET f2='xyz' WHERE f1=11;\nSQL error: table big is locked\n22"
|
} "UPDATE big SET f2='xyz' WHERE f1=11;\nSQL error: table big is locked\n22"
|
||||||
|
|
||||||
do_test lock-1.4 {
|
do_probtest lock-1.4 {
|
||||||
# Try to update the database using a timeout
|
# Try to update the database using a timeout
|
||||||
#
|
#
|
||||||
set f [open update.sql w]
|
set f [open update.sql w]
|
||||||
@ -85,7 +84,7 @@ do_test lock-1.4 {
|
|||||||
exec ./sqlite testdb <update.sql
|
exec ./sqlite testdb <update.sql
|
||||||
} "UPDATE big SET f2='xyz' WHERE f1=11;\nSQL error: table big is locked\n22"
|
} "UPDATE big SET f2='xyz' WHERE f1=11;\nSQL error: table big is locked\n22"
|
||||||
|
|
||||||
do_test lock-1.5 {
|
do_probtest lock-1.5 {
|
||||||
# Try to update the database using a timeout
|
# Try to update the database using a timeout
|
||||||
#
|
#
|
||||||
set f [open update.sql w]
|
set f [open update.sql w]
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
# This file implements regression tests for SQLite library. The
|
# This file implements regression tests for SQLite library. The
|
||||||
# focus of this file is testing the SELECT statement.
|
# focus of this file is testing the SELECT statement.
|
||||||
#
|
#
|
||||||
# $Id: select2.test,v 1.9 2000/10/19 14:10:09 drh Exp $
|
# $Id: select2.test,v 1.10 2001/03/15 18:21:22 drh Exp $
|
||||||
|
|
||||||
set testdir [file dirname $argv0]
|
set testdir [file dirname $argv0]
|
||||||
source $testdir/tester.tcl
|
source $testdir/tester.tcl
|
||||||
@ -109,8 +109,11 @@ do_test select2-3.2d {
|
|||||||
do_test select2-3.2e {
|
do_test select2-3.2e {
|
||||||
execsql {SELECT fcnt() FROM tbl2 WHERE f2=1000}
|
execsql {SELECT fcnt() FROM tbl2 WHERE f2=1000}
|
||||||
} {2}
|
} {2}
|
||||||
|
|
||||||
|
# omit the time-dependent tests
|
||||||
|
#
|
||||||
testif gdbm:
|
testif gdbm:
|
||||||
do_test select2-3.2f {
|
do_probtest select2-3.2f {
|
||||||
set t1 [lindex [time {execsql {SELECT f1 FROM tbl2 WHERE 1000=f2}} 1] 0]
|
set t1 [lindex [time {execsql {SELECT f1 FROM tbl2 WHERE 1000=f2}} 1] 0]
|
||||||
set t2 [lindex [time {execsql {SELECT f1 FROM tbl2 WHERE f2=1000}} 1] 0]
|
set t2 [lindex [time {execsql {SELECT f1 FROM tbl2 WHERE f2=1000}} 1] 0]
|
||||||
expr {$t1*0.7<$t2 && $t2*0.7<$t1}
|
expr {$t1*0.7<$t2 && $t2*0.7<$t1}
|
||||||
@ -118,13 +121,13 @@ do_test select2-3.2f {
|
|||||||
|
|
||||||
# Make sure queries run faster with an index than without
|
# Make sure queries run faster with an index than without
|
||||||
#
|
#
|
||||||
do_test select2-3.3 {
|
do_probtest select2-3.3 {
|
||||||
set t1 [lindex [time {execsql {SELECT f1 from tbl2 WHERE f2==2000}} 1] 0]
|
set t1 [lindex [time {execsql {SELECT f1 from tbl2 WHERE f2==2000}} 1] 0]
|
||||||
execsql {DROP INDEX idx1}
|
execsql {DROP INDEX idx1}
|
||||||
set t2 [lindex [time {execsql {SELECT f1 FROM tbl2 WHERE f2==2000}} 1] 0]
|
set t2 [lindex [time {execsql {SELECT f1 FROM tbl2 WHERE f2==2000}} 1] 0]
|
||||||
expr {$t1*10 < $t2}
|
expr {$t1*10 < $t2}
|
||||||
} {1}
|
} {1}
|
||||||
do_test select2-3.4 {
|
do_probtest select2-3.4 {
|
||||||
expr {[execsql {SELECT fcnt() FROM tbl2 WHERE f2==2000}]>10}
|
expr {[execsql {SELECT fcnt() FROM tbl2 WHERE f2==2000}]>10}
|
||||||
} {1}
|
} {1}
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
# This file implements some common TCL routines used for regression
|
# This file implements some common TCL routines used for regression
|
||||||
# testing the SQLite library
|
# testing the SQLite library
|
||||||
#
|
#
|
||||||
# $Id: tester.tcl,v 1.10 2001/01/31 13:28:09 drh Exp $
|
# $Id: tester.tcl,v 1.11 2001/03/15 18:21:22 drh Exp $
|
||||||
|
|
||||||
# Create a test database
|
# Create a test database
|
||||||
#
|
#
|
||||||
@ -55,6 +55,7 @@ if {[info exists nTest]} return
|
|||||||
#
|
#
|
||||||
set nErr 0
|
set nErr 0
|
||||||
set nTest 0
|
set nTest 0
|
||||||
|
set nProb 0
|
||||||
set skip_test 0
|
set skip_test 0
|
||||||
|
|
||||||
# Invoke the do_test procedure to run a single test
|
# Invoke the do_test procedure to run a single test
|
||||||
@ -91,6 +92,44 @@ proc do_test {name cmd expected} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Invoke this procedure on a test that is probabilistic
|
||||||
|
# and might fail sometimes.
|
||||||
|
#
|
||||||
|
proc do_probtest {name cmd expected} {
|
||||||
|
global argv nProb nTest skip_test
|
||||||
|
if {$skip_test} {
|
||||||
|
set skip_test 0
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if {[llength $argv]==0} {
|
||||||
|
set go 1
|
||||||
|
} else {
|
||||||
|
set go 0
|
||||||
|
foreach pattern $argv {
|
||||||
|
if {[string match $pattern $name]} {
|
||||||
|
set go 1
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if {!$go} return
|
||||||
|
incr nTest
|
||||||
|
puts -nonewline $::dbprefix$name...
|
||||||
|
flush stdout
|
||||||
|
if {[catch {uplevel #0 "$cmd;\n"} result]} {
|
||||||
|
puts "\nError: $result"
|
||||||
|
incr nErr
|
||||||
|
} elseif {[string compare $result $expected]} {
|
||||||
|
puts "\nExpected: \[$expected\]\n Got: \[$result\]"
|
||||||
|
puts "NOTE: The results of the previous test depend on system load"
|
||||||
|
puts "and processor speed. The test may sometimes fail even if the"
|
||||||
|
puts "library is working correctly."
|
||||||
|
incr nProb
|
||||||
|
} else {
|
||||||
|
puts " Ok"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Skip a test based on the dbprefix
|
# Skip a test based on the dbprefix
|
||||||
#
|
#
|
||||||
proc skipif {args} {
|
proc skipif {args} {
|
||||||
@ -131,11 +170,15 @@ proc memleak_check {} {
|
|||||||
# Run this routine last
|
# Run this routine last
|
||||||
#
|
#
|
||||||
proc finish_test {} {
|
proc finish_test {} {
|
||||||
global nTest nErr
|
global nTest nErr nProb
|
||||||
memleak_check
|
memleak_check
|
||||||
catch {db close}
|
catch {db close}
|
||||||
puts "$nErr errors out of $nTest tests"
|
puts "$nErr errors out of $nTest tests"
|
||||||
exit $nErr
|
if {$nProb>0} {
|
||||||
|
puts "$nProb probabilistic tests also failed, but this does"
|
||||||
|
puts "not necessarily indicate a malfunction."
|
||||||
|
}
|
||||||
|
exit [expr {$nErr>0}]
|
||||||
}
|
}
|
||||||
|
|
||||||
# A procedure to execute SQL
|
# A procedure to execute SQL
|
||||||
|
@ -17,8 +17,17 @@ proc chng {date desc} {
|
|||||||
puts "<DD><P><UL>$desc</UL></P></DD>"
|
puts "<DD><P><UL>$desc</UL></P></DD>"
|
||||||
}
|
}
|
||||||
|
|
||||||
chng {2001 Mar 14 19 (1.0.24)} {
|
chng {2001 Mar 15 (1.0.25)} {
|
||||||
<li>Fix a bug which was causing
|
<li>Modify the test scripts to identify tests that depend on system
|
||||||
|
load and processor speed and
|
||||||
|
to warn the user that a failure of one of those (rare) tests does
|
||||||
|
not necessarily mean the library is malfunctioning. No changes to
|
||||||
|
code.
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
chng {2001 Mar 14 (1.0.24)} {
|
||||||
|
<li>Fix a bug which was causing
|
||||||
the UPDATE command to fail on systems where "malloc(0)" returns
|
the UPDATE command to fail on systems where "malloc(0)" returns
|
||||||
NULL. The problem does not appear Windows, Linux, or HPUX but does
|
NULL. The problem does not appear Windows, Linux, or HPUX but does
|
||||||
cause the library to fail on QNX.
|
cause the library to fail on QNX.
|
||||||
@ -258,7 +267,7 @@ chng {2000 June 6} {
|
|||||||
<li>Added support for using <b>(SELECT ...)</b> within expressions</li>
|
<li>Added support for using <b>(SELECT ...)</b> within expressions</li>
|
||||||
<li>Added support for <b>IN</b> and <b>BETWEEN</b> operators</li>
|
<li>Added support for <b>IN</b> and <b>BETWEEN</b> operators</li>
|
||||||
<li>Added support for <b>GROUP BY</b> and <b>HAVING</b></li>
|
<li>Added support for <b>GROUP BY</b> and <b>HAVING</b></li>
|
||||||
<li>NULL values are now reported ot the callback as a NULL pointer
|
<li>NULL values are now reported to the callback as a NULL pointer
|
||||||
rather than an empty string.</li>
|
rather than an empty string.</li>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user