* [PATCH net] selftests: rtnetlink: fix addrlft test flakiness on power-saving systems
@ 2025-07-15 4:34 Hangbin Liu
2025-07-16 22:10 ` patchwork-bot+netdevbpf
2025-08-19 1:30 ` Jakub Kicinski
0 siblings, 2 replies; 5+ messages in thread
From: Hangbin Liu @ 2025-07-15 4:34 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Shuah Khan, linux-kselftest, Hangbin Liu
Jakub reported that the rtnetlink test for the preferred lifetime of an
address has become quite flaky. The issue started appearing around the 6.16
merge window in May, and the test fails with:
FAIL: preferred_lft addresses remaining
The flakiness might be related to power-saving behavior, as address
expiration is handled by a "power-efficient" workqueue.
To address this, use slowwait to check more frequently whether the address
still exists. This reduces the likelihood of the system entering a low-power
state during the test, improving reliability.
Reported-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
tools/testing/selftests/net/rtnetlink.sh | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
index 2e8243a65b50..49141254065c 100755
--- a/tools/testing/selftests/net/rtnetlink.sh
+++ b/tools/testing/selftests/net/rtnetlink.sh
@@ -291,6 +291,17 @@ kci_test_route_get()
end_test "PASS: route get"
}
+check_addr_not_exist()
+{
+ dev=$1
+ addr=$2
+ if ip addr show dev $dev | grep -q $addr; then
+ return 1
+ else
+ return 0
+ fi
+}
+
kci_test_addrlft()
{
for i in $(seq 10 100) ;do
@@ -298,9 +309,8 @@ kci_test_addrlft()
run_cmd ip addr add 10.23.11.$i/32 dev "$devdummy" preferred_lft $lft valid_lft $((lft+1))
done
- sleep 5
- run_cmd_grep_fail "10.23.11." ip addr show dev "$devdummy"
- if [ $? -eq 0 ]; then
+ slowwait 5 check_addr_not_exist "$devdummy" "10.23.11."
+ if [ $? -eq 1 ]; then
check_err 1
end_test "FAIL: preferred_lft addresses remaining"
return
--
2.46.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] selftests: rtnetlink: fix addrlft test flakiness on power-saving systems
2025-07-15 4:34 [PATCH net] selftests: rtnetlink: fix addrlft test flakiness on power-saving systems Hangbin Liu
@ 2025-07-16 22:10 ` patchwork-bot+netdevbpf
2025-08-19 1:30 ` Jakub Kicinski
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-16 22:10 UTC (permalink / raw)
To: Hangbin Liu
Cc: netdev, davem, edumazet, kuba, pabeni, horms, shuah,
linux-kselftest
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 15 Jul 2025 04:34:59 +0000 you wrote:
> Jakub reported that the rtnetlink test for the preferred lifetime of an
> address has become quite flaky. The issue started appearing around the 6.16
> merge window in May, and the test fails with:
>
> FAIL: preferred_lft addresses remaining
>
> The flakiness might be related to power-saving behavior, as address
> expiration is handled by a "power-efficient" workqueue.
>
> [...]
Here is the summary with links:
- [net] selftests: rtnetlink: fix addrlft test flakiness on power-saving systems
https://git.kernel.org/netdev/net-next/c/3047957cc7c1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] selftests: rtnetlink: fix addrlft test flakiness on power-saving systems
2025-07-15 4:34 [PATCH net] selftests: rtnetlink: fix addrlft test flakiness on power-saving systems Hangbin Liu
2025-07-16 22:10 ` patchwork-bot+netdevbpf
@ 2025-08-19 1:30 ` Jakub Kicinski
2025-08-19 1:50 ` Hangbin Liu
1 sibling, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2025-08-19 1:30 UTC (permalink / raw)
To: Hangbin Liu
Cc: netdev, David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
Shuah Khan, linux-kselftest
On Tue, 15 Jul 2025 04:34:59 +0000 Hangbin Liu wrote:
> Jakub reported that the rtnetlink test for the preferred lifetime of an
> address has become quite flaky. The issue started appearing around the 6.16
> merge window in May, and the test fails with:
>
> FAIL: preferred_lft addresses remaining
>
> The flakiness might be related to power-saving behavior, as address
> expiration is handled by a "power-efficient" workqueue.
>
> To address this, use slowwait to check more frequently whether the address
> still exists. This reduces the likelihood of the system entering a low-power
> state during the test, improving reliability.
It flaked again, after long time of being fine..
https://netdev-3.bots.linux.dev/vmksft-net/results/259361/15-rtnetlink-sh/stdout
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] selftests: rtnetlink: fix addrlft test flakiness on power-saving systems
2025-08-19 1:30 ` Jakub Kicinski
@ 2025-08-19 1:50 ` Hangbin Liu
2025-08-19 2:08 ` Jakub Kicinski
0 siblings, 1 reply; 5+ messages in thread
From: Hangbin Liu @ 2025-08-19 1:50 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
Shuah Khan, linux-kselftest
On Mon, Aug 18, 2025 at 06:30:12PM -0700, Jakub Kicinski wrote:
> On Tue, 15 Jul 2025 04:34:59 +0000 Hangbin Liu wrote:
> > Jakub reported that the rtnetlink test for the preferred lifetime of an
> > address has become quite flaky. The issue started appearing around the 6.16
> > merge window in May, and the test fails with:
> >
> > FAIL: preferred_lft addresses remaining
> >
> > The flakiness might be related to power-saving behavior, as address
> > expiration is handled by a "power-efficient" workqueue.
> >
> > To address this, use slowwait to check more frequently whether the address
> > still exists. This reduces the likelihood of the system entering a low-power
> > state during the test, improving reliability.
>
> It flaked again, after long time of being fine..
>
> https://netdev-3.bots.linux.dev/vmksft-net/results/259361/15-rtnetlink-sh/stdout
Hmm, I think we need to know what's the current preferred_lft and valid_lft
on failed test. Would you please add a debug line so we can get the info
after failed?
slowwait 5 check_addr_not_exist "$devdummy" "10.23.11."
if [ $? -eq 1 ]; then
+ ip addr show dev "$devdummy"
check_err 1
end_test "FAIL: preferred_lft addresses remaining"
return
Thanks
Hangbin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] selftests: rtnetlink: fix addrlft test flakiness on power-saving systems
2025-08-19 1:50 ` Hangbin Liu
@ 2025-08-19 2:08 ` Jakub Kicinski
0 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2025-08-19 2:08 UTC (permalink / raw)
To: Hangbin Liu
Cc: netdev, David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
Shuah Khan, linux-kselftest
On Tue, 19 Aug 2025 01:50:51 +0000 Hangbin Liu wrote:
> Hmm, I think we need to know what's the current preferred_lft and valid_lft
> on failed test. Would you please add a debug line so we can get the info
> after failed?
>
> slowwait 5 check_addr_not_exist "$devdummy" "10.23.11."
> if [ $? -eq 1 ]; then
> + ip addr show dev "$devdummy"
> check_err 1
> end_test "FAIL: preferred_lft addresses remaining"
> return
Given that this is 2nd or 3rd time we're massaging this test case
I think we should just add the appropriate debug information to the
test itself. Please post a real patch?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-19 2:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15 4:34 [PATCH net] selftests: rtnetlink: fix addrlft test flakiness on power-saving systems Hangbin Liu
2025-07-16 22:10 ` patchwork-bot+netdevbpf
2025-08-19 1:30 ` Jakub Kicinski
2025-08-19 1:50 ` Hangbin Liu
2025-08-19 2:08 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).