[nexus] add error handling to SetRouterEligible calls (#12390)

Adds SuccessOrQuit() around SetRouterEligible() calls in Nexus tests to
properly handle potential errors and ensure test robustness.

Summary of changes:
- Modified tests/nexus/test_5_1_8.cpp, test_5_1_9.cpp, test_5_1_10.cpp,
  and test_5_1_11.cpp to wrap SetRouterEligible(false) calls in SuccessOrQuit().
- Verified that tests build and pass correctly with these changes.
This commit is contained in:
Jonathan Hui
2026-02-07 17:38:34 -08:00
committed by GitHub
parent 47e9bf7319
commit c0090877ae
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ void Test5_1_10(void)
* - Version TLV
*/
dut.Get<Mle::Mle>().SetRouterEligible(false);
SuccessOrQuit(dut.Get<Mle::Mle>().SetRouterEligible(false));
dut.Join(leader);
/**
+1 -1
View File
@@ -186,7 +186,7 @@ void Test5_1_11(void)
* - Scan Mask TLV = 0x80 (active Routers)
* - Version TLV
*/
dut.Get<Mle::Mle>().SetRouterEligible(false);
SuccessOrQuit(dut.Get<Mle::Mle>().SetRouterEligible(false));
dut.Join(leader);
Log("---------------------------------------------------------------------------------------");
+1 -1
View File
@@ -176,7 +176,7 @@ void Test5_1_8(void)
* - Scan Mask TLV = 0x80 (Active Routers)
* - Version TLV
*/
dut.Get<Mle::Mle>().SetRouterEligible(false);
SuccessOrQuit(dut.Get<Mle::Mle>().SetRouterEligible(false));
dut.Join(router3, Node::kAsFed); // We use router3 as the dataset source, but it will scan and find all
Log("---------------------------------------------------------------------------------------");
+1 -1
View File
@@ -187,7 +187,7 @@ void Test5_1_9(void)
* - Version TLV
*/
Log("Step 3: Router_2 (DUT) begins attach process");
dut.Get<Mle::Mle>().SetRouterEligible(false);
SuccessOrQuit(dut.Get<Mle::Mle>().SetRouterEligible(false));
dut.Join(reed1); // reed1 is just a placeholder here, it will scan.
/**