fix: Add missing iterator validation check in sysman module

Related-To: NEO-15795

Signed-off-by: Sarbojit Sarkar <sarbojit.sarkar@intel.com>
This commit is contained in:
Sarbojit Sarkar
2025-08-20 12:59:20 +00:00
committed by Compute-Runtime-Automation
parent 056eeec4a7
commit 88b2fb60a6
5 changed files with 24 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -206,6 +206,12 @@ TEST_F(ZesEngineFixture, GivenPerfEventOpenFailsWhenEnumeratingHandlesThenFailur
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, engineImp->isEngineModuleSupported());
}
TEST_F(ZesEngineFixture, GivenPerfEventOpenFailsWhenEnumeratingHandlesUnsupportedEngineClassIsPassedThenFailureIsObserved) {
pPmuInterface->mockPerfEventFailureReturnValue = -1;
std::unique_ptr<LinuxEngineImp> engineImp = std::make_unique<LinuxEngineImp>(pOsSysman, ZES_ENGINE_GROUP_RENDER_ALL, 1, 0, false);
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, engineImp->isEngineModuleSupported());
}
TEST_F(ZesEngineFixture, GivenPerfEventOpenFailsBecauseOfHandlesUnavailableThenFailureIsObserved) {
pPmuInterface->mockPerfEventFailureReturnValue = -1;
{