[nexus] migrate test_reset to Nexus#12971
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request completes the migration of a legacy Python-based certification test to the C++ Nexus testing framework. The purpose of this change is to improve test performance and maintainability by leveraging the native Nexus environment for verifying network state recovery after node resets. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
Library files
|
Migrate legacy Python test `test_reset.py` to Nexus C++ test `test_reset.cpp`. The test verifies that OpenThread correctly recovers network state, specifically frame counters and datasets, after sequential resets of nodes in a multi-hop topology (Leader <-> Router <-> ED). The test sequence: - Establish multi-hop topology: Leader <-> Router <-> ED. - Send 1010 pings from ED to Leader to advance the frame counter beyond the default storage threshold (1000). - Reset Leader, Router, and ED sequentially. - Verify end-to-end connectivity after resets, confirming that frame counters were correctly recovered from non-volatile storage. Legacy `tests/scripts/thread-cert/test_reset.py` is removed as its functionality is now fully covered by the Nexus test.
There was a problem hiding this comment.
Code Review
This pull request replaces the Python-based reset test with a new C++ implementation using the Nexus framework. The test verifies that nodes correctly recover their frame counters from persistent storage after a sequential reset of the Leader, Router, and End Device. Feedback suggests optimizing the kAttachToRouterTime constant to reduce the overall simulation duration while still accounting for router upgrade jitter.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12971 +/- ##
==========================================
- Coverage 72.68% 71.49% -1.20%
==========================================
Files 697 661 -36
Lines 101152 94099 -7053
==========================================
- Hits 73522 67272 -6250
+ Misses 27630 26827 -803 🚀 New features to boost your workflow:
|
Migrate legacy Python test
test_reset.pyto Nexus C++ testtest_reset.cpp.The test verifies that OpenThread correctly recovers network state, specifically frame counters and datasets, after sequential resets of nodes in a multi-hop topology (Leader <-> Router <-> ED).
The test sequence:
Legacy
tests/scripts/thread-cert/test_reset.pyis removed as its functionality is now fully covered by the Nexus test.