Skip to content

Commit

Permalink
selftests: forwarding: lib: Add ping6_, ping_test_fails()
Browse files Browse the repository at this point in the history
Add two helpers to run a ping test that succeeds when the pings themselves
fail.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Danielle Ratson <danieller@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Petr Machata authored and David S. Miller committed Jul 14, 2023
1 parent a5b5269 commit 5f44a71
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tools/testing/selftests/net/forwarding/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1215,6 +1215,15 @@ ping_test()
log_test "ping$3"
}

ping_test_fails()
{
RET=0

ping_do $1 $2
check_fail $?
log_test "ping fails$3"
}

ping6_do()
{
local if_name=$1
Expand All @@ -1237,6 +1246,15 @@ ping6_test()
log_test "ping6$3"
}

ping6_test_fails()
{
RET=0

ping6_do $1 $2
check_fail $?
log_test "ping6 fails$3"
}

learning_test()
{
local bridge=$1
Expand Down

0 comments on commit 5f44a71

Please sign in to comment.