From: danielk1977 Date: Wed, 18 Jun 2008 17:59:03 +0000 (+0000) Subject: Fix a test case in mutex1.test that was failing when sqlite was compiled with SQLITE_... X-Git-Tag: version-3.6.10~942 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01bf29966d616fe6e93837bbca529c082fdb3415;p=thirdparty%2Fsqlite.git Fix a test case in mutex1.test that was failing when sqlite was compiled with SQLITE_THREADSAFE=0. (CVS 5235) FossilOrigin-Name: d1a87c3bcc9a32918f1cf743f85cd1a71557220e --- diff --git a/manifest b/manifest index 1137269b49..b831f07e8e 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Implement\sthe\s'CONFIG_SINGLETHREAD'\sand\s'CONFIG_MULTITHREAD'\sconfiguration\smodes.\s(CVS\s5234) -D 2008-06-18T17:09:10 +C Fix\sa\stest\scase\sin\smutex1.test\sthat\swas\sfailing\swhen\ssqlite\swas\scompiled\swith\sSQLITE_THREADSAFE=0.\s(CVS\s5235) +D 2008-06-18T17:59:04 F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7 F Makefile.in dc5608df93faf4406cfd7a1c8ed9ab93d8bfbfd5 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -416,7 +416,7 @@ F test/misc5.test 0b68dcb630d44af2dbcdca94dd2b17c8d580f6fa F test/misc6.test 953cc693924d88e6117aeba16f46f0bf5abede91 F test/misc7.test 26e0d948a413bca61ed031159907a03d64647409 F test/misuse.test 30b3a458e5a70c31e74c291937b6c82204c59f33 -F test/mutex1.test c8de096af7ae7ccee2b8f472fecb224b214e24d0 +F test/mutex1.test 9f493fa8663dc3e627e7e20a523873b1a20f0583 F test/mutex2.test 6c8f4a5425a27088bc2ad107c71b7abbc2d8534d F test/nan.test 14c41572ff52dbc740b1c3303dd313a90dc6084c F test/notnull.test 44d600f916b770def8b095a9962dbe3be5a70d82 @@ -597,7 +597,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -P 70c6739f4e84b3433e14960346b54d0e9e0bb9c6 -R bcb69678a02b2561df6a33f19115dfbd +P 5059644c4bc5f6679afd939e0bc26080f42a9918 +R e1b007e18a61486333f37eed7d20669e U danielk1977 -Z b2748b102e9ea5fd93fb45dc8d5bd3c0 +Z 3a46c90858d1f487bb77585ca61e818d diff --git a/manifest.uuid b/manifest.uuid index 62e9815874..c155534bae 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -5059644c4bc5f6679afd939e0bc26080f42a9918 \ No newline at end of file +d1a87c3bcc9a32918f1cf743f85cd1a71557220e \ No newline at end of file diff --git a/test/mutex1.test b/test/mutex1.test index b1c8dd1f3d..c8662507f6 100644 --- a/test/mutex1.test +++ b/test/mutex1.test @@ -9,7 +9,7 @@ # #*********************************************************************** # -# $Id: mutex1.test,v 1.2 2008/06/18 17:09:10 danielk1977 Exp $ +# $Id: mutex1.test,v 1.3 2008/06/18 17:59:04 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -84,44 +84,47 @@ do_test mutex1-1.9 { # * Single-threaded mode. # -foreach {mode mutexes} { - singlethread {} - multithread {fast static_master static_mem static_prng} - serialized {fast recursive static_master static_mem static_prng} -} { - do_test mutex1.2.$mode.1 { - catch {db close} - sqlite3_shutdown - sqlite3_config $mode - } SQLITE_OK - - do_test mutex1.2.$mode.2 { - clear_mutex_counters - sqlite3 db test.db - catchsql { CREATE TABLE abc(a, b, c) } - db eval { - INSERT INTO abc VALUES(1, 2, 3); - } - } {} - - do_test mutex1.2.$mode.3 { - mutex_counters counters - - set res [list] - foreach {key value} [array get counters] { - if {$key ne "total" && $value > 0} { - lappend res $key +ifcapable threadsafe { + foreach {mode mutexes} { + singlethread {} + multithread {fast static_master static_mem static_prng} + serialized {fast recursive static_master static_mem static_prng} + } { + do_test mutex1.2.$mode.1 { + catch {db close} + sqlite3_shutdown + sqlite3_config $mode + } SQLITE_OK + + do_test mutex1.2.$mode.2 { + clear_mutex_counters + sqlite3 db test.db + catchsql { CREATE TABLE abc(a, b, c) } + db eval { + INSERT INTO abc VALUES(1, 2, 3); } - } - lsort $res - } $mutexes + } {} + + do_test mutex1.2.$mode.3 { + mutex_counters counters + + set res [list] + foreach {key value} [array get counters] { + if {$key ne "total" && $value > 0} { + lappend res $key + } + } + lsort $res + } $mutexes + } } do_test mutex1-X { - db close + catch {db close} sqlite3_shutdown clear_mutex_counters install_mutex_counters 0 + sqlite3_initialize } {SQLITE_OK} finish_test