Skip to content

Commit a3cc32e

Browse files
committed
fix LevelZeroMock::initializeMemoryProviderWithResidentDevices with POINTER_TESTING_PROPS
1 parent 4803c47 commit a3cc32e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/common/level_zero_mocks.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,19 @@ LevelZeroMock::initializeMemoryProviderWithResidentDevices(
3939
EXPECT_CALL(*this, zeDeviceGetProperties(device, _))
4040
.WillRepeatedly(DoAll(SetArgPointee<1>(device_properties),
4141
Return(ZE_RESULT_SUCCESS)));
42+
43+
void *POINTER_TESTING_PROPS = TestCreatePointer<void *>(0x77);
4244
EXPECT_CALL(*this, zeMemAllocDevice(CONTEXT, _, _, _, device, _))
43-
.WillOnce(Return(ZE_RESULT_SUCCESS));
45+
.WillOnce(DoAll(SetArgPointee<5>(POINTER_TESTING_PROPS),
46+
Return(ZE_RESULT_SUCCESS)));
4447
for (auto dev : residentDevices) {
4548
EXPECT_CALL(*this, zeContextMakeMemoryResident(context, dev, _, _))
4649
.WillOnce(Return(ZE_RESULT_SUCCESS));
4750
}
4851
EXPECT_CALL(*this, zeMemGetAllocProperties(context, _, _, _))
4952
.WillOnce(DoAll(SetArgPointee<2>(memory_allocation_properties),
5053
Return(ZE_RESULT_SUCCESS)));
51-
EXPECT_CALL(*this, zeMemFree(CONTEXT, _))
54+
EXPECT_CALL(*this, zeMemFree(CONTEXT, POINTER_TESTING_PROPS))
5255
.WillOnce(Return(ZE_RESULT_SUCCESS));
5356

5457
umf_memory_provider_handle_t provider = nullptr;

0 commit comments

Comments
 (0)