aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-09-04 13:30:13 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-09-04 13:30:13 -0500
commitca4e477dc229043f3af5ac2c6039aab041921db1 (patch)
treef6ff951190904cbd314fedc261d422246eeabf0c
parentMerge pull request #4295 (diff)
parentunit_tests: disable mlocker tests on windows (no implementation) (diff)
downloadmonero-ca4e477dc229043f3af5ac2c6039aab041921db1.tar.xz
Merge pull request #4298
67666b1 unit_tests: disable mlocker tests on windows (no implementation) (moneromooo-monero)
-rw-r--r--tests/unit_tests/mlocker.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit_tests/mlocker.cpp b/tests/unit_tests/mlocker.cpp
index 6e6048c6c..480940374 100644
--- a/tests/unit_tests/mlocker.cpp
+++ b/tests/unit_tests/mlocker.cpp
@@ -31,6 +31,12 @@
#include "misc_log_ex.h"
#include "mlocker.h"
+#if defined __GNUC__ && !defined _WIN32
+#define HAVE_MLOCK 1
+#endif
+
+#ifdef HAVE_MLOCK
+
#define BASE(data) (char*)(((uintptr_t)(data.get() + page_size - 1)) / page_size * page_size)
TEST(mlocker, distinct_1)
@@ -184,3 +190,5 @@ TEST(mlocker, mlocked)
ASSERT_EQ(epee::mlocker::get_num_locked_pages(), base_pages + 0);
ASSERT_EQ(epee::mlocker::get_num_locked_objects(), base_objects + 0);
}
+
+#endif