Skip to contentSkip to conversation

selftests: net: bridge: increase IGMP/MLD exclude timeout membership interval

PATCH Applied Nikolay Aleksandrov 3 participants 5 messages May 13, 2024 – May 15, 2024

Subsystems (5)
lore
Share & tools
lore

Nikolay Aleksandrov

author maintainer
#0 lore raw

PATCH 1/1 selftests: net: bridge: increase IGMP/MLD exclude timeout membership interval

When running the bridge IGMP/MLD selftests on debug kernels we can get spurious errors when setting up the IGMP/MLD exclude timeout tests because the membership interval is just 3 seconds and the setup has 2 seconds of sleep plus various validations, the one second that is left is not enough. Increase the membership interval from 3 to 5 seconds to make room for the setup validation and 2 seconds of sleep.

Fixes 34d7ecb3d4f7 ("selftests: net: bridge: update IGMP/MLD membership interval value")

---
Could you please validate this fixes the flakes for the netdev CI? It fixed them for me with the CI's debug kernel config. :)

 tools/testing/selftests/net/forwarding/bridge_igmp.sh | 6 +++---
 tools/testing/selftests/net/forwarding/bridge_mld.sh  | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
tools/testing/selftests/net/forwarding/bridge_igmp.sh +3 -3
index 2aa66d2a1702..e6a3e04fd83f 100755
@@ -478,10 +478,10 @@ v3exc_timeout_test()
 	RET=0
 	local X=("192.0.2.20" "192.0.2.30")
 
-	# GMI should be 3 seconds
+	# GMI should be 5 seconds
 	ip link set dev br0 type bridge mcast_query_interval 100 \
 					mcast_query_response_interval 100 \
-					mcast_membership_interval 300
+					mcast_membership_interval 500
 
 	v3exclude_prepare $h1 $ALL_MAC $ALL_GROUP
 	ip link set dev br0 type bridge mcast_query_interval 500 \
@@ -489,7 +489,7 @@ v3exc_timeout_test()
 					mcast_membership_interval 1500
 
 	$MZ $h1 -c 1 -b $ALL_MAC -B $ALL_GROUP -t ip "proto=2,p=$MZPKT_ALLOW2" -q
-	sleep 3
+	sleep 5
 	bridge -j -d -s mdb show dev br0 \
 		| jq -e ".[].mdb[] | \
 			 select(.grp == \"$TEST_GROUP\" and \
tools/testing/selftests/net/forwarding/bridge_mld.sh +3 -3
index e2b9ff773c6b..f84ab2e65754 100755
@@ -478,10 +478,10 @@ mldv2exc_timeout_test()
 	RET=0
 	local X=("2001:db8:1::20" "2001:db8:1::30")
 
-	# GMI should be 3 seconds
+	# GMI should be 5 seconds
 	ip link set dev br0 type bridge mcast_query_interval 100 \
 					mcast_query_response_interval 100 \
-					mcast_membership_interval 300
+					mcast_membership_interval 500
 
 	mldv2exclude_prepare $h1
 	ip link set dev br0 type bridge mcast_query_interval 500 \
@@ -489,7 +489,7 @@ mldv2exc_timeout_test()
 					mcast_membership_interval 1500
 
 	$MZ $h1 -c 1 $MZPKT_ALLOW2 -q
-	sleep 3
+	sleep 5
 	bridge -j -d -s mdb show dev br0 \
 		| jq -e ".[].mdb[] | \
 			 select(.grp == \"$TEST_GROUP\" and \
Signature · 1 line
2.44.0
#1 lore raw
Quoted 10 lines · Nikolay Aleksandrov
tools/testing/selftests/net/forwarding/bridge_igmp.sh +1 -1
 	$MZ $h1 -c 1 -b $ALL_MAC -B $ALL_GROUP -t ip "proto=2,p=$MZPKT_ALLOW2" -q
-	sleep 3
+	sleep 5
 	bridge -j -d -s mdb show dev br0 \
 		| jq -e ".[].mdb[] | \
 			 select(.grp == \"$TEST_GROUP\" and \
tools/testing/selftests/net/forwarding/bridge_mld.sh +0 -0
index e2b9ff773c6b..f84ab2e65754 100755

tools/testing/selftests/net/forwarding/bridge_mld.sh mldv2exc_timeout_test() · line 495

Quoted 7 lines
tools/testing/selftests/net/forwarding/bridge_mld.sh +1 -1
 
 	$MZ $h1 -c 1 $MZPKT_ALLOW2 -q
-	sleep 3
+	sleep 5
 	bridge -j -d -s mdb show dev br0 \
 		| jq -e ".[].mdb[] | \
 			 select(.grp == \"$TEST_GROUP\" and \

Maybe use a slow_wait to check the result?

Thanks
Hangbin

author maintainer
#2 lore raw
Quoted 21 lines · Hangbin Liu
Quoted 10 lines · Nikolay Aleksandrov
tools/testing/selftests/net/forwarding/bridge_igmp.sh +1 -1
 	$MZ $h1 -c 1 -b $ALL_MAC -B $ALL_GROUP -t ip "proto=2,p=$MZPKT_ALLOW2" -q
-	sleep 3
+	sleep 5
 	bridge -j -d -s mdb show dev br0 \
 		| jq -e ".[].mdb[] | \
 			 select(.grp == \"$TEST_GROUP\" and \
tools/testing/selftests/net/forwarding/bridge_mld.sh +0 -0
index e2b9ff773c6b..f84ab2e65754 100755

tools/testing/selftests/net/forwarding/bridge_mld.sh mldv2exc_timeout_test() · line 495

Quoted 7 lines
tools/testing/selftests/net/forwarding/bridge_mld.sh +1 -1
 
 	$MZ $h1 -c 1 $MZPKT_ALLOW2 -q
-	sleep 3
+	sleep 5
 	bridge -j -d -s mdb show dev br0 \
 		| jq -e ".[].mdb[] | \
 			 select(.grp == \"$TEST_GROUP\" and \

Maybe use a slow_wait to check the result?

Quoted 2 lines

Thanks
Hangbin

What would it improve? The wait is exact, we know how many seconds exactly so a plain sleep is enough and easier to backport if this is applied to -net.

#3 lore raw
Quoted 14 lines · Nikolay Aleksandrov
Quoted 14 lines

tools/testing/selftests/net/forwarding/bridge_mld.sh mldv2exc_timeout_test() · line 495

Quoted 11 lines
tools/testing/selftests/net/forwarding/bridge_mld.sh +1 -1
index e2b9ff773c6b..f84ab2e65754 100755
 
 	$MZ $h1 -c 1 $MZPKT_ALLOW2 -q
-	sleep 3
+	sleep 5
 	bridge -j -d -s mdb show dev br0 \
 		| jq -e ".[].mdb[] | \
 			 select(.grp == \"$TEST_GROUP\" and \

Maybe use a slow_wait to check the result?

Quoted 6 lines
Quoted 2 lines

Thanks
Hangbin

What would it improve? The wait is exact, we know how many seconds exactly so a plain sleep is enough and easier to backport if this is applied to -net.

I just afraid it fails on debug kernel with this exact time. If you think the time is enough. I'm OK with it.

Thanks
Hangbin

#4 lore raw
In reply to Nikolay Aleksandrov
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Mon, 13 May 2024 13:52:57 +0300 you wrote:

When running the bridge IGMP/MLD selftests on debug kernels we can get spurious errors when setting up the IGMP/MLD exclude timeout tests because the membership interval is just 3 seconds and the setup has 2 seconds of sleep plus various validations, the one second that is left is not enough. Increase the membership interval from 3 to 5 seconds to make room for the setup validation and 2 seconds of sleep.

[...]

Here is the summary with links:
- [net] selftests: net: bridge: increase IGMP/MLD exclude timeout membership interval

    https://git.kernel.org/netdev/net/c/06080ea23095

You are awesome, thank you!

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