Skip to content

[nexus] add test 5.2.1 REED Attach#12388

Open
jwhui wants to merge 1 commit intoopenthread:mainfrom
jwhui:nexus-5-2-1
Open

[nexus] add test 5.2.1 REED Attach#12388
jwhui wants to merge 1 commit intoopenthread:mainfrom
jwhui:nexus-5-2-1

Conversation

@jwhui
Copy link
Member

@jwhui jwhui commented Feb 6, 2026

Adds a new Nexus test case for 'REED Attach' (5.2.1) as specified in the test specification.

Summary of changes:

  • Implemented Nexus test 5.2.1:
    • Added test_5_2_1.cpp: Sets up a Leader, REED_1, and MED_1 (DUT) topology. Ensures REED_1 upgrades to a Router when the DUT attaches. Verifies connectivity from the Leader to the DUT via REED_1 using ICMP Echo.
    • Added verify_5_2_1.py: PCAP verification script for test 5.2.1, ensuring MLE Parent Requests, Address Solicit/Responses, and ICMP Echo Request/Replies are correctly exchanged and forwarded.
  • Updated build and execution scripts:
    • Modified CMakeLists.txt to build the new 5.2.1 test executable.
    • Updated run_nexus_tests.sh to include 5.2.1 in the default test list.

@gemini-code-assist
Copy link

Summary of Changes

Hello @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 introduces a comprehensive new Nexus test case, "REED Attach" (5.2.1), designed to verify the correct behavior of a Thread network when a Router-Eligible End Device (REED) attaches, upgrades to a Router, and facilitates multi-hop communication. The test specifically focuses on the Device Under Test's (DUT) ability to handle address solicit forwarding and maintain connectivity, ensuring adherence to Thread specifications through both C++ test logic and Python-based PCAP analysis.

Highlights

  • New Test Case: Implemented Nexus test 5.2.1, named "REED Attach", to validate specific network behaviors related to Router-Eligible End Devices.
  • Test Logic Implementation: A new C++ file, test_5_2_1.cpp, was added to define the test scenario. It sets up a network topology with a Leader, a Router-Eligible End Device (REED_1), and a Minimal End Device (MED_1), with a Device Under Test (DUT) acting as a router. The test verifies that REED_1 upgrades to a Router upon attachment and confirms end-to-end connectivity using ICMP Echo.
  • PCAP Verification Script: A new Python script, verify_5_2_1.py, was added to perform PCAP verification for test 5.2.1. This script ensures the correct exchange and forwarding of MLE Parent Requests, Address Solicit/Responses, and ICMP Echo Request/Replies, validating network protocol adherence.
  • Build and Execution Integration: The new test case has been integrated into the build system by modifying CMakeLists.txt to include it, and it has been added to the default test suite in run_nexus_tests.sh for automatic execution.

🧠 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
  • tests/nexus/CMakeLists.txt
    • Added the new test 5_2_1 to the list of Nexus tests to be built.
  • tests/nexus/run_nexus_tests.sh
    • Included 5_2_1 in the default set of Nexus tests to be executed.
  • tests/nexus/test_5_2_1.cpp
    • New file containing the C++ implementation of the 5.2.1 REED Attach test, defining the network topology, node roles, and verification steps.
  • tests/nexus/verify_5_2_1.py
    • New file providing the Python script for PCAP analysis and verification of network traffic generated during the 5.2.1 test.
Activity
  • The pull request was created by jwhui to add a new Nexus test case.
  • No further review comments or activity have been recorded yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

gemini-code-assist[bot]

This comment was marked as outdated.

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Merging #12388 into main

name branch text data bss total
ot-cli-ftd c009087 482176 860 66564 549600
3e64e20 482176 860 66564 549600
+/- +0 +0 +0 +0
ot-ncp-ftd c009087 447980 764 61800 510544
3e64e20 447980 764 61800 510544
+/- +0 +0 +0 +0
ot-cli-mtd c009087 373896 764 50996 425656
3e64e20 373896 764 50996 425656
+/- +0 +0 +0 +0
ot-ncp-mtd c009087 354956 764 46264 401984
3e64e20 354956 764 46264 401984
+/- +0 +0 +0 +0
ot-cli-ftd-br c009087 589696 868 136484 727048
3e64e20 589696 868 136484 727048
+/- +0 +0 +0 +0
ot-rcp c009087 63264 568 20804 84636
3e64e20 63264 568 20804 84636
+/- +0 +0 +0 +0
Library files
name branch text data bss total
libopenthread-ftd.a c009087 249439 95 40343 289877
3e64e20 249439 95 40343 289877
+/- +0 +0 +0 +0
libopenthread-cli-ftd.a c009087 61790 0 8091 69881
3e64e20 61790 0 8091 69881
+/- +0 +0 +0 +0
libopenthread-ncp-ftd.a c009087 33581 0 5948 39529
3e64e20 33581 0 5948 39529
+/- +0 +0 +0 +0
libopenthread-mtd.a c009087 167341 0 24807 192148
3e64e20 167341 0 24807 192148
+/- +0 +0 +0 +0
libopenthread-cli-mtd.a c009087 41422 0 8059 49481
3e64e20 41422 0 8059 49481
+/- +0 +0 +0 +0
libopenthread-ncp-mtd.a c009087 25805 0 5948 31753
3e64e20 25805 0 5948 31753
+/- +0 +0 +0 +0
libopenthread-ftd-br.a c009087 358609 100 110223 468932
3e64e20 358609 100 110223 468932
+/- +0 +0 +0 +0
libopenthread-cli-ftd-br.a c009087 80203 0 8131 88334
3e64e20 80203 0 8131 88334
+/- +0 +0 +0 +0
libopenthread-rcp.a c009087 9944 0 5060 15004
3e64e20 9944 0 5060 15004
+/- +0 +0 +0 +0
libopenthread-radio.a c009087 19537 0 238 19775
3e64e20 19537 0 238 19775
+/- +0 +0 +0 +0

@jwhui jwhui force-pushed the nexus-5-2-1 branch 2 times, most recently from 3e6d853 to 216e69d Compare February 6, 2026 22:29
@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.10%. Comparing base (c009087) to head (9fbce9e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12388      +/-   ##
==========================================
+ Coverage   74.99%   77.10%   +2.11%     
==========================================
  Files         686      689       +3     
  Lines       97830    91474    -6356     
==========================================
- Hits        73370    70534    -2836     
+ Misses      24460    20940    -3520     

see 91 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

gemini-code-assist[bot]

This comment was marked as outdated.

@jwhui
Copy link
Member Author

jwhui commented Feb 8, 2026

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new Nexus test case, 5.2.1, for 'REED Attach'. The C++ test implementation and the Python verification script are well-structured and appear to correctly implement the test specification. My review includes a few suggestions to enhance the clarity of comments in both the test and verification files, aiming to better align them with the code's actions. Overall, this is a solid contribution to the test suite.

Adds a new Nexus test case for 'REED Attach' (5.2.1) as specified in the test specification.

Summary of changes:
- Implemented Nexus test 5.2.1:
    - Added test_5_2_1.cpp: Sets up a Leader, REED_1, and MED_1 (DUT) topology.
      Ensures REED_1 upgrades to a Router when the DUT attaches. Verifies
      connectivity from the Leader to the DUT via REED_1 using ICMP Echo.
    - Added verify_5_2_1.py: PCAP verification script for test 5.2.1,
      ensuring MLE Parent Requests, Address Solicit/Responses, and ICMP
      Echo Request/Replies are correctly exchanged and forwarded.
- Updated build and execution scripts:
    - Modified CMakeLists.txt to build the new 5.2.1 test executable.
    - Updated run_nexus_tests.sh to include 5.2.1 in the default test list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant