Skip to contentSkip to conversation

selftests: net: arp_ndisc_evict_nocarrier: propagate the last test failure

PATCH Applied Omokefe Emmanuel Onanaroghene 3 participants 3 messages Nov 15 – Nov 19

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: net: arp_ndisc_evict_nocarrier: propagate the last test failure

run_arp_evict_nocarrier_disabled_all() reports mismatches with a "failed" line but never sets ret, so the script exits 0 even when the all.arp_evict_nocarrier=0 test fails. The 2023 bulk fix wired the other five test functions and missed this one; the v6 twin (run_ndisc_evict_nocarrier_disabled_all) already sets ret=1. Set ret=1 on mismatch.

Fixes 1856628baa170 ("selftests: net: return non-zero for failures reported in arp_ndisc_evict_nocarrier")
---
 tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh +1 -0
index 00758f00efbfa..4afb953a3e479 100755
@@ -139,6 +139,7 @@ run_arp_evict_nocarrier_disabled_all() {
         echo "ok"
     else
         echo "failed"
+        ret=1
     fi
 
     cleanup_v4
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 28 lines · Omokefe Emmanuel Onanaroghene

run_arp_evict_nocarrier_disabled_all() reports mismatches with a "failed" line but never sets ret, so the script exits 0 even when the all.arp_evict_nocarrier=0 test fails. The 2023 bulk fix wired the other five test functions and missed this one; the v6 twin (run_ndisc_evict_nocarrier_disabled_all) already sets ret=1. Set ret=1 on mismatch.

Fixes 1856628baa170 ("selftests: net: return non-zero for failures reported in arp_ndisc_evict_nocarrier")
---
 tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/net/arp_ndisc_evict_nocarrier.sh +1 -0
index 00758f00efbfa..4afb953a3e479 100755
@@ -139,6 +139,7 @@ run_arp_evict_nocarrier_disabled_all() {
         echo "ok"
     else
         echo "failed"
+        ret=1
     fi
 
     cleanup_v4
Signature · 1 line
2.43.0
#2 lore raw
In reply to Omokefe Emmanuel Onanaroghene
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Sun, 15 Nov 2026 23:23:51 +0100 you wrote:

run_arp_evict_nocarrier_disabled_all() reports mismatches with a "failed" line but never sets ret, so the script exits 0 even when the all.arp_evict_nocarrier=0 test fails. The 2023 bulk fix wired the other five test functions and missed this one; the v6 twin (run_ndisc_evict_nocarrier_disabled_all) already sets ret=1. Set ret=1 on mismatch.

[...]

Here is the summary with links:
- [net] selftests: net: arp_ndisc_evict_nocarrier: propagate the last test failure

    https://git.kernel.org/netdev/net-next/c/3873583557dc

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html