mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
test: fix IPCHandle tests to use correct value range and mock name
Related-To: NEO-10380 Signed-off-by: Neil R. Spruit <neil.r.spruit@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
bb98aa2fbd
commit
e9f315b11f
@@ -2994,7 +2994,7 @@ TEST_F(ContextTest, whenCallingSetIPCHandleDataWithInvalidIpcHandleTypeThenHandl
|
|||||||
// Test with completely invalid handle type (beyond enum range)
|
// Test with completely invalid handle type (beyond enum range)
|
||||||
handle = 22222;
|
handle = 22222;
|
||||||
opaqueIpcData = {}; // Reset
|
opaqueIpcData = {}; // Reset
|
||||||
L0::IpcHandleType invalidHandleType2 = static_cast<L0::IpcHandleType>(255);
|
L0::IpcHandleType invalidHandleType2 = L0::IpcHandleType::maxHandle;
|
||||||
|
|
||||||
contextWhitebox.setIPCHandleData<L0::IpcOpaqueMemoryData>(&mockAllocation, handle, opaqueIpcData, ptrAddress, type, nullptr, invalidHandleType2);
|
contextWhitebox.setIPCHandleData<L0::IpcOpaqueMemoryData>(&mockAllocation, handle, opaqueIpcData, ptrAddress, type, nullptr, invalidHandleType2);
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using namespace NEO;
|
|||||||
// Mock the underlying GMM_RESOURCE_INFO to test the real DRM_OR_WDDM implementation
|
// Mock the underlying GMM_RESOURCE_INFO to test the real DRM_OR_WDDM implementation
|
||||||
class MockGmmResourceInfoDrmOrWddm {
|
class MockGmmResourceInfoDrmOrWddm {
|
||||||
public:
|
public:
|
||||||
uint64_t GetDriverProtectionBits(GMM_OVERRIDE_VALUES overrideValues) {
|
uint64_t getDriverProtectionBits(GMM_OVERRIDE_VALUES overrideValues) {
|
||||||
lastOverrideValues = overrideValues;
|
lastOverrideValues = overrideValues;
|
||||||
getDriverProtectionBitsCalled = true;
|
getDriverProtectionBitsCalled = true;
|
||||||
return returnValue;
|
return returnValue;
|
||||||
@@ -47,7 +47,7 @@ class TestableGmmResourceInfo : public GmmResourceInfo {
|
|||||||
if (GMM_RESOURCE_USAGE_UNKNOWN != overrideUsage) {
|
if (GMM_RESOURCE_USAGE_UNKNOWN != overrideUsage) {
|
||||||
overrideValues.Usage = static_cast<GMM_RESOURCE_USAGE_TYPE>(overrideUsage);
|
overrideValues.Usage = static_cast<GMM_RESOURCE_USAGE_TYPE>(overrideUsage);
|
||||||
}
|
}
|
||||||
return mockResourceInfo->GetDriverProtectionBits(overrideValues);
|
return mockResourceInfo->getDriverProtectionBits(overrideValues);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expose clientContext for testing
|
// Expose clientContext for testing
|
||||||
|
|||||||
Reference in New Issue
Block a user