mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Do not report an error if the open-file-count is not as it should be after running a multi-threaded test. The counter instrumentation is not thread-safe.
FossilOrigin-Name: ea80b21c881fabaec1da788588c35c6c9782dcbd
This commit is contained in:
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
|||||||
C Call\sTcl_ExitThread()\sfrom\swithin\sthreads\screated\susing\sTcl_CreateThread().\sNot\sdoing\sso\scauses\snotifier\srelated\serrors\son\sOSX.
|
C Do\snot\sreport\san\serror\sif\sthe\sopen-file-count\sis\snot\sas\sit\sshould\sbe\safter\srunning\sa\smulti-threaded\stest.\sThe\scounter\sinstrumentation\sis\snot\sthread-safe.
|
||||||
D 2010-07-05T12:54:08
|
D 2010-07-05T14:54:49
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
|
F Makefile.in a5cad1f8f3e021356bfcc6c77dc16f6f1952bbc3
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@ -615,7 +615,7 @@ F test/tclsqlite.test 8c154101e704170c2be10f137a5499ac2c6da8d3
|
|||||||
F test/tempdb.test 800c36623d67a2ad1f58784b9c5644e0405af6e6
|
F test/tempdb.test 800c36623d67a2ad1f58784b9c5644e0405af6e6
|
||||||
F test/temptable.test f42121a0d29a62f00f93274464164177ab1cc24a
|
F test/temptable.test f42121a0d29a62f00f93274464164177ab1cc24a
|
||||||
F test/temptrigger.test b0273db072ce5f37cf19140ceb1f0d524bbe9f05
|
F test/temptrigger.test b0273db072ce5f37cf19140ceb1f0d524bbe9f05
|
||||||
F test/tester.tcl 384eceb0736b84e178766b0876bcf4753eb4cb22
|
F test/tester.tcl b316a5381e34bac3147fb7562b23a5598cdb2758
|
||||||
F test/thread001.test a3e6a7254d1cb057836cb3145b60c10bf5b7e60f
|
F test/thread001.test a3e6a7254d1cb057836cb3145b60c10bf5b7e60f
|
||||||
F test/thread002.test afd20095e6e845b405df4f2c920cb93301ca69db
|
F test/thread002.test afd20095e6e845b405df4f2c920cb93301ca69db
|
||||||
F test/thread003.test b824d4f52b870ae39fc5bae4d8070eca73085dca
|
F test/thread003.test b824d4f52b870ae39fc5bae4d8070eca73085dca
|
||||||
@ -830,7 +830,7 @@ F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
|||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||||
P a40a6e7df191ca10bc3aa504d374b9f5bfa33cbc
|
P 684eae6623ef1d0336b7a734b17ed307c720b6f4
|
||||||
R a97be07f4de569b32cbbfb8477867ef2
|
R 63f603eae54aff0b7014e11adb19abba
|
||||||
U dan
|
U dan
|
||||||
Z 372b7ef74e3ef16e1a500de7d9db277c
|
Z c2e1163608ea0fe576a6717534083382
|
||||||
|
@ -1 +1 @@
|
|||||||
684eae6623ef1d0336b7a734b17ed307c720b6f4
|
ea80b21c881fabaec1da788588c35c6c9782dcbd
|
@ -295,18 +295,17 @@ proc do_test {name cmd expected} {
|
|||||||
|
|
||||||
sqlite3_memdebug_settitle $name
|
sqlite3_memdebug_settitle $name
|
||||||
|
|
||||||
if {[llength $argv]==0} {
|
# if {[llength $argv]==0} {
|
||||||
set go 1
|
# set go 1
|
||||||
} else {
|
# } else {
|
||||||
set go 0
|
# set go 0
|
||||||
foreach pattern $argv {
|
# foreach pattern $argv {
|
||||||
if {[string match $pattern $name]} {
|
# if {[string match $pattern $name]} {
|
||||||
set go 1
|
# set go 1
|
||||||
break
|
# break
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
}
|
# }
|
||||||
if {!$go} return
|
|
||||||
|
|
||||||
if {[info exists ::G(perm:prefix)]} {
|
if {[info exists ::G(perm:prefix)]} {
|
||||||
set name "$::G(perm:prefix)$name"
|
set name "$::G(perm:prefix)$name"
|
||||||
@ -1170,20 +1169,25 @@ proc slave_test_script {script} {
|
|||||||
proc slave_test_file {zFile} {
|
proc slave_test_file {zFile} {
|
||||||
set tail [file tail $zFile]
|
set tail [file tail $zFile]
|
||||||
|
|
||||||
ifcapable shared_cache {
|
# Remember the value of the shared-cache setting. So that it is possible
|
||||||
set scs [sqlite3_enable_shared_cache]
|
# to check afterwards that it was not modified by the test script.
|
||||||
}
|
#
|
||||||
|
ifcapable shared_cache { set scs [sqlite3_enable_shared_cache] }
|
||||||
|
|
||||||
|
# Run the test script in a slave interpreter.
|
||||||
|
#
|
||||||
reset_prng_state
|
reset_prng_state
|
||||||
set ::sqlite_open_file_count 0
|
set ::sqlite_open_file_count 0
|
||||||
set time [time { slave_test_script [list source $zFile] }]
|
set time [time { slave_test_script [list source $zFile] }]
|
||||||
set ms [expr [lindex $time 0] / 1000]
|
set ms [expr [lindex $time 0] / 1000]
|
||||||
|
|
||||||
# Test that all files opened by the test script were closed.
|
# Test that all files opened by the test script were closed. Omit this
|
||||||
|
# if the test script has "thread" in its name. The open file counter
|
||||||
|
# is not thread-safe.
|
||||||
#
|
#
|
||||||
do_test ${tail}-closeallfiles {
|
if {[string match *thread* $tail]==0} {
|
||||||
expr {$::sqlite_open_file_count>0}
|
do_test ${tail}-closeallfiles { expr {$::sqlite_open_file_count>0} } {0}
|
||||||
} {0}
|
}
|
||||||
set ::sqlite_open_file_count 0
|
set ::sqlite_open_file_count 0
|
||||||
|
|
||||||
# Test that the global "shared-cache" setting was not altered by
|
# Test that the global "shared-cache" setting was not altered by
|
||||||
@ -1194,13 +1198,9 @@ proc slave_test_file {zFile} {
|
|||||||
do_test ${tail}-sharedcachesetting [list set {} $res] 1
|
do_test ${tail}-sharedcachesetting [list set {} $res] 1
|
||||||
}
|
}
|
||||||
|
|
||||||
if {$::sqlite_open_file_count>0} {
|
# Add some info to the output.
|
||||||
puts "$tail did not close all files: $::sqlite_open_file_count"
|
#
|
||||||
fail_test "$tail-closeallfiles"
|
|
||||||
set ::sqlite_open_file_count 0
|
|
||||||
}
|
|
||||||
puts "Time: $tail $ms ms"
|
puts "Time: $tail $ms ms"
|
||||||
|
|
||||||
show_memstats
|
show_memstats
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user