mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 22:00:19 +00:00
fba018f36e
This commit migrates the test for zero-length external routes from a Python script to the Nexus test framework. The original test was test_zero_len_external_route.py in tests/scripts/thread-cert. The new Nexus test test_zero_len_external_route.cpp replicates the original test scenario: - Forms a network with a Leader and two Routers. - Verifies that adding a zero-length external route "::/0" on a Router allows routing to a manually added IPv6 address on that Router. - Verifies that explicit external routes are preferred over on-mesh prefixes that have the default route flag set. - Verifies that removing the external route causes traffic to be re-routed (and in this case, fail as intended when the destination is moved). - Verifies that moving the address to another Router with a default route flag allows successful routing. This commit also fixes a bug in Core::SendAndVerifyEchoRequest in nexus_core.cpp where the ICMP handler was not always unregistered, especially when failures occurred. This fix ensures that subsequent handler registrations in the same process do not fail with kErrorAlready. Migrating to Nexus provides faster execution and better integration with the core OpenThread codebase.
OpenThread Certification Tests
Inspector
Inspect nodes status by the following modification:
- Insert the inspector to where you want to inspect.
import debug
debug.Inspector(self).inspect()
- Run the test and it will stop at the line above and prompt
#.
./script/test clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
- Inspect
#
# 1
> state
leader
> exit
# 2
> panid
face
> exit
# exit
CLI reference
# mode
This is selection mode. You may select the node to inspect here.
list- list available nodes.exit- end inspecting, continue running test case.- <number> - select the node with id <number>. This will result in entering
>mode.
> mode
This is node mode. You may run OpenThread CLI here.
exit- go back to#mode.