Commit 388b2d98 authored by Petr Machata's avatar Petr Machata Committed by David S. Miller

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: default avatarPetr Machata <petrm@nvidia.com>
Reviewed-by: default avatarDanielle Ratson <danieller@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d361d78f
...@@ -150,34 +150,27 @@ test_span_gre_tos_fixed() ...@@ -150,34 +150,27 @@ test_span_gre_tos_fixed()
test_span_failable() test_span_failable()
{ {
local should_fail=$1; shift
local tundev=$1; shift local tundev=$1; shift
local what=$1; shift local what=$1; shift
RET=0 RET=0
mirror_install $swp1 ingress $tundev "matchall" mirror_install $swp1 ingress $tundev "matchall"
if ((should_fail)); then fail_test_span_gre_dir $tundev
fail_test_span_gre_dir $tundev
else
quick_test_span_gre_dir $tundev
fi
mirror_uninstall $swp1 ingress mirror_uninstall $swp1 ingress
log_test "$what: should_fail=$should_fail" log_test "fail $what"
} }
test_failable() test_failable()
{ {
local should_fail=$1; shift test_span_failable gt6-key "mirror to keyful gretap"
test_span_failable gt6-soft "mirror to gretap w/ soft underlay"
test_span_failable $should_fail gt6-key "mirror to keyful gretap"
test_span_failable $should_fail gt6-soft "mirror to gretap w/ soft underlay"
} }
test_hw() test_hw()
{ {
test_failable 1 test_failable
test_span_gre_tos_fixed gt4 gretap "mirror to gretap" test_span_gre_tos_fixed gt4 gretap "mirror to gretap"
test_span_gre_tos_fixed gt6 ip6gretap "mirror to ip6gretap" test_span_gre_tos_fixed gt6 ip6gretap "mirror to ip6gretap"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment