This commit migrates the DNS-SD test from the thread-cert Python
framework to the Nexus C++ framework.
The new Nexus test 'test_dnssd.cpp' replicates the original test
scenario and functionality:
- Formation of a Thread network with multiple SRP clients and a
server.
- Service registration with subtypes via SRP.
- DNS browsing for full service types and specific subtypes.
- DNS address (AAAA) and service (SRV/TXT/AAAA) resolution.
- Specific DNS record queries for SRV and KEY record types.
- Verification of DNS behavior for non-existent records.
The original Python script 'tests/scripts/thread-cert/test_dnssd.py'
is removed as its functionality is now fully covered by Nexus.
Nexus tests provide faster and more scalable network simulations
within a single process, improving CI efficiency and reliability.
This commit migrates the test_service.py script from thread-cert to the
Nexus test framework.
The new test_service.cpp implements the same test logic:
- Forms a network with a Leader and two Routers.
- Adds and removes services on different nodes.
- Verifies that Service Anycast Locators (ALOCs) are correctly
added to and removed from the nodes' unicast addresses.
- Confirms reachability of the ALOCs using ICMPv6 Echo Requests
from all nodes in the network.
- Ensures ALOCs become unreachable after the service is removed
from the network data.
Changes:
- Added tests/nexus/test_service.cpp
- Updated tests/nexus/CMakeLists.txt to include the new test.
- Removed tests/scripts/thread-cert/test_service.py.
This commit restricts the API to set a preferred router ID under
`OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`. This feature is intended
for testing and therefore be excluded from standard builds to ensure
compliance with the Thread Specification.
In `Nexus::Core::HandleStateChanged`, the `lastParentId` was not
cleared when a device transitioned to the Router or Leader role. This
could cause stale parent associations to persist, leading to incorrect
link state reporting in the visualizer during subsequent role
transitions (e.g., when a former Leader merges into a partition and
becomes a Child/REED).
This fix clears `lastParentId` (sets it to `0xffff`) when the device
becomes a Router or Leader, ensuring a fresh state for parent
tracking.
This commit migrates 'test_on_mesh_prefix.py' from the thread-cert
functional tests to the Nexus simulation framework.
The new Nexus test 'test_on_mesh_prefix.cpp' covers:
- Propagation of stable and non-stable on-mesh prefixes.
- Different Network Data request behavior for MEDs and SEDs.
- MEDs receiving both stable and non-stable prefixes.
- SEDs receiving only stable prefixes.
- IPv6 address configuration (SLAAC) for all prefixes.
- Reachability verification via ICMPv6 Echo Request/Response.
Migrating to Nexus provides faster execution and improves the
reliability of the functional test suite.
This commit migrates the router multicast link request test from the
thread-cert functional tests to the Nexus simulation framework.
The new Nexus test 'test_router_multicast_link_request.cpp' covers:
- Verification of a REED node becoming a router.
- Multicast Link Request transmission to neighboring routers.
- Quick link establishment with multiple neighbors after role upgrade.
The original Python test 'test_router_multicast_link_request.py' is
removed as its functionality is now fully covered by the Nexus test.
This commit migrates the SRP server anycast mode test from the
thread-cert Python script to the Nexus test framework.
The new Nexus test `test_srp_server_anycast_mode.cpp` covers:
- SRP Server configuration in both Anycast and Unicast modes.
- Proper publication of SRP Server information in Network Data.
- SRP Client auto-start and server selection logic.
- Service registration and verification in both address modes.
- DNS browsing for registered SRP services.
Nexus tests allow for faster and more scalable network simulations
within a single process, improving CI efficiency.
Removed:
- tests/scripts/thread-cert/test_srp_server_anycast_mode.py
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.
This commit migrates the following tests from thread-cert to Nexus:
- test_router_reboot_multiple_link_request.py
- test_leader_reboot_multiple_link_request.py
New Nexus tests cover:
- Router rebooting and sending multiple Link Requests when isolated.
- Leader rebooting and sending multiple Link Requests when isolated.
The original Python cert tests are removed as they are now fully
covered by the Nexus framework.
This commit adds a new Nexus test to verify the functionality of the
MLE long routes experimental feature, which allows path costs to
exceed the standard limit of 15.
The new test `TestLongRoutes` in `test_long_routes.cpp` forms a
topology consisting of a leader and a chain of 25 routers. It then
validates that the path cost from the last router in the chain to the
leader is correctly reported as 25 using `GetPathCostToLeader()`.
Supporting changes include:
- Updating `build.sh` to support a `long_routes` build target that
enables `OT_MLE_LONG_ROUTES`.
- Adding the `long_routes` test to `CMakeLists.txt` with the
appropriate labels.
- Introducing a new GitHub workflow job `nexus-long-routes-tests` in
`nexus.yml` to automate the execution of this test.
This commit migrates the router reattach test from the thread-cert
Python framework to the Nexus C++ framework.
The new Nexus test 'test_router_reattach.cpp' replicates the
original test scenario:
- A full 32-node router network is formed.
- Router upgrade/downgrade thresholds are set to 32.
- A router is reset and verified to re-attach and reclaim its
router role.
- The test ensures the router does not downgrade after the router
selection jitter interval.
The original Python script 'tests/scripts/thread-cert/
test_router_reattach.py' is removed as its functionality is now
fully covered by Nexus.
Nexus tests provide faster and more scalable network simulations
within a single process, improving CI efficiency.
This commit migrates the anycast routing test from the thread-cert
functional tests to the Nexus simulation framework.
The new Nexus test 'test_anycast.cpp' replicates the linear topology
(R1-R2-R3-R4-R5) and verifies:
- Anycast routing for DHCPv6 Agent (ds/cs) ALOCs.
- Dynamic routing updates when multiple anycast servers are present.
- Traffic routing to the nearest anycast destination.
The original Python test 'test_anycast.py' is removed as its
functionality is now fully covered by the Nexus test.
This commit migrates the anycast locator test from the thread-cert
functional tests to the Nexus simulation framework.
The new Nexus test 'test_anycast_locator.cpp' covers:
- Anycast Locator (ALOC) resolution for the Leader from all nodes.
- Custom service ALOC resolution when only one node provides it.
- Closest-node ALOC resolution when multiple nodes provide the same
service in a line topology (LEADER-R1-R2-R3-R4).
- Verification that nodes resolve to the nearest service instance.
The original Python test 'test_anycast_locator.py' is removed as its
functionality is now fully covered by the Nexus test.
This commit simplifies the `Ip6AddressesTlv` by removing the dedicated
class definition and instead defining it as a `TlvInfo` for the
`ThreadTlv::kIp6Addresses` type.
The usage of `Ip6AddressesTlv` is updated in `BbrManager`,
`MlrManager`, and related tests to use `Tlv::StartTlv()` and
`Tlv::EndTlv()` when appending the TLV to messages.
This commit renames `GetRouteDataLength()` and `SetRouteDataLength()`
to `GetRouteDataEntryCount()` and `SetRouteDataEntryCount()` in the
`RouteTlv` class.
When `OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE` is enabled, the
route data entries use a packed format (12 bits or 1.5 bytes per
entry). Consequently, the byte length of the route data field in
the TLV is no longer equal to the number of route entries.
This change ensures that `GetRouteDataEntryCount()` correctly
calculates the number of entries from the TLV length and
`SetRouteDataEntryCount()` sets the TLV length correctly based on
the entry count.
This commit migrates the SRP TTL test from the thread-cert Python
framework to the Nexus C++ framework.
The new Nexus test `test_srp_ttl.cpp` covers all four TTL clamping
cases originally implemented in `test_srp_ttl.py`:
1. CLIENT_TTL < TTL_MIN < LEASE_MAX => Clamped to TTL_MIN.
2. TTL_MIN < CLIENT_TTL < TTL_MAX < LEASE_MAX => Used CLIENT_TTL.
3. TTL_MAX < LEASE_MAX < CLIENT_TTL => Clamped to TTL_MAX.
4. LEASE_MAX < TTL_MAX < CLIENT_TTL => Clamped to LEASE_MAX.
Nexus tests provide faster and more scalable network simulations
within a single process, improving CI efficiency.
The original Python script `tests/scripts/thread-cert/test_srp_ttl.py`
is removed as its functionality is now fully covered by Nexus.
The test was failing occasionally due to the unpredictable timing of
tick-aligned timers and dataset propagation in simulations.
Specifically:
1) The router's jittered timeout (minimum 1 second) could expire
in as little as 1ms if an MLE TimeTick occurred immediately
after the security policy update.
2) Dataset propagation via MLE Advertisements could take up to
32 seconds, making immediate checks on the router's role
unreliable.
This commit fixes the flakiness by:
- Replacing flaky router role checks with `IsRouterRoleAllowed()`
assertions. This verifies that the security policy has been
successfully propagated and applied, regardless of whether the
actual role transition has completed.
- Increasing the propagation wait time to 5 seconds. This provides
a safe margin for simulated radio propagation while remaining
well within the leader's 10-second downgrade delay.
- Ensuring both the leader and router are verified for policy
application in both phases of the test.
- Maintaining the final checks to ensure both nodes eventually
become detached after the full downgrade delay (150 seconds).
The fix was verified with 1000 consecutive successful iterations.
This commit migrates the SRP server reboot port test from the
thread-cert functional tests to the Nexus simulation framework.
The new Nexus test 'test_srp_server_reboot_port.cpp' covers:
- SRP server address mode configuration (Unicast).
- SRP client auto-start discovery of the server.
- SRP server reboot (disable/enable) without node reboot.
- Verification that the server selects a new port after each reboot.
- Robustness of service re-registration over 25 reboot iterations.
The original Python test 'test_srp_server_reboot_port.py' is removed
as its functionality is now fully covered by the Nexus test.
This commit migrates the SRP register services with different
lease test from the thread-cert Python framework to the Nexus
test framework.
The new Nexus test (test_srp_register_services_diff_lease.cpp)
reproduces the functionality of the original Python test:
- Registration of multiple services with different lease/key-lease
intervals.
- Verification of per-service lease values on the SRP server.
- Ensuring key-lease is always at least as long as the lease.
- Validating lease renewal and expiry behaviors.
- Testing dynamic changes to default client lease and TTL.
Migrating to Nexus allows for faster and more scalable network
simulations within a single process.
This commit migrates the srp_client_save_server_info test from the
thread-cert Python-based test framework to the Nexus C++ simulation
framework.
The new Nexus test (test_srp_client_save_server_info.cpp) verifies:
- SRP client selects an SRP server when auto-start is enabled.
- SRP client sticks to the current server even if other SRP servers
become available.
- SRP client saves and reuses the selected server info across SRP
client stops and restarts.
- SRP client selects a new server if the current one becomes
unavailable.
- SRP client sticks to the new server even if the old one returns.
The original Python test script is removed as its functionality is
now fully covered by the new Nexus test.
This commit migrates the test_srp_register_500_services.py test from
the thread-cert test suite to the Nexus platform.
The new C++ test (tests/nexus/test_srp_scale.cpp) implements the same
functionality: it verifies that 25 SRP clients (13 routers and 12
FEDs) can successfully register a total of 500 services (20 services
per client) with a single SRP server (the leader).
The commit includes:
- Removal of the original Python test file.
- Addition of the new Nexus C++ test file.
- Integration of the new test into CMakeLists.txt and
run_nexus_tests.sh.
This commit migrates the SRP client host removal test from the
thread-cert Python-based framework to the Nexus framework.
The new C++ implementation in tests/nexus/test_srp_client_remove_host.cpp
covers the same scenarios as the original Python script:
- Successful registration of SRP host and services.
- Verification that ClearHostAndServices() does not immediately remove
server-side state.
- Verification that RemoveHostAndServices(removeKey=False,
sendUnregToServer=True) marks the host and services as deleted on the
SRP server.
- Verification that RemoveHostAndServices(removeKey=True,
sendUnregToServer=True) fully removes the host and service entries
from the SRP server.
The original Python script test_srp_client_remove_host.py is removed
as its functionality is now fully covered by the Nexus test.
This commit migrates the test_srp_many_services_mtu_check.py from
tests/scripts/thread-cert to the Nexus test framework.
The new test, tests/nexus/test_srp_many_services_mtu_check.cpp,
verifies that the SRP client correctly handles and splits SRP Update
messages when registering a large number of services that exceed
the IPv6 MTU size (1280 bytes).
Changes:
- Added tests/nexus/test_srp_many_services_mtu_check.cpp.
- Updated tests/nexus/CMakeLists.txt to include the new test.
- Removed tests/scripts/thread-cert/test_srp_many_services_mtu_check.py.
This commit stabilizes the Nexus reed_address_solicit_rejected test by
increasing the wait time for network data synchronization from 5 seconds
to 15 seconds.
The test was occasionally failing because the 5-second wait was
sometimes insufficient for the REED's service registration to reach the
leader and for the updated network data to be broadcast back to the
REED. Increasing the delay to 15 seconds provides more robust buffer for
these network events.
Verified by running the test 50 times in a loop without failures.
This commit migrates the `test_mle_msg_key_seq_jump.py` cert test to the
Nexus simulation framework.
The new Nexus test `test_mle_msg_key_seq_jump.cpp` verifies that nodes
can correctly handle jumps in the MLE key sequence and stay attached to
the network. It covers scenarios like child triggering key sequence
updates via Child Update Request and routers propagating key sequence
updates.
The original Python test script is removed as its functionality is now
fully covered by the new Nexus test.
This commit migrates the 'test_srp_client_change_lease.py' cert test
to the Nexus simulation framework.
The new Nexus test ('test_srp_client_change_lease.cpp') verifies:
- SRP registration with default lease and TTL.
- Updating the lease interval and ensuring it is reflected in SRP
Update messages.
- Updating the TTL and ensuring it is reflected in SRP Update
messages.
- Setting the TTL to 0 and ensuring the lease interval is used as
the TTL in SRP Update messages.
The original Python test script is removed as its functionality is
now fully covered by the new Nexus test.
This commit stabilizes the Nexus SRP auto-start test by increasing
the synchronization wait time from 20 seconds to 30 seconds.
The test was occasionally failing in the Nexus environment because
the 20-second wait was sometimes insufficient for the SRP server
registration to fully propagate through the network data and for
the SRP client to process the update and complete its server
selection. Increasing the wait time to 30 seconds provides a more
robust buffer for these network synchronization events.
Verified by running the test 100 times in a loop without failures.
This commit migrates the `test_ipv6_fragmentation.py` cert test to the
Nexus simulation framework.
To support this migration, the Nexus core configuration was updated to
enable IPv6 fragmentation (`OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE`).
The new Nexus test `test_ipv6_fragmentation.cpp` covers the validation
of IPv6 fragmentation and reassembly. It sends large ICMPv6 Echo
Requests exceeding the 1280-byte MTU between a Leader and a Router:
- 1952 bytes payload from Leader to Router
- 1831 bytes payload from Router to Leader
The original Python test script is removed as its functionality is now
fully covered by the new Nexus test.
This commit updates the `RouterIdSet` class, renaming it to
`RouterIdMask` and expanding it to encapsulate both the router ID
sequence number and the bitmask. This allows simplifying the
definition of `ThreadRouterMaskTlv` and `RouteTlv`.
This commit simplifies the `TimeParameterTlv` implementation by
defining a `TimeParameterTlvValue` and using the `SimpleTlvInfo`
template to define `TimeParameterTlv`.
This commit migrates the SRP auto-start test from the Python-based
thread-cert test suite to the Nexus C++ test framework.
The new Nexus test replicates the logic of the original Python test:
- Forms a network with four router nodes.
- Verifies SRP client auto-start upon server discovery in netdata.
- Tests selection priority between multiple unicast and anycast
SRP servers.
- Verifies selection based on anycast sequence numbers.
- Tests selection of specific unicast addresses published in
Service Data.
- Confirms automatic failover and client stop/restart.
The original Python test file is removed as it is now covered by
the Nexus test suite.
This commit migrates the functionality of
tests/scripts/thread-cert/test_netdata_publisher.py to a new Nexus
test tests/nexus/test_netdata_publisher.cpp.
The new Nexus test covers:
- DNS/SRP Anycast entries (equal and different version numbers).
- DNS/SRP Unicast entries (service data and server data).
- Displacement of server data unicast by anycast entries.
- Publisher preference logic for DNS/SRP services.
- On-mesh prefix publisher preference and replacement.
- External route publisher preference and replacement.
Other changes:
- Add netdata_publisher to tests/nexus/CMakeLists.txt.
- Add netdata_publisher to default tests in tests/nexus/run_nexus_tests.sh.
- Remove the old tests/scripts/thread-cert/test_netdata_publisher.py.
This commit migrates the cert test script to the Nexus simulation
framework.
The new Nexus test covers:
- Initial key sequence counter and default key switch guard time.
- Dynamic updates of the key rotation time via Operational Dataset
and verification of the 93% guard time calculation rule.
- Automatic key rotation after the rotation time interval expires.
- Verification that the key switch guard time correctly prevents
nodes from updating their key sequence counter prematurely when
receiving MLE messages with a higher sequence.
- Continued communication (ICMP Echo) between nodes even when key
sequences are temporarily mismatched due to the guard timer.
The original Python test script is removed as its functionality is
now fully covered by the new Nexus test.
This commit fixes an intermittent failure in the Nexus test
'dns_client_config_auto_start'. The test was occasionally failing
because the REED node was not upgrading to the Router role within
the previous 15-second stabilization period.
The Router role transition can take up to 120 seconds due to the
default 'ROUTER_SELECTION_JITTER' parameter. This commit increases
'kStabilizationTime' to 200 seconds to ensure the node has ample
time to become a router before the test proceeds to verify its
DNS configuration.
Make `otPlatLogOutput()` `OT_TOOL_WEAK` in `cli_logging.cpp` so that
applications can provide their own strong definition to customize
instance-aware log output behaviour.
This commit migrates the 'test_mac_scan.py' cert test to the Nexus
simulation framework.
The new Nexus test 'test_mac_scan.cpp' verifies the IEEE 802.15.4
Active Scan (MAC scan) functionality. It forms a simple network
consisting of a Leader and a Router and performs an active scan
from the Leader to ensure it correctly discovers the Router's
beacon.
The original Python test script is removed as its functionality is
now fully covered by the new Nexus test.
This commit migrates the dns_client_config_auto_start test from the
thread-cert Python-based test framework to the Nexus C++ simulation
framework.
The new Nexus test (test_dns_client_config_auto_start.cpp) verifies:
- DNS client uses the SRP server address automatically when no
explicit config is set.
- Explicitly set DNS config takes precedence over auto-discovered
SRP server address.
- Clearing an explicit DNS config allows the client to fall back to
the auto-discovered SRP server address.
- DNS client updates its default config when the SRP server changes.
Changes:
- Added tests/nexus/test_dns_client_config_auto_start.cpp
- Updated tests/nexus/CMakeLists.txt to build the new test
- Updated tests/nexus/run_nexus_tests.sh to include it in default
- Removed tests/scripts/thread-cert/test_dns_client_config_auto_start.py
This commit migrates the functional test for child supervision from
the thread-cert Python-based framework to the Nexus framework.
The original test in 'tests/scripts/thread-cert/test_child_supervision.py'
has been removed and replaced with a C++ implementation in
'tests/nexus/test_child_supervision.cpp'.
The new Nexus test covers:
- Verification of initial child supervision interval on parent and child.
- Dynamically updating the supervision interval and check timeout.
- Behavior when supervision messages are blocked (child detaching).
- Verification of connectivity when child supervision is disabled.
- Handling of zero supervision interval.
'tests/nexus/CMakeLists.txt' is updated to include the new test.
This commit migrates the 'test_reed_address_solicit_rejected.py' test
from the thread-cert suite to the Nexus test framework.
The new Nexus test 'test_reed_address_solicit_rejected.cpp' covers:
- Verification that a REED node can successfully register a service and
receive the corresponding Service ALOC (0xfc10).
- Verification that when a REED node's attempt to upgrade to a router
is rejected by the Leader, it correctly remains a child while
maintaining its Service ALOC.
The original Python script is removed as its functionality is now
fully covered by the Nexus implementation.
This commit migrates the functionality of the Python-based certification
test 'test_br_upgrade_router_role.py' to a new Nexus-based C++ test
'test_br_upgrade_router_role.cpp'.
The test verifies that Border Routers (BRs) providing IP connectivity
are eligible to request a router role upgrade even when the active
router count already meets the 'router_upgrade_threshold'.
Key test steps:
- Set router upgrade threshold to 2.
- Ensure three BRs remain in child role when 2 routers already exist.
- Verify BRs upgrade to router role when they provide external routes
or prefixes, up to the limit of 2 BR routers.
- Verify that a third BR providing external routes remains a child.
- Verify that removing a route from one BR router triggers the child BR
to upgrade to a router.
The Python test is removed as it is now covered by the Nexus test.
Set the RSSI field in simulated MAC ACK frames in nexus_core.cpp.
Previously, the simulator did not populate the mRssi field in the
mInfo.mRxInfo structure of simulated ACK frames passed to
otPlatRadioTxDone. This caused OpenThread to ignore the RSSI of ACKs,
preventing the parentRss average from updating on successful data polls
from Sleepy End Devices (SEDs).
Now, the RSSI from the parent to the child is calculated using the radio
model and clamped to int8_t before being assigned to the ACK frame.
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.
This commit migrates the `test_ipv6_source_selection.py` cert test to
the Nexus simulation framework.
To support this migration, the Nexus framework was extended to allow
verifying the local (source) address on which an ICMP Echo Reply is
received. This is achieved by adding an overload to
`SendAndVerifyEchoRequest` that accepts an expected source address.
The new Nexus test `test_ipv6_source_selection.cpp` covers the
following scenarios:
- RLOC source for RLOC destination
- ML-EID source for ALOC destination
- ML-EID source for ML-EID destination
- Link-local source for Link-local destination
- ML-EID source for Realm-local multicast destination (ff03::1)
- GUA source for GUA destination
- GUA source for external address (via default route)
The original Python test script is removed as its functionality is now
fully covered by the new Nexus test.
Refine the event suppression logic in nexus_core.cpp when handling
NeighborTable::kChildRemoved events.
Previously, any valid neighbor found would suppress the event. Now, it
only suppresses the event if the node is found in the Router table.
This ensures that removal events for Sleepy End Devices (SEDs) are not
suppressed, allowing the link to disappear in the visualizer as
expected.
This commit fixes a compiler warning in nexus_radio.cpp where the
aFrame parameter in otPlatRadioTransmit was considered unused in
non-debug builds. The variable is only used within an OT_ASSERT.
Using OT_UNUSED_VARIABLE is the standard OpenThread pattern to
address unused parameters and ensure clean builds across different
compilers and build configurations.
This commit migrates the certification test for router downgrade on
security policy change from a Python script to the Nexus test framework.
The original test was test_router_downgrade_on_sec_policy_change.py in
tests/scripts/thread-cert.
The new Nexus test test_router_downgrade_on_sec_policy_change.cpp
replicates the original test scenario:
- Forms a network with a Leader and a Router.
- Verifies that both nodes are in the expected router/leader roles.
- Changes the security policy to disable 'R' bit (routers) and sets the
version threshold to 7.
- Verifies that the Leader and Router do not immediately downgrade,
respecting the mandatory 10-second delay.
- Verifies that restoring the original security policy before the
timeout cancels the pending downgrade.
- Verifies that re-applying the security policy change leads to both
nodes eventually downgrading to the detached state once the version
threshold and router disable flags are propagated and the timer
expires.
Migrating to Nexus provides faster execution using virtual time and a
more integrated environment for debugging core Thread logic.
This commit addresses intermittent failures in Nexus tests 1_4_DNS_TC_1,
1_4_DNS_TC_5, 1_4_PIC_TC_1, 1_4_PIC_TC_3, and 1_4_PIC_TC_4.
The issue was caused by the 'ed1' node occasionally upgrading its role
from an End Device to a Router. When 'ed1' became a router, it would
sometimes use its Routing Locator (RLOC) as the source address for DNS
queries, whereas the verification scripts expected its Mesh Local
Endpoint Identifier (MLEID), leading to packet verification failures.
To resolve this, 'ed1' is now explicitly joined as a Full End Device
(FED) using 'Node::kAsFed' instead of the default Full Thread Device
(FTD) mode. This prevents 'ed1' from becoming a router and ensures it
maintains its End Device role throughout the test, providing stable
addressing for verification.