Skip to contentSkip to conversation

selftests: rtnetlink: print device info on preferred_lft test failure

PATCH Applied Hangbin Liu 2 participants 2 messages Aug 19, 2025 – Aug 21, 2025

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

PATCH 1/1 selftests: rtnetlink: print device info on preferred_lft test failure

Even with slowwait used to avoid system sleep in the preferred_lft test, failures can still occur after long runtimes.

Print the device address info when the test fails to provide better troubleshooting data.

---
 tools/testing/selftests/net/rtnetlink.sh | 2 ++
 1 file changed, 2 insertions(+)
tools/testing/selftests/net/rtnetlink.sh +2 -0
index d6c00efeb664..91b0f6cae04d 100755
@@ -313,6 +313,8 @@ kci_test_addrlft()
 
 	slowwait 5 check_addr_not_exist "$devdummy" "10.23.11."
 	if [ $? -eq 1 ]; then
+		# troubleshoot the reason for our failure
+		run_cmd ip addr show dev "$devdummy"
 		check_err 1
 		end_test "FAIL: preferred_lft addresses remaining"
 		return
Signature · 1 line
2.50.1
#1 lore raw
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 9 lines · On Tue, 19 Aug 2025 07:47:49 +0000 you wrote:

Even with slowwait used to avoid system sleep in the preferred_lft test, failures can still occur after long runtimes.

Print the device address info when the test fails to provide better troubleshooting data.

[...]

Here is the summary with links:
- [net-next] selftests: rtnetlink: print device info on preferred_lft test failure

    https://git.kernel.org/netdev/net-next/c/781bf2cc0616

You are awesome, thank you!

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