EXCLUSIVE_LOCKS_REQUIRED(...)
(Clang Thread Safety Analysis, see #11226), AssertLockHeld(...)
and implicit lock assumptions).
EXCLUSIVE_LOCKS_REQUIRED(...)
(Clang Thread Safety Analysis, see #11226), AssertLockHeld(...)
and implicit lock assumptions).
65@@ -66,11 +66,14 @@ BOOST_AUTO_TEST_CASE(outbound_slow_chain_eviction)
66 dummyNode1.fSuccessfullyConnected = true;
@laanwj Do you know which tests in this PR that do not have any multi-threading? What is the best way to identify the tests for which multi-threading happens?
(Personally I like explicit locking better since that communicates where/why the lock is needed which is helpful for locking newcomers. I’ll happily adjust to consensus however :-))
80@@ -81,7 +81,7 @@ CBlockIndex CreateBlockIndex(int nHeight)
81
82 bool TestSequenceLocks(const CTransaction &tx, int flags)
83 {
84- LOCK(mempool.cs);
85+ LOCK2(cs_main, mempool.cs);
Add missing locks to tests to satisfy lock requirements (such as
EXCLUSIVE_LOCKS_REQUIRED(...) (Clang Thread Safety Analysis),
AssertLockHeld(...) and implicit lock assumptions).
practicalswift
promag
laanwj
MarcoFalke
Labels
Tests