Conversation
Add python bindings, unit tests, black box test coverage and README entries for: 1. zesDeviceGetState 2. zesDeviceResetExt 3. zesDeviceEnumFirmwares 4. zesDeviceEventRegister 5. zesDeviceGetHealthStatusExt 6. zesDeviceSetHealthStatusExt Related-To: SYSM-434 Signed-off-by: Aviral Nigam <aviral.nigam@intel.com>
aviralni
force-pushed
the
pyzes_device
branch
from
September 23, 2026 06:03
66e2d49 to
0f899ec
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The black-box test performs unconditional writes to non-volatile device health state.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds Python bindings, tests, examples, and documentation for six Sysman device APIs.
Changes:
- Adds device state, reset, event, health, and firmware bindings.
- Extends unit and black-box coverage.
- Documents the newly supported APIs.
| File | Review |
|---|---|
bindings/sysman/python/test/unit_tests/test_device.py |
Adds unit tests for the new wrappers. |
bindings/sysman/python/source/pyzes.py |
Adds ctypes types and API wrappers. |
bindings/sysman/python/source/examples/pyzes_black_box_test.py |
Adds black-box coverage. Moderate: Avoid unconditional persistent health-status writes; keep the path read-only or explicitly opt-in. |
bindings/sysman/python/README.md |
Documents API support. Nit: Align the stated 0.1.3 availability with package metadata and release notes. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+929
to
+937
| if is_root_user(): | ||
| # Write back the health status just read so the device state is unchanged | ||
| rc = pz.zesDeviceSetHealthStatusExt(device_handle, health.value) | ||
| if check_rc(f"zesDeviceSetHealthStatusExt(device {device_index})", rc): | ||
| print_verbose(" Set health status successfully") | ||
| else: | ||
| print_verbose( | ||
| " Skipping zesDeviceSetHealthStatusExt due to insufficient permissions" | ||
| ) |
Comment on lines
+161
to
+166
| | `zesDeviceGetState` | Device | 0.1.3 | None | | ||
| | `zesDeviceResetExt` | Device | 0.1.3 | Linux: Requires superuser; all device state is lost | | ||
| | `zesDeviceEventRegister` | Device | 0.1.3 | None | | ||
| | `zesDeviceGetHealthStatusExt` | Device | 0.1.3 | None | | ||
| | `zesDeviceSetHealthStatusExt` | Device | 0.1.3 | Linux: Requires superuser; persisted to non-volatile memory | | ||
| | `zesDeviceEnumFirmwares` | Device | 0.1.3 | None | |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Uh oh!
There was an error while loading. Please reload this page.