Skip to content

Commit 65e988a

Browse files
committed
Add IPC tests for using an allocation after umfCloseIPCHandle()
Add IPC tests for using an allocation after umfCloseIPCHandle(). Test if umfPoolMalloc() returns a usable pointer after umfCloseIPCHandle(). Signed-off-by: Lukasz Dorau <[email protected]>
1 parent b3bbdd4 commit 65e988a

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)