aboutsummaryrefslogtreecommitdiff
path: root/src/util.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-02-13 13:53:17 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-02-15 16:25:13 +0100
commit1d4cbd26e4220982f7f2f60e447199d6f62ae254 (patch)
tree4c8f244dacd9238dd810b5821175bb72b1d49808 /src/util.h
parentfc888bfcacb875c45bc8f9d7ca1357ab70a30490 (diff)
test: Add unit test for LockDirectory
Add a unit test for LockDirectory, introduced in #11281.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 05138a9bfe..9490a5678f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -174,6 +174,12 @@ int RaiseFileDescriptorLimit(int nMinFD);
void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length);
bool RenameOver(fs::path src, fs::path dest);
bool LockDirectory(const fs::path& directory, const std::string lockfile_name, bool probe_only=false);
+
+/** Release all directory locks. This is used for unit testing only, at runtime
+ * the global destructor will take care of the locks.
+ */
+void ReleaseDirectoryLocks();
+
bool TryCreateDirectories(const fs::path& p);
fs::path GetDefaultDataDir();
const fs::path &GetDataDir(bool fNetSpecific = true);