Pass root device index to get proper kernel info

Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-12-08 12:11:40 +00:00
committed by Compute-Runtime-Automation
parent d3f3730989
commit 350ec9f16b
49 changed files with 239 additions and 217 deletions

View File

@@ -34,7 +34,7 @@ TEST_F(KernelSubstituteTest, givenKernelWhenSubstituteKernelHeapWithGreaterSizeT
const size_t newHeapSize = initialHeapSize + 1;
char newHeap[newHeapSize];
kernel.mockKernel->substituteKernelHeap(newHeap, newHeapSize);
kernel.mockKernel->substituteKernelHeap(rootDeviceIndex, newHeap, newHeapSize);
auto secondAllocation = kernel.kernelInfo.kernelAllocation;
EXPECT_NE(nullptr, secondAllocation);
auto secondAllocationSize = secondAllocation->getUnderlyingBufferSize();
@@ -64,7 +64,7 @@ TEST_F(KernelSubstituteTest, givenKernelWhenSubstituteKernelHeapWithSameSizeThen
const size_t newHeapSize = initialHeapSize;
char newHeap[newHeapSize];
kernel.mockKernel->substituteKernelHeap(newHeap, newHeapSize);
kernel.mockKernel->substituteKernelHeap(rootDeviceIndex, newHeap, newHeapSize);
auto secondAllocation = kernel.kernelInfo.kernelAllocation;
EXPECT_NE(nullptr, secondAllocation);
auto secondAllocationSize = secondAllocation->getUnderlyingBufferSize();
@@ -93,7 +93,7 @@ TEST_F(KernelSubstituteTest, givenKernelWhenSubstituteKernelHeapWithSmallerSizeT
const size_t newHeapSize = initialHeapSize - 1;
char newHeap[newHeapSize];
kernel.mockKernel->substituteKernelHeap(newHeap, newHeapSize);
kernel.mockKernel->substituteKernelHeap(rootDeviceIndex, newHeap, newHeapSize);
auto secondAllocation = kernel.kernelInfo.kernelAllocation;
EXPECT_NE(nullptr, secondAllocation);
auto secondAllocationSize = secondAllocation->getUnderlyingBufferSize();
@@ -125,7 +125,7 @@ TEST_F(KernelSubstituteTest, givenKernelWithUsedKernelAllocationWhenSubstituteKe
EXPECT_TRUE(commandStreamReceiver.getTemporaryAllocations().peekIsEmpty());
kernel.mockKernel->substituteKernelHeap(newHeap, newHeapSize);
kernel.mockKernel->substituteKernelHeap(rootDeviceIndex, newHeap, newHeapSize);
auto secondAllocation = kernel.kernelInfo.kernelAllocation;
EXPECT_FALSE(commandStreamReceiver.getTemporaryAllocations().peekIsEmpty());