Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: mlxsw: mirror_gre: Simplify

After the previous patch, the function test_span_failable() is always
called with should_fail=1. Drop the argument and streamline the code.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Petr Machata and committed by
David S. Miller
388b2d98 d361d78f

+5 -12
+5 -12
tools/testing/selftests/drivers/net/mlxsw/mirror_gre.sh
··· 150 150 151 151 test_span_failable() 152 152 { 153 - local should_fail=$1; shift 154 153 local tundev=$1; shift 155 154 local what=$1; shift 156 155 157 156 RET=0 158 157 159 158 mirror_install $swp1 ingress $tundev "matchall" 160 - if ((should_fail)); then 161 - fail_test_span_gre_dir $tundev 162 - else 163 - quick_test_span_gre_dir $tundev 164 - fi 159 + fail_test_span_gre_dir $tundev 165 160 mirror_uninstall $swp1 ingress 166 161 167 - log_test "$what: should_fail=$should_fail" 162 + log_test "fail $what" 168 163 } 169 164 170 165 test_failable() 171 166 { 172 - local should_fail=$1; shift 173 - 174 - test_span_failable $should_fail gt6-key "mirror to keyful gretap" 175 - test_span_failable $should_fail gt6-soft "mirror to gretap w/ soft underlay" 167 + test_span_failable gt6-key "mirror to keyful gretap" 168 + test_span_failable gt6-soft "mirror to gretap w/ soft underlay" 176 169 } 177 170 178 171 test_hw() 179 172 { 180 - test_failable 1 173 + test_failable 181 174 182 175 test_span_gre_tos_fixed gt4 gretap "mirror to gretap" 183 176 test_span_gre_tos_fixed gt6 ip6gretap "mirror to ip6gretap"