test: adjust test to respect patching relocations in module

Related-To: NEO-5081
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-04-27 11:53:55 +00:00
committed by Compute-Runtime-Automation
parent 3900c9d24a
commit 98ecfb1275

View File

@@ -728,7 +728,14 @@ HWTEST_F(NotifyModuleLoadTest, givenDebuggingEnabledWhenModuleIsCreatedAndFullyL
module->initialize(&moduleDesc, neoDevice);
EXPECT_EQ(5, memoryOperationsHandler->makeResidentCalledCount);
auto numIsaAllocations = static_cast<int>(module->getKernelImmutableDataVector().size());
auto expectedMakeResidentCallsCount = numIsaAllocations + 1; // const surface
if (module->getTranslationUnit()->programInfo.linkerInput) {
expectedMakeResidentCallsCount += numIsaAllocations;
}
EXPECT_EQ(expectedMakeResidentCallsCount, memoryOperationsHandler->makeResidentCalledCount);
for (auto &ki : module->getKernelImmutableDataVector()) {
EXPECT_TRUE(ki->isIsaCopiedToAllocation());