]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: forwarding: lib: Split setup_wait()
authorPetr Machata <petrm@nvidia.com>
Wed, 25 Jun 2025 10:41:23 +0000 (12:41 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Jun 2025 00:53:07 +0000 (17:53 -0700)
commitb7863babce0a7aacb252e50d75b192476aa81ea1
tree458c9c6a1dd7e9d6803c035d600059fd6e9e708f
parent040ae95a984f04afa5d300a97d11643a1577aa72
selftests: forwarding: lib: Split setup_wait()

setup_wait() takes an optional argument and then is called from the top
level of the test script. That confuses shellcheck, which thinks that maybe
the intention is to pass $1 of the script to the function, which is never
the case. To avoid having to annotate every single new test with a SC
disable, split the function in two: one that takes a mandatory argument,
and one that takes no argument at all.

Convert the two existing users of that optional argument, both in Spectrum
resource selftest, to use the new form. Clean up vxlan_bridge_1q_mc_ul.sh
to not pass a now-unused argument.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Link: https://patch.msgid.link/8e13123236fe3912ae29bc04a1528bdd8551da1f.1750847794.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh
tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh
tools/testing/selftests/net/forwarding/lib.sh
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh