Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/sqlite/src/test/mutex1.test

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/test/multiplex4.test ('k') | third_party/sqlite/src/test/notify2.test » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/test/mutex1.test
diff --git a/third_party/sqlite/src/test/mutex1.test b/third_party/sqlite/src/test/mutex1.test
index 4bdf769ad302c7c777de58d7b03a5f7c21061c2d..340e2711753732636c8358c06708d5bc2230d960 100644
--- a/third_party/sqlite/src/test/mutex1.test
+++ b/third_party/sqlite/src/test/mutex1.test
@@ -37,9 +37,9 @@ proc mutex_counters {varname} {
#-------------------------------------------------------------------------
# Tests mutex1-1.* test that sqlite3_config() returns SQLITE_MISUSE if
-# is called at the wrong time. And that the first time sqlite3_initialize
+# is called at the wrong time. And that the first time sqlite3_initialize
# is called it obtains the 'static_master' mutex 3 times and a recursive
-# mutex (sqlite3Config.pInitMutex) twice. Subsequent calls are no-ops
+# mutex (sqlite3Config.pInitMutex) twice. Subsequent calls are no-ops
# that do not require any mutexes.
#
do_test mutex1-1.0 {
@@ -102,12 +102,16 @@ ifcapable threadsafe&&shared_cache {
foreach {mode mutexes} {
singlethread {}
multithread {
- fast static_lru static_master static_mem static_open static_prng
- static_pmem
+ fast static_app1 static_app2 static_app3
+ static_lru static_master static_mem static_open
+ static_prng static_pmem static_vfs1 static_vfs2
+ static_vfs3
}
serialized {
- fast recursive static_lru static_master static_mem static_open
- static_prng static_pmem
+ fast recursive static_app1 static_app2
+ static_app3 static_lru static_master static_mem
+ static_open static_prng static_pmem static_vfs1
+ static_vfs2 static_vfs3
}
} {
@@ -129,9 +133,28 @@ ifcapable threadsafe&&shared_cache {
ifcapable !memorymanage {
regsub { static_lru} $mutexes {} mutexes
}
- do_test mutex1.2.$mode.3 {
+ if {$mode ne "singlethread"} {
+ do_test mutex1.2.$mode.3 {
+ #
+ # NOTE: Make sure all the app and vfs mutexes get used.
+ #
+ enter_static_mutex static_app1
+ leave_static_mutex static_app1
+ enter_static_mutex static_app2
+ leave_static_mutex static_app2
+ enter_static_mutex static_app3
+ leave_static_mutex static_app3
+ enter_static_mutex static_vfs1
+ leave_static_mutex static_vfs1
+ enter_static_mutex static_vfs2
+ leave_static_mutex static_vfs2
+ enter_static_mutex static_vfs3
+ leave_static_mutex static_vfs3
+ } {}
+ }
+ do_test mutex1.2.$mode.4 {
mutex_counters counters
-
+
set res [list]
foreach {key value} [array get counters] {
if {$key ne "total" && $value > 0} {
« no previous file with comments | « third_party/sqlite/src/test/multiplex4.test ('k') | third_party/sqlite/src/test/notify2.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698