Add the ability to pin shared memory for reads
This can increase performance for some specific use cases with large
messages.
Change-Id: I38deaf3ce85a70c0ac11510757d193fd39ad29bb
diff --git a/aos/events/shm_event_loop_test.cc b/aos/events/shm_event_loop_test.cc
index f0680a9..cbb28f9 100644
--- a/aos/events/shm_event_loop_test.cc
+++ b/aos/events/shm_event_loop_test.cc
@@ -69,15 +69,25 @@
::aos::ShmEventLoop *primary_event_loop_;
};
-INSTANTIATE_TEST_CASE_P(ShmEventLoopTest, AbstractEventLoopTest,
- ::testing::Values([]() {
- return new ShmEventLoopTestFactory();
- }));
+INSTANTIATE_TEST_CASE_P(ShmEventLoopCopyTest, AbstractEventLoopTest,
+ ::testing::Values(std::make_pair(
+ []() { return new ShmEventLoopTestFactory(); },
+ ReadMethod::COPY)));
-INSTANTIATE_TEST_CASE_P(ShmEventLoopDeathTest, AbstractEventLoopDeathTest,
- ::testing::Values([]() {
- return new ShmEventLoopTestFactory();
- }));
+INSTANTIATE_TEST_CASE_P(ShmEventLoopCopyDeathTest, AbstractEventLoopDeathTest,
+ ::testing::Values(std::make_pair(
+ []() { return new ShmEventLoopTestFactory(); },
+ ReadMethod::COPY)));
+
+INSTANTIATE_TEST_CASE_P(ShmEventLoopPinTest, AbstractEventLoopTest,
+ ::testing::Values(std::make_pair(
+ []() { return new ShmEventLoopTestFactory(); },
+ ReadMethod::PIN)));
+
+INSTANTIATE_TEST_CASE_P(ShmEventLoopPinDeathTest, AbstractEventLoopDeathTest,
+ ::testing::Values(std::make_pair(
+ []() { return new ShmEventLoopTestFactory(); },
+ ReadMethod::PIN)));
} // namespace