summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-01-09 14:52:05 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-01-09 14:52:05 +0000
commit3159ba64813d11433e17c4ebbb91f1ecf14ed9a1 (patch)
tree44fa9c8ff0ad5a6244850f974d6d2c00eff91505
parentAdd mutex in vlogf function calling BOOST_TEST_MESSAGE (diff)
downloadnetfs-3159ba64813d11433e17c4ebbb91f1ecf14ed9a1.tar.bz2
netfs-3159ba64813d11433e17c4ebbb91f1ecf14ed9a1.tar.xz
netfs-3159ba64813d11433e17c4ebbb91f1ecf14ed9a1.zip
Add another mutex in vlogf function calling BOOST_TEST_MESSAGE
-rw-r--r--netfs/unittests/mockFuse.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/netfs/unittests/mockFuse.cpp b/netfs/unittests/mockFuse.cpp
index 554a62d..b283d7b 100644
--- a/netfs/unittests/mockFuse.cpp
+++ b/netfs/unittests/mockFuse.cpp
@@ -37,7 +37,10 @@ FuseMock::connectToService()
void
FuseMock::vlogf(int, const char * fmt, va_list args) const noexcept
{
- BOOST_TEST_MESSAGE(vstringf(fmt, args));
+ static std::mutex btm;
+ ScopeLock(btm) {
+ BOOST_TEST_MESSAGE(vstringf(fmt, args));
+ }
}
FuseMockHost::FuseMockHost(std::string ep, const Ice::StringSeq & a) :