selftests: fib_nexthops: Make the test more robust
Subsystems (4)
PATCH 1/1 selftests: fib_nexthops: Make the test more robust
Rarely some of the test cases fail. Make the test more robust by increasing the timeout of ping commands to 5 seconds.
--- tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)
tools/testing/selftests/net/fib_nexthops.sh +24 -24
@@ -882,13 +882,13 @@ ipv6_fcnal_runtime() log_test $? 0 "Route delete" run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping with nexthop" run_cmd "$IP nexthop add id 82 via 2001:db8:92::2 dev veth3" run_cmd "$IP nexthop add id 122 group 81/82" run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 122" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping - multipath" #
@@ -896,26 +896,26 @@ ipv6_fcnal_runtime() # run_cmd "$IP -6 nexthop add id 83 blackhole" run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 83" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 2 "Ping - blackhole" run_cmd "$IP nexthop replace id 83 via 2001:db8:91::2 dev veth1" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping - blackhole replaced with gateway" run_cmd "$IP -6 nexthop replace id 83 blackhole" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 2 "Ping - gateway replaced by blackhole" run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 122" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" if [ $? -eq 0 ]; then run_cmd "$IP nexthop replace id 122 group 83" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 2 "Ping - group with blackhole" run_cmd "$IP nexthop replace id 122 group 81/82" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping - group blackhole replaced with gateways" else log_test 2 0 "Ping - multipath failed"
@@ -1003,10 +1003,10 @@ ipv6_fcnal_runtime() run_cmd "$IP nexthop add id 92 via 2001:db8:92::2 dev veth3" run_cmd "$IP nexthop add id 93 group 91/92" run_cmd "$IP -6 ro add default nhid 91" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Nexthop with default route and rpfilter" run_cmd "$IP -6 ro replace default nhid 93" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Nexthop with multipath default route and rpfilter" # TO-DO:
@@ -1460,13 +1460,13 @@ ipv4_fcnal_runtime() # run_cmd "$IP nexthop replace id 21 via 172.16.1.2 dev veth1" run_cmd "$IP ro replace 172.16.101.1/32 nhid 21" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Basic ping" run_cmd "$IP nexthop replace id 22 via 172.16.2.2 dev veth3" run_cmd "$IP nexthop add id 122 group 21/22" run_cmd "$IP ro replace 172.16.101.1/32 nhid 122" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - multipath" run_cmd "$IP ro delete 172.16.101.1/32 nhid 122"
@@ -1477,7 +1477,7 @@ ipv4_fcnal_runtime() run_cmd "$IP nexthop add id 501 via 172.16.1.2 dev veth1" run_cmd "$IP ro add default nhid 501" run_cmd "$IP ro add default via 172.16.1.3 dev veth1 metric 20" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - multiple default routes, nh first" # flip the order
@@ -1486,7 +1486,7 @@ ipv4_fcnal_runtime() run_cmd "$IP ro add default via 172.16.1.2 dev veth1 metric 20" run_cmd "$IP nexthop replace id 501 via 172.16.1.3 dev veth1" run_cmd "$IP ro add default nhid 501 metric 20" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - multiple default routes, nh second" run_cmd "$IP nexthop delete nhid 501"
@@ -1497,26 +1497,26 @@ ipv4_fcnal_runtime() # run_cmd "$IP nexthop add id 23 blackhole" run_cmd "$IP ro replace 172.16.101.1/32 nhid 23" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 2 "Ping - blackhole" run_cmd "$IP nexthop replace id 23 via 172.16.1.2 dev veth1" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - blackhole replaced with gateway" run_cmd "$IP nexthop replace id 23 blackhole" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 2 "Ping - gateway replaced by blackhole" run_cmd "$IP ro replace 172.16.101.1/32 nhid 122" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" if [ $? -eq 0 ]; then run_cmd "$IP nexthop replace id 122 group 23" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 2 "Ping - group with blackhole" run_cmd "$IP nexthop replace id 122 group 21/22" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - group blackhole replaced with gateways" else log_test 2 0 "Ping - multipath failed"
@@ -1543,7 +1543,7 @@ ipv4_fcnal_runtime() run_cmd "$IP nexthop add id 24 via ${lladdr} dev veth1" set +e run_cmd "$IP ro replace 172.16.101.1/32 nhid 24" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "IPv6 nexthop with IPv4 route" $IP neigh sh | grep -q "${lladdr} dev veth1"
@@ -1567,11 +1567,11 @@ ipv4_fcnal_runtime() check_route "172.16.101.1" "172.16.101.1 nhid 101 nexthop via inet6 ${lladdr} dev veth1 weight 1 nexthop via 172.16.1.2 dev veth1 weight 1" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "IPv6 nexthop with IPv4 route" run_cmd "$IP ro replace 172.16.101.1/32 via inet6 ${lladdr} dev veth1" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "IPv4 route with IPv6 gateway" $IP neigh sh | grep -q "${lladdr} dev veth1"
@@ -1588,7 +1588,7 @@ ipv4_fcnal_runtime() run_cmd "$IP ro del 172.16.101.1/32 via inet6 ${lladdr} dev veth1" run_cmd "$IP -4 ro add default via inet6 ${lladdr} dev veth1" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "IPv4 default route with IPv6 gateway" #
Signature · 1 line
2.35.1
+ David Ahern
Quoted 184 lines
-----Original Message-----
From: Amit Cohen <[email protected]>
Sent: Thursday, May 12, 2022 4:12 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; mlxsw <[email protected]>; Amit Cohen <[email protected]>
Subject: [PATCH net-next] selftests:fib_nexthops: Make the test more robustRarely some of the test cases fail. Make the test more robust by increasing the timeout of ping commands to 5 seconds.
Signed-off-by Amit Cohen <[email protected]>--- tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)tools/testing/selftests/net/fib_nexthops.sh +21
-21@@ -882,13 +882,13 @@ ipv6_fcnal_runtime() log_test $? 0 "Route delete" run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping with nexthop" run_cmd "$IP nexthop add id 82 via 2001:db8:92::2 dev veth3" run_cmd "$IP nexthop add id 122 group 81/82" run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 122" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping - multipath" #@@ -896,26 +896,26 @@ ipv6_fcnal_runtime() # run_cmd "$IP -6 nexthop add id 83 blackhole" run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 83" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 2 "Ping - blackhole" run_cmd "$IP nexthop replace id 83 via 2001:db8:91::2 dev veth1" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping - blackhole replaced with gateway" run_cmd "$IP -6 nexthop replace id 83 blackhole" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 2 "Ping - gateway replaced by blackhole" run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 122" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" if [ $? -eq 0 ]; then run_cmd "$IP nexthop replace id 122 group 83" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 2 "Ping - group with blackhole" run_cmd "$IP nexthop replace id 122 group 81/82" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping - group blackhole replaced with gateways" else log_test 2 0 "Ping - multipath failed"@@ -1003,10 +1003,10 @@ ipv6_fcnal_runtime() run_cmd "$IP nexthop add id 92 via 2001:db8:92::2 dev veth3" run_cmd "$IP nexthop add id 93 group 91/92" run_cmd "$IP -6 ro add default nhid 91" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Nexthop with default route and rpfilter" run_cmd "$IP -6 ro replace default nhid 93" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Nexthop with multipath default route and rpfilter" # TO-DO:@@ -1460,13 +1460,13 @@ ipv4_fcnal_runtime() # run_cmd "$IP nexthop replace id 21 via 172.16.1.2 dev veth1" run_cmd "$IP ro replace 172.16.101.1/32 nhid 21" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Basic ping" run_cmd "$IP nexthop replace id 22 via 172.16.2.2 dev veth3" run_cmd "$IP nexthop add id 122 group 21/22" run_cmd "$IP ro replace 172.16.101.1/32 nhid 122" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - multipath" run_cmd "$IP ro delete 172.16.101.1/32 nhid 122"@@ -1477,7 +1477,7 @@ ipv4_fcnal_runtime() run_cmd "$IP nexthop add id 501 via 172.16.1.2 dev veth1" run_cmd "$IP ro add default nhid 501" run_cmd "$IP ro add default via 172.16.1.3 dev veth1 metric 20" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - multiple default routes, nh first" # flip the order@@ -1486,7 +1486,7 @@ ipv4_fcnal_runtime() run_cmd "$IP ro add default via 172.16.1.2 dev veth1 metric 20" run_cmd "$IP nexthop replace id 501 via 172.16.1.3 dev veth1" run_cmd "$IP ro add default nhid 501 metric 20" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - multiple default routes, nh second" run_cmd "$IP nexthop delete nhid 501"@@ -1497,26 +1497,26 @@ ipv4_fcnal_runtime() # run_cmd "$IP nexthop add id 23 blackhole" run_cmd "$IP ro replace 172.16.101.1/32 nhid 23" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 2 "Ping - blackhole" run_cmd "$IP nexthop replace id 23 via 172.16.1.2 dev veth1" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - blackhole replaced with gateway" run_cmd "$IP nexthop replace id 23 blackhole" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 2 "Ping - gateway replaced by blackhole" run_cmd "$IP ro replace 172.16.101.1/32 nhid 122" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" if [ $? -eq 0 ]; then run_cmd "$IP nexthop replace id 122 group 23" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 2 "Ping - group with blackhole" run_cmd "$IP nexthop replace id 122 group 21/22" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "Ping - group blackhole replaced with gateways" else log_test 2 0 "Ping - multipath failed"@@ -1543,7 +1543,7 @@ ipv4_fcnal_runtime() run_cmd "$IP nexthop add id 24 via ${lladdr} dev veth1" set +e run_cmd "$IP ro replace 172.16.101.1/32 nhid 24" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "IPv6 nexthop with IPv4 route" $IP neigh sh | grep -q "${lladdr} dev veth1"@@ -1567,11 +1567,11 @@ ipv4_fcnal_runtime() check_route "172.16.101.1" "172.16.101.1 nhid 101 nexthop via inet6 ${lladdr} dev veth1 weight 1 nexthop via 172.16.1.2 devveth1 weight 1"
tools/testing/selftests/net/fib_nexthops.sh +3
-4- run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "IPv6 nexthop with IPv4 route" run_cmd "$IP ro replace 172.16.101.1/32 via inet6 ${lladdr} dev veth1" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "IPv4 route with IPv6 gateway" $IP neigh sh | grep -q "${lladdr} dev veth1"@@ -1588,7 +1588,7 @@ ipv4_fcnal_runtime() run_cmd "$IP ro del 172.16.101.1/32 via inet6 ${lladdr} dev veth1" run_cmd "$IP -4 ro add default via inet6 ${lladdr} dev veth1" - run_cmd "ip netns exec me ping -c1 -w1 172.16.101.1" + run_cmd "ip netns exec me ping -c1 -w5 172.16.101.1" log_test $? 0 "IPv4 default route with IPv6 gateway" # --2.35.1
David Ahern
Reviewed-byQuoted 18 lines · Amit Cohen
+ David Ahern
Quoted 16 lines
-----Original Message-----
From: Amit Cohen <[email protected]>
Sent: Thursday, May 12, 2022 4:12 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; mlxsw <[email protected]>; Amit Cohen <[email protected]>
Subject: [PATCH net-next] selftests:fib_nexthops: Make the test more robustRarely some of the test cases fail. Make the test more robust by increasing the timeout of ping commands to 5 seconds.
Signed-off-by Amit Cohen <[email protected]>--- tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)
Shuah Khan
maintainerQuoted 3 lines · Amit Cohen
Rarely some of the test cases fail. Make the test more robust by increasing the timeout of ping commands to 5 seconds.
Can you explain why test cases fail?
Quoted 10 lines
Signed-off-by Amit Cohen <[email protected]>--- tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)tools/testing/selftests/net/fib_nexthops.sh +0
-0
tools/testing/selftests/net/fib_nexthops.sh ipv6_fcnal_runtime() · line 887
Quoted 7 lines
tools/testing/selftests/net/fib_nexthops.sh +1
-1@@ -882,13 +882,13 @@ ipv6_fcnal_runtime() log_test $? 0 "Route delete" run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping with nexthop"
Looks like the change uses "-w deadline" - "-W timeout" might be a better choice if ping fails with no response?
thanks,
-- Shuah
Quoted 10 lines
-----Original Message-----
From: Shuah Khan <[email protected]>
Sent: Thursday, May 12, 2022 5:28 PM
To: Amit Cohen <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; mlxsw <[email protected]>; Shuah Khan <[email protected]>
Subject: Re: [PATCH net-next] selftests:fib_nexthops: Make the test more robust
Quoted 6 lines
Quoted 3 lines · Amit Cohen
Rarely some of the test cases fail. Make the test more robust by increasing the timeout of ping commands to 5 seconds.
Can you explain why test cases fail?
The failures are probably caused due to slow forwarding performance.
You can see similar commit - b6a4fd680042 ("selftests: forwarding: Make ping timeout configurable").
Quoted 13 lines
Quoted 13 lines
Signed-off-by Amit Cohen <[email protected]>--- tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)tools/testing/selftests/net/fib_nexthops.sh +0
-0@@ -882,13 +882,13 @@ ipv6_fcnal_runtime() log_test $? 0 "Route delete"
Quoted 7 lines
tools/testing/selftests/net/fib_nexthops.sh ipv6_fcnal_runtime() · line 887
Quoted 5 lines
tools/testing/selftests/net/fib_nexthops.sh +1
-1run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping with nexthop"Looks like the change uses "-w deadline" - "-W timeout" might be a better choice if ping fails with no response?
We usually use "-w" in ping commands in selftests, but I can change it if you prefer "-W".
Quoted 3 lines
thanks,
-- Shuah
Shuah Khan
maintainerQuoted 11 lines · Amit Cohen
Quoted 11 lines
-----Original Message-----
From: Shuah Khan <[email protected]>
Sent: Thursday, May 12, 2022 5:28 PM
To: Amit Cohen <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; mlxsw <[email protected]>; Shuah Khan <[email protected]>
Subject: Re: [PATCH net-next] selftests:fib_nexthops: Make the test more robustOn 5/12/22 7:12 AM, Amit Cohen wrote:
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Rarely some of the test cases fail. Make the test more robust by increasing the timeout of ping commands to 5 seconds.
Can you explain why test cases fail?
The failures are probably caused due to slow forwarding performance.
You can see similar commit -b6a4fd680042("selftests: forwarding: Make ping timeout configurable").
My primary concern is that this patch simply changes the value and doesn't make it configurable. Sounds like the above commit does that. Why not use the same approach to keep it consistent.
Quoted 21 lines
Quoted 13 lines
Quoted 13 lines
Signed-off-by Amit Cohen <[email protected]>--- tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)tools/testing/selftests/net/fib_nexthops.sh +0
-0@@ -882,13 +882,13 @@ ipv6_fcnal_runtime() log_test $? 0 "Route delete"Quoted 7 lines
tools/testing/selftests/net/fib_nexthops.sh ipv6_fcnal_runtime() · line 887
Quoted 5 lines
tools/testing/selftests/net/fib_nexthops.sh +1
-1run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping with nexthop"Looks like the change uses "-w deadline" - "-W timeout" might be a better choice if ping fails with no response?
Quoted 2 lines
We usually use "-w" in ping commands in selftests, but I can change it if you prefer "-W".
I will defer to networking experts/maintainers on the choice of -w vs -W
I would like to see the timeout configurable.
thanks,
-- Shuah
Quoted 57 lines
-----Original Message-----
From: Shuah Khan <[email protected]>
Sent: Thursday, May 12, 2022 7:40 PM
To: Amit Cohen <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; mlxsw <[email protected]>; [email protected]; Shuah Khan <[email protected]>
Subject: Re: [PATCH net-next] selftests:fib_nexthops: Make the test more robustQuoted 11 lines · Amit Cohen
Quoted 11 lines
-----Original Message-----
From: Shuah Khan <[email protected]>
Sent: Thursday, May 12, 2022 5:28 PM
To: Amit Cohen <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; mlxsw <[email protected]>; Shuah Khan <[email protected]>
Subject: Re: [PATCH net-next] selftests:fib_nexthops: Make the test more robustOn 5/12/22 7:12 AM, Amit Cohen wrote:
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Rarely some of the test cases fail. Make the test more robust by increasing the timeout of ping commands to 5 seconds.
Can you explain why test cases fail?
The failures are probably caused due to slow forwarding performance.
You can see similar commit -b6a4fd680042("selftests: forwarding: Make ping timeout configurable").My primary concern is that this patch simply changes the value and doesn't make it configurable. Sounds like the above commit does that. Why not use the same approach to keep it consistent.
Quoted 21 lines
Quoted 20 lines
Quoted 11 lines
Signed-off-by Amit Cohen <[email protected]>--- tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)tools/testing/selftests/net/fib_nexthops.sh +0
-0tools/testing/selftests/net/fib_nexthops.sh ipv6_fcnal_runtime() · line 887
Quoted 7 lines
tools/testing/selftests/net/fib_nexthops.sh +1
-1@@ -882,13 +882,13 @@ ipv6_fcnal_runtime() log_test $? 0 "Route delete" run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping with nexthop"Looks like the change uses "-w deadline" - "-W timeout" might be a better choice if ping fails with no response?
Quoted 7 lines
Quoted 2 lines
We usually use "-w" in ping commands in selftests, but I can change it if you prefer "-W".
I will defer to networking experts/maintainers on the choice of -w vs -W
I would like to see the timeout configurable.
If you feel strongly about that, I can send another patch to make it configurable. Personally, I don't think that someone will use it, and from our experience, 5 seconds seems to be enough.
Quoted 3 lines
thanks,
-- Shuah
Shuah Khan
maintainerQuoted 60 lines · Amit Cohen
Quoted 60 lines
-----Original Message-----
From: Shuah Khan <[email protected]>
Sent: Thursday, May 12, 2022 7:40 PM
To: Amit Cohen <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; mlxsw <[email protected]>; [email protected]; Shuah Khan <[email protected]>
Subject: Re: [PATCH net-next] selftests:fib_nexthops: Make the test more robustQuoted 11 lines · Amit Cohen
Quoted 11 lines
-----Original Message-----
From: Shuah Khan <[email protected]>
Sent: Thursday, May 12, 2022 5:28 PM
To: Amit Cohen <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; mlxsw <[email protected]>; Shuah Khan <[email protected]>
Subject: Re: [PATCH net-next] selftests:fib_nexthops: Make the test more robustOn 5/12/22 7:12 AM, Amit Cohen wrote:
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Rarely some of the test cases fail. Make the test more robust by increasing the timeout of ping commands to 5 seconds.
Can you explain why test cases fail?
The failures are probably caused due to slow forwarding performance.
You can see similar commit -b6a4fd680042("selftests: forwarding: Make ping timeout configurable").My primary concern is that this patch simply changes the value and doesn't make it configurable. Sounds like the above commit does that. Why not use the same approach to keep it consistent.
Quoted 23 lines
Quoted 13 lines
Quoted 13 lines
Signed-off-by Amit Cohen <[email protected]>--- tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)tools/testing/selftests/net/fib_nexthops.sh +0
-0@@ -882,13 +882,13 @@ ipv6_fcnal_runtime() log_test $? 0 "Route delete"Quoted 7 lines
tools/testing/selftests/net/fib_nexthops.sh ipv6_fcnal_runtime() · line 887
Quoted 5 lines
tools/testing/selftests/net/fib_nexthops.sh +1
-1run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81" - run_cmd "ip netns exec me ping -c1 -w1 2001:db8:101::1" + run_cmd "ip netns exec me ping -c1 -w5 2001:db8:101::1" log_test $? 0 "Ping with nexthop"Looks like the change uses "-w deadline" - "-W timeout" might be a better choice if ping fails with no response?
We usually use "-w" in ping commands in selftests, but I can change it if you prefer "-W".
Quoted 8 lines
Quoted 4 lines
I will defer to networking experts/maintainers on the choice of -w vs -W
I would like to see the timeout configurable.
If you feel strongly about that, I can send another patch to make it configurable. Personally, I don't think that someone will use it, and from our experience, 5 seconds seems to be enough.
Please make this configurable. It will be consistent with other tests.
thanks,
-- Shuah
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:
Quoted 7 lines · On Thu, 12 May 2022 16:12:07 +0300 you wrote:
Rarely some of the test cases fail. Make the test more robust by increasing the timeout of ping commands to 5 seconds.
Signed-off-by Amit Cohen <[email protected]>--- tools/testing/selftests/net/fib_nexthops.sh | 48 ++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-)
Here is the summary with links:
- [net-next] selftests: fib_nexthops: Make the test more robust
https://git.kernel.org/netdev/net-next/c/49bb39bddad2
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html