Commit 5f44a714 authored by Petr Machata's avatar Petr Machata Committed by David S. Miller

selftests: forwarding: lib: Add ping6_, ping_test_fails()

Add two helpers to run a ping test that succeeds when the pings themselves
fail.
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 a5b52692
...@@ -1215,6 +1215,15 @@ ping_test() ...@@ -1215,6 +1215,15 @@ ping_test()
log_test "ping$3" log_test "ping$3"
} }
ping_test_fails()
{
RET=0
ping_do $1 $2
check_fail $?
log_test "ping fails$3"
}
ping6_do() ping6_do()
{ {
local if_name=$1 local if_name=$1
...@@ -1237,6 +1246,15 @@ ping6_test() ...@@ -1237,6 +1246,15 @@ ping6_test()
log_test "ping6$3" log_test "ping6$3"
} }
ping6_test_fails()
{
RET=0
ping6_do $1 $2
check_fail $?
log_test "ping6 fails$3"
}
learning_test() learning_test()
{ {
local bridge=$1 local bridge=$1
......
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