summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/drivers
diff options
context:
space:
mode:
authorAmit Cohen <amcohen@nvidia.com>2021-06-08 15:44:08 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-08 14:39:07 -0700
commit00190c2b19eb33969befb68bbbc6d00edc11bda5 (patch)
treeab1b49a8279ad0750da41b519b70144cbef64943 /tools/testing/selftests/drivers
parenta08a61934cfad0506f8ed39d605ee7cd77c2381f (diff)
downloadlinux-00190c2b19eb33969befb68bbbc6d00edc11bda5.tar.gz
linux-00190c2b19eb33969befb68bbbc6d00edc11bda5.tar.bz2
linux-00190c2b19eb33969befb68bbbc6d00edc11bda5.zip
selftests: router_scale: Do not count failed routes
To check how many routes are installed in hardware, the test runs "ip route" and greps for "offload", which includes routes with state "offload_failed". Till now, this wrong check was not found because after one failure in route insertion, the driver moved to "abort" mode, which means that user cannot try to add more routes. The previous patch removed the abort mechanism and now failed routes are counted as offloaded. Fix this by not considering routes with "offload_failed" flag as offloaded. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/drivers')
-rw-r--r--tools/testing/selftests/drivers/net/mlxsw/router_scale.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh
index e93878d42596..683759d29199 100644
--- a/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/router_scale.sh
@@ -68,7 +68,7 @@ wait_for_routes()
local t0=$1; shift
local route_count=$1; shift
- local t1=$(ip route | grep -o 'offload' | wc -l)
+ local t1=$(ip route | grep 'offload' | grep -v 'offload_failed' | wc -l)
local delta=$((t1 - t0))
echo $delta
[[ $delta -ge $route_count ]]