MCPcopy Create free account
hub / github.com/baidu/babylon / TEST_F

Function TEST_F

test/test_mlock.cpp:67–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65};
66
67TEST_F(MemoryLockerTest, lock_regions_before_start) {
68 ASSERT_FALSE(region_in_memory());
69 ASSERT_EQ(0, MemoryLocker::instance().start());
70 next_round();
71 BABYLON_LOG(INFO) << "before check region_in_memory";
72 ASSERT_TRUE(region_in_memory());
73 ASSERT_EQ(CEILED_REGION_SIZE, MemoryLocker::instance().locked_bytes());
74 ASSERT_EQ(0, MemoryLocker::instance().last_errno());
75 ASSERT_EQ(0, MemoryLocker::instance().stop());
76}
77
78TEST_F(MemoryLockerTest, lock_regions_after_start) {
79 ::munmap(region, REGION_SIZE);

Callers

nothing calls this directly

Calls 5

locked_bytesMethod · 0.80
last_errnoMethod · 0.80
startMethod · 0.45
stopMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected