selftests: net: forwarding: bridge_vlan_mcast: Allow default startup query interval to vary by HZ
Subsystems (4)
PATCH 1/1 selftests: net: forwarding: bridge_vlan_mcast: Allow default startup query interval to vary by HZ
The mcast_startup_query_interval default value is calculated as 125 * HZ / 4. With CONFIG_HZ=250, this results in 3124 instead of 3125 due to integer truncation. The test currently hardcodes 3125, which fails on kernels built with CONFIG_HZ=250.
Allow a +/- 1 tolerance for the default value check to account for this rounding, while still catching genuine regressions in the default value.
--- tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh +1 -1
@@ -383,7 +383,7 @@ vlmc_startup_query_test() echo -n $goutput | jq -e ".[].vlans[] | select(.vlan == 10 and \ - .mcast_startup_query_interval == 3125) " &>/dev/null + .mcast_startup_query_interval >= 3124 and .mcast_startup_query_interval <= 3126) " &>/dev/null check_err $? "Wrong default mcast_startup_query_interval global vlan option value" log_test "Vlan mcast_startup_query_interval global option default value"
Signature · 1 line
2.53.0
Ido Schimmel
maintainerSubject prefix should be "[PATCH net-next]" given that this never worked. See:
https://docs.kernel.org/next/process/maintainer-netdev.html
Quoted 19 lines · Jin Li
The
mcast_startup_query_intervaldefault value is calculated as 125 * HZ / 4. WithCONFIG_HZ=250, this results in 3124 instead of 3125 due to integer truncation. The test currently hardcodes 3125, which fails on kernels built withCONFIG_HZ=250.Allow a +/- 1 tolerance for the default value check to account for this rounding, while still catching genuine regressions in the default value.
Signed-off-by Jin Li <[email protected]>--- tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh +0
-0
tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh vlmc_startup_query_test() · line 386
Quoted 5 lines
tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh +1
-1@@ -383,7 +383,7 @@ vlmc_startup_query_test() echo -n $goutput | jq -e ".[].vlans[] | select(.vlan == 10 and \ - .mcast_startup_query_interval == 3125) " &>/dev/null + .mcast_startup_query_interval >= 3124 and .mcast_startup_query_interval <= 3126) " &>/dev/null
Maintain the same type of indentation (tabs) as the current line and fold it:
tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh +2 -1
@@ -383,7 +383,8 @@ vlmc_startup_query_test() echo -n $goutput | jq -e ".[].vlans[] | select(.vlan == 10 and \ - .mcast_startup_query_interval == 3125) " &>/dev/null + .mcast_startup_query_interval >= 3124 and \ + .mcast_startup_query_interval <= 3126) " &>/dev/null check_err $? "Wrong default mcast_startup_query_interval global vlan option value" log_test "Vlan mcast_startup_query_interval global option default value"
PATCH v2 1/1 selftests: net: forwarding: bridge_vlan_mcast: Allow default startup query interval to vary by HZ
The mcast_startup_query_interval default value is calculated as 125 * HZ / 4. With CONFIG_HZ=250, this results in 3124 instead of 3125 due to integer truncation. The test currently hardcodes 3125, which fails on kernels built with CONFIG_HZ=250.
Allow a +/- 1 tolerance for the default value check to account for this rounding, while still catching genuine regressions in the default value.
--- tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/net/forwarding/bridge_vlan_mcast.sh +2 -1
@@ -383,7 +383,8 @@ vlmc_startup_query_test() echo -n $goutput | jq -e ".[].vlans[] | select(.vlan == 10 and \ - .mcast_startup_query_interval == 3125) " &>/dev/null + .mcast_startup_query_interval >= 3124 and \ + .mcast_startup_query_interval <= 3126) " &>/dev/null check_err $? "Wrong default mcast_startup_query_interval global vlan option value" log_test "Vlan mcast_startup_query_interval global option default value"
Signature · 1 line
2.53.0
Quoted 10 lines · Jin Li
The
mcast_startup_query_intervaldefault value is calculated as 125 * HZ / 4. WithCONFIG_HZ=250, this results in 3124 instead of 3125 due to integer truncation. The test currently hardcodes 3125, which fails on kernels built withCONFIG_HZ=250.Allow a +/- 1 tolerance for the default value check to account for this rounding, while still catching genuine regressions in the default value.
Signed-off-by Jin Li <[email protected]>
net-next is closed:
https://netdev.bots.linux.dev/net-next.html
So you will need to re-post after it re-opens.
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Thu, 22 Oct 2026 18:30:22 +0800 you wrote:
The
mcast_startup_query_intervaldefault value is calculated as 125 * HZ / 4. WithCONFIG_HZ=250, this results in 3124 instead of 3125 due to integer truncation. The test currently hardcodes 3125, which fails on kernels built withCONFIG_HZ=250.Allow a +/- 1 tolerance for the default value check to account for this rounding, while still catching genuine regressions in the default value.
[...]
Here is the summary with links:
- [net-next,v2] selftests: net: forwarding: bridge_vlan_mcast: Allow default startup query interval to vary by HZ
https://git.kernel.org/netdev/net/c/9e2ba4a17735
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html