Skip to content

Commit 64ee85b

Browse files
authored
Merge pull request #840 from ldorau/Add_IPC_tests_for_umfPoolMalloc_after_umfCloseIPCHandle
Add IPC tests for using an allocation after `umfCloseIPCHandle()`
2 parents b3bbdd4 + 65e988a commit 64ee85b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/ipcFixtures.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,10 @@ TEST_P(umfIpcTest, AllocFreeAllocTest) {
313313
ptr = umfPoolMalloc(pool.get(), SIZE);
314314
ASSERT_NE(ptr, nullptr);
315315

316+
// test if the allocated memory is usable - fill it with the 0xAB pattern.
317+
const uint32_t pattern = 0xAB;
318+
memAccessor->fill(ptr, SIZE, &pattern, sizeof(pattern));
319+
316320
ret = umfGetIPCHandle(ptr, &ipcHandle, &handleSize);
317321
ASSERT_EQ(ret, UMF_RESULT_SUCCESS);
318322

0 commit comments

Comments
 (0)