Correct device usage in kernel methods

pass device to substituteKernelHeap
use proper device when iterating over devices

Related-To: NEO-5001
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-12-17 09:54:45 +00:00
committed by Compute-Runtime-Automation
parent 26dc1de24d
commit ee0523ae23
7 changed files with 58 additions and 34 deletions

View File

@ -2328,7 +2328,7 @@ TEST_F(GTPinTests, givenKernelThenVerifyThatKernelCodeSubstitutionWorksWell) {
// Substitute new kernel code
constexpr size_t newCodeSize = 64;
uint8_t newCode[newCodeSize] = {0x0, 0x1, 0x2, 0x3, 0x4};
pKernel->substituteKernelHeap(rootDeviceIndex, &newCode[0], newCodeSize);
pKernel->substituteKernelHeap(pDevice->getDevice(), &newCode[0], newCodeSize);
// Verify that substitution went properly
isKernelCodeSubstituted = pKernel->isKernelHeapSubstituted(rootDeviceIndex);