Skip to content

Conversation

viki435
Copy link
Contributor

@viki435 viki435 commented Aug 11, 2025

Primary JIRA: VLCLJ-2513
Sub-tasks: VLCLJ-2563, VLCLJ-2565, VLCLJ-2566
Update the GTEST_FAIL logic for frequency, diagnostics and fan modules.
Implemented to check the handles for all the devices and FAIL only if the handle is not found for any device.

Sub-tasks: VLCLJ-2563, VLCLJ-2565, VLCLJ-2566
Update the GTEST_FAIL logic for frequency, diagnostics and fan devices.
Implemented to check the handles for all the devices and
FAIL only if the handle is not found for any device.

Signed-off-by: viki435 <[email protected]>
@vishnu-khanth
Copy link
Contributor

Primary JIRA: VLCJ-2513 Sub-tasks: VLCLJ-2563, VLCLJ-2565, VLCLJ-2566 Update the GTEST_FAIL logic for frequency, diagnostics and fan devices. Implemented to check the handles for all the devices and FAIL only if the handle is not found for any device.

Typo :
VLCJ -> VLCLJ
logic for frequency, diagnostics and fan devices -> logic for frequency, diagnostics and fan modules

@vishnu-khanth vishnu-khanth requested a review from Copilot August 11, 2025 06:20
Copilot

This comment was marked as outdated.

@vishnu-khanth
Copy link
Contributor

Commit msg should be
Fix: Handling GTEST_FAIL logic for multi-device scenario for Fan, Diagnostics and Frequency modules

and jira should meta data for commit msg

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes GTEST_FAIL logic for multi-device scenarios in frequency, fan, and diagnostics modules by updating the test failure conditions to only fail when handles are not found for any device, rather than failing immediately when handles are not found for a single device.

  • Renamed boolean variables from *_handles_available to is_*_supported for clarity
  • Changed test logic to check all devices first and only fail if no devices support the feature
  • Added informative logging to distinguish between device-specific and system-wide failures

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 12 comments.

File Description
test_sysman_frequency.cpp Updated frequency tests to use new multi-device failure logic with is_freq_supported flag
test_sysman_fan.cpp Updated fan tests to use new multi-device failure logic with is_fan_supported flag
test_sysman_diagnostics.cpp Updated diagnostics tests to use new multi-device failure logic with is_diag_supported flag

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copilot

This comment was marked as outdated.

@vishnu-khanth vishnu-khanth requested a review from Copilot August 19, 2025 04:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the GTEST_FAIL logic for frequency, diagnostics, and fan modules to properly handle multi-device scenarios. Instead of failing immediately when a single device lacks handles, the tests now check all devices and only fail if no handles are found across any device.

Key Changes

  • Modified test logic to check all devices before failing with GTEST_FAIL
  • Added boolean flags (is_freq_supported, is_diag_supported, is_fan_supported) to track handle availability across devices
  • Added informative logging for each device's handle availability status

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 11 comments.

File Description
test_sysman_frequency.cpp Updated frequency module tests to check all devices before failing, added is_freq_supported flag
test_sysman_fan.cpp Updated fan module tests to check all devices before failing, added is_fan_supported flag
test_sysman_diagnostics.cpp Updated diagnostics module tests to check all devices before failing, added is_diag_supported flag

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

viki435 and others added 4 commits August 19, 2025 10:33
…an_diagnostics.cpp


Updated to false.

Co-authored-by: Copilot <[email protected]>
Sub-tasks: VLCLJ-2563, VLCLJ-2565, VLCLJ-2566
Fix: Handling GTEST_FAIL logic for multi-device scenario for fan, frequency and
diagnostics modules.

Signed-off-by: viki435 <[email protected]>
Sub-tasks: VLCLJ-2563, VLCLJ-2565, VLCLJ-2566
Fix: Handling GTEST_FAIL logic for multi-device scenario for fan,
frequency and diagnostics modules.

Signed-off-by: viki435 <[email protected]>
Sub-tasks: VLCLJ-2563, VLCLJ-2565, VLCLJ-2566
Fix: Handling GTEST_FAIL logic for multi-device scenario for fan,
frequency and diagnostics modules.

Signed-off-by: viki435 <[email protected]>
@vishnu-khanth vishnu-khanth requested a review from Copilot August 19, 2025 05:42
Copilot

This comment was marked as outdated.

@vishnu-khanth vishnu-khanth requested review from Copilot and removed request for Copilot August 19, 2025 05:59
Copilot

This comment was marked as outdated.

Sub-tasks: VLCLJ-2563, VLCLJ-2565, VLCLJ-2566
Fix: Handling GTEST_FAIL logic for multi-device scenario for fan,
frequency and diagnostics modules.

Signed-off-by: viki435 <[email protected]>
@vishnu-khanth vishnu-khanth requested a review from Copilot August 19, 2025 08:55
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the GTEST_FAIL logic for frequency, diagnostics, and fan modules to handle multi-device scenarios properly. Instead of failing immediately when handles are not found on any single device, the code now checks all devices and only fails if no handles are found across all devices.

Key changes:

  • Replaces immediate failure logic with device-level checking and consolidated failure logic
  • Introduces boolean flags to track whether any device supports the respective features
  • Updates variable names for better clarity (e.g., freq_handles_availableis_freq_supported)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.

File Description
test_sysman_frequency.cpp Updates frequency module tests to check all devices before failing, adds is_freq_supported flag
test_sysman_fan.cpp Updates fan module tests with multi-device support and is_fan_supported flag
test_sysman_diagnostics.cpp Updates diagnostics module tests with multi-device support and is_diag_supported flag

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@vishnu-khanth vishnu-khanth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@narenbagria narenbagria requested review from AshwinKumarKulkarni and removed request for AshwinKumarKulkarni August 21, 2025 07:10
@AshwinKumarKulkarni AshwinKumarKulkarni merged commit b12e62f into oneapi-src:master Aug 21, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants