2121
2222class MemoryAccessor {
2323 public:
24+ virtual ~MemoryAccessor () = default ;
2425 virtual void fill (void *ptr, size_t size, const void *pattern,
2526 size_t pattern_size) = 0;
2627 virtual void copy (void *dst_ptr, void *src_ptr, size_t size) = 0;
@@ -162,6 +163,7 @@ struct umfIpcTest : umf_test::test,
162163TEST_P (umfIpcTest, GetIPCHandleSize) {
163164 size_t size = 0 ;
164165 umf::pool_unique_handle_t pool = makePool ();
166+ ASSERT_NE (pool.get (), nullptr );
165167
166168 umf_result_t ret = umfPoolGetIPCHandleSize (pool.get (), &size);
167169 EXPECT_EQ (ret, UMF_RESULT_SUCCESS);
@@ -174,6 +176,8 @@ TEST_P(umfIpcTest, GetIPCHandleSizeInvalidArgs) {
174176 EXPECT_EQ (ret, UMF_RESULT_ERROR_INVALID_ARGUMENT);
175177
176178 umf::pool_unique_handle_t pool = makePool ();
179+ ASSERT_NE (pool.get (), nullptr );
180+
177181 ret = umfPoolGetIPCHandleSize (pool.get (), nullptr );
178182 EXPECT_EQ (ret, UMF_RESULT_ERROR_INVALID_ARGUMENT);
179183}
@@ -190,6 +194,8 @@ TEST_P(umfIpcTest, GetIPCHandleInvalidArgs) {
190194 EXPECT_EQ (ret, UMF_RESULT_ERROR_INVALID_ARGUMENT);
191195
192196 umf::pool_unique_handle_t pool = makePool ();
197+ ASSERT_NE (pool.get (), nullptr );
198+
193199 ptr = umfPoolMalloc (pool.get (), SIZE);
194200 EXPECT_NE (ptr, nullptr );
195201
@@ -213,6 +219,8 @@ TEST_P(umfIpcTest, BasicFlow) {
213219 constexpr size_t SIZE = 100 ;
214220 std::vector<int > expected_data (SIZE);
215221 umf::pool_unique_handle_t pool = makePool ();
222+ ASSERT_NE (pool.get (), nullptr );
223+
216224 int *ptr = (int *)umfPoolMalloc (pool.get (), SIZE * sizeof (int ));
217225 EXPECT_NE (ptr, nullptr );
218226
@@ -283,6 +291,7 @@ TEST_P(umfIpcTest, GetPoolByOpenedHandle) {
283291 void *openedPtrs[NUM_POOLS][NUM_ALLOCS];
284292 std::vector<umf::pool_unique_handle_t > pools_to_open;
285293 umf::pool_unique_handle_t pool = makePool ();
294+ ASSERT_NE (pool.get (), nullptr );
286295
287296 for (size_t i = 0 ; i < NUM_POOLS; ++i) {
288297 pools_to_open.push_back (makePool ());
@@ -341,6 +350,8 @@ TEST_P(umfIpcTest, GetPoolByOpenedHandle) {
341350TEST_P (umfIpcTest, AllocFreeAllocTest) {
342351 constexpr size_t SIZE = 64 * 1024 ;
343352 umf::pool_unique_handle_t pool = makePool ();
353+ ASSERT_NE (pool.get (), nullptr );
354+
344355 umf_ipc_handler_handle_t ipcHandler = nullptr ;
345356
346357 umf_result_t ret = umfPoolGetIPCHandler (pool.get (), &ipcHandler);
@@ -400,7 +411,9 @@ TEST_P(umfIpcTest, openInTwoIpcHandlers) {
400411 constexpr size_t SIZE = 100 ;
401412 std::vector<int > expected_data (SIZE);
402413 umf::pool_unique_handle_t pool1 = makePool ();
414+ ASSERT_NE (pool1.get (), nullptr );
403415 umf::pool_unique_handle_t pool2 = makePool ();
416+ ASSERT_NE (pool2.get (), nullptr );
404417 umf_ipc_handler_handle_t ipcHandler1 = nullptr ;
405418 umf_ipc_handler_handle_t ipcHandler2 = nullptr ;
406419
@@ -465,6 +478,7 @@ TEST_P(umfIpcTest, ConcurrentGetPutHandles) {
465478 constexpr size_t ALLOC_SIZE = 100 ;
466479 constexpr size_t NUM_POINTERS = 100 ;
467480 umf::pool_unique_handle_t pool = makePool ();
481+ ASSERT_NE (pool.get (), nullptr );
468482
469483 for (size_t i = 0 ; i < NUM_POINTERS; ++i) {
470484 void *ptr = umfPoolMalloc (pool.get (), ALLOC_SIZE);
@@ -514,6 +528,7 @@ TEST_P(umfIpcTest, ConcurrentOpenCloseHandles) {
514528 constexpr size_t ALLOC_SIZE = 100 ;
515529 constexpr size_t NUM_POINTERS = 100 ;
516530 umf::pool_unique_handle_t pool = makePool ();
531+ ASSERT_NE (pool.get (), nullptr );
517532
518533 for (size_t i = 0 ; i < NUM_POINTERS; ++i) {
519534 void *ptr = umfPoolMalloc (pool.get (), ALLOC_SIZE);
0 commit comments