* [PATCH] selftests: net/fcnal-test.sh: add exit code
@ 2021-12-03 2:32 Li Zhijian
2021-12-03 14:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Li Zhijian @ 2021-12-03 2:32 UTC (permalink / raw)
To: davem, kuba, shuah
Cc: netdev, linux-kselftest, linux-kernel, Li Zhijian, Philip Li,
kernel test robot
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>
---
tools/testing/selftests/net/fcnal-test.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
index 3313566ce906..46297ceaa6d1 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
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] selftests: net/fcnal-test.sh: add exit code
2021-12-03 2:32 [PATCH] selftests: net/fcnal-test.sh: add exit code Li Zhijian
@ 2021-12-03 14:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-12-03 14:20 UTC (permalink / raw)
To: Li Zhijian
Cc: davem, kuba, shuah, netdev, linux-kselftest, linux-kernel,
philip.li, lkp
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Fri, 3 Dec 2021 10:32:13 +0800 you wrote:
> 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>
>
> [...]
Here is the summary with links:
- selftests: net/fcnal-test.sh: add exit code
https://git.kernel.org/netdev/net/c/0f8a3b48f91b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-03 14:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-03 2:32 [PATCH] selftests: net/fcnal-test.sh: add exit code Li Zhijian
2021-12-03 14:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).