MB-19113: Suppress test_mb16357 when on thread sanitizer 22/62922/10
authorabhinavdangeti <abhinav@couchbase.com>
Fri, 15 Apr 2016 18:59:14 +0000 (11:59 -0700)
committerChiyoung Seo <chiyoung@couchbase.com>
Sat, 23 Apr 2016 01:14:52 +0000 (01:14 +0000)
This is to suppress a false positive thrown by thread
sanitizer regarding a lock inversion that would never
occur in operation.
    The lock inversion pointed out is between the front
end work load thread, that grabs the hash table partition
lock and then the vbucket snapshot lock, while the dcp
consumer processer task grabs the snapshot lock and then
the hash table partition lock. Note that the first thread
always works on an active vbucket, while the second thread
always works on a replica vbucket, and the vbucket cannot
be in active and replica state(s) at the same time.

Change-Id: I5e42e14a2333b0720d8c43c9e2a4d7190696f5e9
Reviewed-on: http://review.couchbase.org/62922
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: buildbot <build@couchbase.com>
Well-Formed: buildbot <build@couchbase.com>

tests/ep_testsuite.cc

index d4c4548..040071e 100644 (file)
 #undef htonl
 #endif
 
+#undef THREAD_SANITIZER
+#if __clang__
+#   if defined(__has_feature) && __has_feature(thread_sanitizer)
+#define THREAD_SANITIZER
+#   endif
+#endif
+
 // ptr_fun don't like the extern "C" thing for unlock cookie.. cast it
 // away ;)
 typedef void (*UNLOCK_COOKIE_T)(const void *cookie);
@@ -12782,9 +12789,11 @@ engine_test_t* get_tests(void) {
                  test_setup, teardown, NULL, prepare, cleanup),
         TestCase("test get all vb seqnos", test_get_all_vb_seqnos, test_setup,
                  teardown, NULL, prepare, cleanup),
+#if !defined(THREAD_SANITIZER)
         TestCase("test MB-16357", test_mb16357,
                  test_setup, teardown, "compaction_exp_mem_threshold=85",
                  prepare, cleanup),
+#endif
         TestCase("test MB-19153", test_mb19153,
                  test_setup, teardown, NULL, prepare, cleanup),