test: correct expectation for pat index in bind test

Related-To: NEO-10158

Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-08-30 14:12:58 +00:00
committed by Compute-Runtime-Automation
parent 8b760f8528
commit 4bf8e6de2e
2 changed files with 7 additions and 2 deletions

View File

@@ -7,13 +7,17 @@
#pragma once
#include "shared/source/helpers/common_types.h"
#include "shared/source/os_interface/linux/cache_info.h"
namespace NEO {
struct MockCacheInfo : public CacheInfo {
using CacheInfo::cacheRegionsReserved;
using CacheInfo::freeRegion;
using CacheInfo::getRegion;
using CacheInfo::isRegionReserved;
using CacheInfo::reserveRegion;
MockCacheInfo(IoctlHelper &ioctlHelper, size_t maxReservationCacheSize, uint32_t maxReservationNumCacheRegions, uint16_t maxReservationNumWays)
: CacheInfo(ioctlHelper, maxReservationCacheSize, maxReservationNumCacheRegions, maxReservationNumWays) {}

View File

@@ -1132,10 +1132,11 @@ HWTEST_F(DrmMemoryOperationsHandlerBindTest, givenPatIndexProgrammingEnabledWhen
operationHandler->evict(device, allocation);
EXPECT_EQ(expectedIndex, mock->context.receivedVmUnbindPatIndex.value());
} else {
EXPECT_EQ(3u, mock->context.receivedVmBindPatIndex.value());
auto expectedPatIndex = productHelper.getPatIndex(CacheRegion::defaultRegion, CachePolicy::writeBack);
EXPECT_EQ(expectedPatIndex, mock->context.receivedVmBindPatIndex.value());
operationHandler->evict(device, allocation);
EXPECT_EQ(3u, mock->context.receivedVmUnbindPatIndex.value());
EXPECT_EQ(expectedPatIndex, mock->context.receivedVmUnbindPatIndex.value());
}
}
}