[Devel] [PATCH vz10 12/12] selftests: net: fib_nexthops.sh: do not count skipped tests as failures

Aleksei Oladko aleksey.oladko at virtuozzo.com
Wed Dec 17 00:04:24 MSK 2025


The fib_nexthops.sh kselftest maintains counters for passed and failed
tests, but skipped tests are currently included in the failure count.
As a result, the overall test is reported as failed whenever at least
one test case is skipped.

Fix the result accounting so that only actual test failures are
counted as failures.

https://virtuozzo.atlassian.net/browse/VSTOR-120995

Signed-off-by: Aleksei Oladko <aleksey.oladko at virtuozzo.com>
---
 tools/testing/selftests/net/fib_nexthops.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/net/fib_nexthops.sh b/tools/testing/selftests/net/fib_nexthops.sh
index 77c83d9508d3..f8b2efb0882e 100755
--- a/tools/testing/selftests/net/fib_nexthops.sh
+++ b/tools/testing/selftests/net/fib_nexthops.sh
@@ -76,11 +76,11 @@ log_test()
 		printf "TEST: %-60s  [ OK ]\n" "${msg}"
 		nsuccess=$((nsuccess+1))
 	else
-		ret=1
-		nfail=$((nfail+1))
 		if [[ $rc -eq $ksft_skip ]]; then
 			printf "TEST: %-60s  [SKIP]\n" "${msg}"
 		else
+			ret=1
+			nfail=$((nfail+1))
 			printf "TEST: %-60s  [FAIL]\n" "${msg}"
 		fi
 
-- 
2.43.0



More information about the Devel mailing list