-
Notifications
You must be signed in to change notification settings - Fork 66
Fix: Handling GTEST_FAIL logic for multi-device scenario for Fan, Diagnostics and Frequency modules #268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Handling GTEST_FAIL logic for multi-device scenario for Fan, Diagnostics and Frequency modules #268
Conversation
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]>
Typo : |
Commit msg should be and jira should meta data for commit msg |
There was a problem hiding this 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
tois_*_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.
conformance_tests/sysman/test_sysman_diagnostics/src/test_sysman_diagnostics.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_fan/src/test_sysman_fan.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_diagnostics/src/test_sysman_diagnostics.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_diagnostics/src/test_sysman_diagnostics.cpp
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this 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.
conformance_tests/sysman/test_sysman_diagnostics/src/test_sysman_diagnostics.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_diagnostics/src/test_sysman_diagnostics.cpp
Outdated
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_diagnostics/src/test_sysman_diagnostics.cpp
Show resolved
Hide resolved
…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]>
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]>
There was a problem hiding this 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_available
→is_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.
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_frequency/src/test_sysman_frequency.cpp
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_diagnostics/src/test_sysman_diagnostics.cpp
Show resolved
Hide resolved
conformance_tests/sysman/test_sysman_diagnostics/src/test_sysman_diagnostics.cpp
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
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.