test: initialize memory that is used for compare

Relatd-To: NEO-9110
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-10-11 16:07:15 +00:00
committed by Compute-Runtime-Automation
parent 5c1d82349b
commit 085a1f0cc3

View File

@@ -61,12 +61,14 @@ TEST_F(KernelInitializeTest, givenDebuggingEnabledWhenKernelsAreInitializedThenA
KernelImmutableData kernelImmutableData(device);
kernelImmutableData.setIsaPerKernelAllocation(this->allocateIsaMemory(kernelInfo.heapInfo.kernelHeapSize, false));
auto isa = kernelImmutableData.getIsaGraphicsAllocation()->getUnderlyingBuffer();
*reinterpret_cast<uint32_t *>(isa) = 0;
memoryOperationsHandler->makeResidentCalledCount = 0;
kernelImmutableData.initialize(&kernelInfo, device, 0, nullptr, nullptr, false);
EXPECT_EQ(0, memoryOperationsHandler->makeResidentCalledCount);
auto isa = kernelImmutableData.getIsaGraphicsAllocation()->getUnderlyingBuffer();
EXPECT_NE(0, memcmp(isa, &kernelHeap, sizeof(kernelHeap)));
};