Commit 0f8a3b48 authored by Li Zhijian's avatar Li Zhijian Committed by David S. Miller

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: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarLi Zhijian <zhijianx.li@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dac8e00f
...@@ -4077,3 +4077,11 @@ cleanup 2>/dev/null ...@@ -4077,3 +4077,11 @@ cleanup 2>/dev/null
printf "\nTests passed: %3d\n" ${nsuccess} printf "\nTests passed: %3d\n" ${nsuccess}
printf "Tests failed: %3d\n" ${nfail} 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
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