diff options
author | Li Zhijian <zhijianx.li@intel.com> | 2021-12-03 05:32:13 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-12-03 17:17:34 +0300 |
commit | 0f8a3b48f91b8dc1f3eff06b77a63a17183fccbd (patch) | |
tree | c6932af7f07b8cc789d38f9f0d9955d66049a7a6 /tools/testing/selftests/net/fcnal-test.sh | |
parent | dac8e00fb640e9569cdeefd3ce8a75639e5d0711 (diff) | |
download | linux-0f8a3b48f91b8dc1f3eff06b77a63a17183fccbd.tar.xz |
selftests: net/fcnal-test.sh: add exit code
Previously, the selftest framework always treats it as *ok* even though
some of them are failed actually. That's because the script always
returns 0.
It supports PASS/FAIL/SKIP exit code now.
CC: Philip Li <philip.li@intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Li Zhijian <zhijianx.li@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/net/fcnal-test.sh')
-rwxr-xr-x | tools/testing/selftests/net/fcnal-test.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh index 7f5b265fcb90..a1da013d847b 100755 --- a/tools/testing/selftests/net/fcnal-test.sh +++ b/tools/testing/selftests/net/fcnal-test.sh @@ -4077,3 +4077,11 @@ cleanup 2>/dev/null printf "\nTests passed: %3d\n" ${nsuccess} printf "Tests failed: %3d\n" ${nfail} + +if [ $nfail -ne 0 ]; then + exit 1 # KSFT_FAIL +elif [ $nsuccess -eq 0 ]; then + exit $ksft_skip +fi + +exit 0 # KSFT_PASS |