[nexus] add test case 5.2.5 Address Query – REED#12396
[nexus] add test case 5.2.5 Address Query – REED#12396jwhui wants to merge 1 commit intoopenthread:mainfrom
Conversation
Summary of ChangesHello @jwhui, 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 integrates a crucial new test case, 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. Changelog
Activity
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. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Library files
|
This commit adds a new Nexus test case 5.2.5 which validates that a Router Eligible End Device (REED) correctly generates Address Notification messages in response to Address Query messages. The test implementation includes: - test_5_2_5.cpp: Sets up a 16-router topology using AllowList constraints and executes the test procedure. - verify_5_2_5.py: Verifies the resulting pcap to ensure correct Address Notification format (Target EID, RLOC16, and ML-EID TLVs) and Echo Reply sequence. Summary of changes: - Added tests/nexus/test_5_2_5.cpp and tests/nexus/verify_5_2_5.py. - Updated tests/nexus/CMakeLists.txt to include the new test. - Updated tests/nexus/run_nexus_tests.sh to add 5_2_5 to default tests. - Enabled OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE and OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE in tests/nexus/openthread-core-nexus-config.h to support DHCPv6 prefixes used in the test.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Nexus test case, 5.2.5, to validate Address Query functionality on a Router Eligible End Device (REED). The changes include the C++ test implementation, a Python script for pcap verification, and necessary updates to the build and test execution configurations. The implementation correctly establishes the complex network topology and verifies the DUT's behavior as specified in the test plan. The code is well-structured and clear. I have one suggestion to enhance the debuggability of the C++ test code.
| auto verifyPing = [&](const Ip6::Address &aAddress, const char *aLabel) { | ||
| OT_UNUSED_VARIABLE(aLabel); | ||
| med1ReceivedEchoReply = false; | ||
| SendEchoRequest(med1, aAddress); | ||
| nexus.AdvanceTime(kEchoResponseTime); | ||
| VerifyOrQuit(med1ReceivedEchoReply, "Echo Reply not received"); | ||
| }; |
There was a problem hiding this comment.
The aLabel parameter in the verifyPing lambda is currently unused. It can be leveraged to provide a more descriptive failure message in VerifyOrQuit, which would improve debuggability if the test fails.
| auto verifyPing = [&](const Ip6::Address &aAddress, const char *aLabel) { | |
| OT_UNUSED_VARIABLE(aLabel); | |
| med1ReceivedEchoReply = false; | |
| SendEchoRequest(med1, aAddress); | |
| nexus.AdvanceTime(kEchoResponseTime); | |
| VerifyOrQuit(med1ReceivedEchoReply, "Echo Reply not received"); | |
| }; | |
| auto verifyPing = [&](const Ip6::Address &aAddress, const char *aLabel) { | |
| med1ReceivedEchoReply = false; | |
| SendEchoRequest(med1, aAddress); | |
| nexus.AdvanceTime(kEchoResponseTime); | |
| char failMessage[128]; | |
| snprintf(failMessage, sizeof(failMessage), "Echo Reply not received for %s", aLabel); | |
| VerifyOrQuit(med1ReceivedEchoReply, failMessage); | |
| }; |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12396 +/- ##
==========================================
- Coverage 76.68% 73.88% -2.80%
==========================================
Files 688 687 -1
Lines 93519 98916 +5397
==========================================
+ Hits 71713 73084 +1371
- Misses 21806 25832 +4026 🚀 New features to boost your workflow:
|
This commit adds a new Nexus test case 5.2.5 which validates that a Router Eligible End Device (REED) correctly generates Address Notification messages in response to Address Query messages.
The test implementation includes:
Summary of changes: