add hsm tests for NXP ELE (New)#2550
Conversation
add hsm tests for NXP Edge Lock device
baconYao
left a comment
There was a problem hiding this comment.
Hi @stanley31huang, I made some refactor like below
Separation of Concerns (SoC)
The nvm_daemon_lifecycle context manager is now solely responsible for service state management and data cleanup, while run_with_nvm_lifecycle focuses exclusively on command execution and exit code handling.
Prevention of Exception Masking
Inside nvm_daemon_lifecycle, if cleanup_nvm_data() fails and throws an error, the execution aborts immediately with the correct traceback. This prevents the finally block from attempting to stop an already-stopped service, which could raise a secondary RuntimeError and mask the root cause.
Cleaner Caller Interfaces
By streamlining the arguments for run_with_nvm_lifecycle, caller functions no longer need to construct verbose, repetitive strings for success_message and fail_label. Standardizing the output with a single test_label and a prefixed [NXP_ELE] PASS: adheres to the DRY (Don't Repeat Yourself) principle.
Improved Maintainability
If NXP introduces new lifecycle requirements in the future (e.g., adding an extra health check stage to the daemon), you only need to update the nvm_daemon_lifecycle context manager. The actual test execution logic for performance and TV files remains completely untouched.
applied suggestions
fix coding style issue
ad2f9fb to
82767dc
Compare
|
@copilot resolve the merge conflicts in this pull request |
Resolved. I merged |
remove pyc file
5f0a53d to
25f5d78
Compare
fix coding style issue
25f5d78 to
5539d43
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2550 +/- ##
=======================================
Coverage 59.49% 59.49%
=======================================
Files 480 480
Lines 48505 48505
Branches 8675 8675
=======================================
Hits 28859 28859
Misses 18737 18737
Partials 909 909 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Add a new NXP EdgeLock Enclave (ELE) Checkbox test suite for oem-imx-secure-enclave, including dynamic test-vector discovery, per-vector
templated execution, and ELE performance testing.
What this PR adds
Resolved issues
Documentation
reference: https://github.com/nxp-imx/imx-secure-enclave
Tests
https://certification.canonical.com/hardware/202601-38315/submission/490071/