diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-02-09 18:22:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-09 18:22:31 +0100 |
commit | 6c6587b5be7ea8ca01bfbfba42b290fb4873ba45 (patch) | |
tree | 67a5dde7b07283d02025add86c64a2a4a6fada67 /staging_vespalib/src/tests/shutdownguard/shutdownguard_test.cpp | |
parent | 5603653ace6fce5bba2bf515685dc1de97a42088 (diff) | |
parent | 5f96af6e4995a7a38445f3d24482baaedeec0668 (diff) |
Merge pull request #21120 from vespa-engine/revert-21119-revert-21118-balder/wire-in-mallopt-control-of-vespamalloc-skeletonv7.541.24
Revert "Revert "Wire in mallopt(in param, int value) interface in vespamalloc and ver…""
Diffstat (limited to 'staging_vespalib/src/tests/shutdownguard/shutdownguard_test.cpp')
-rw-r--r-- | staging_vespalib/src/tests/shutdownguard/shutdownguard_test.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/staging_vespalib/src/tests/shutdownguard/shutdownguard_test.cpp b/staging_vespalib/src/tests/shutdownguard/shutdownguard_test.cpp index 79777cdd53f..348e9bbd503 100644 --- a/staging_vespalib/src/tests/shutdownguard/shutdownguard_test.cpp +++ b/staging_vespalib/src/tests/shutdownguard/shutdownguard_test.cpp @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/vespalib/testkit/testapp.h> #include <vespa/vespalib/util/shutdownguard.h> +#include <vespa/vespalib/util/malloc_mmap_guard.h> #include <thread> #include <unistd.h> #include <sys/wait.h> @@ -8,12 +9,8 @@ using namespace vespalib; -TEST_SETUP(Test); - -int -Test::Main() +TEST("test shutdown guard") { - TEST_INIT("shutdownguard_test"); { ShutdownGuard farFuture(1000000s); std::this_thread::sleep_for(20ms); @@ -37,5 +34,10 @@ Test::Main() } EXPECT_TRUE(i < 800); } - TEST_DONE(); } + +TEST("test malloc mmap guard") { + MallocMmapGuard guard(0x100000); +} + +TEST_MAIN() { TEST_RUN_ALL(); } |