diff options
Diffstat (limited to 'src/tests/main.cpp')
-rw-r--r-- | src/tests/main.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tests/main.cpp b/src/tests/main.cpp index b6f7c4188..d6815bd31 100644 --- a/src/tests/main.cpp +++ b/src/tests/main.cpp @@ -74,6 +74,17 @@ int main(int argc, char* argv[]) return 0; } +#if defined(BOTAN_TARGET_OS_HAS_POSIX1) && defined(BOTAN_HAS_THREAD_UTILS) + /* + The mlock pool becomes a major contention point when many threads are running, + so disable it unless it was explicitly asked for via setting the env variable + */ + if(parser.get_arg_sz("test-threads") != 1) + { + ::setenv("BOTAN_MLOCK_POOL_SIZE", "0", /*overwrite=*/0); + } +#endif + const Botan_Tests::Test_Options opts( parser.get_arg_list("suites"), parser.get_arg_list("skip-tests"), |