diff mbox series

[03/11] selftests: net/fcnal: Non-zero exit on failures

Message ID f8479130ce46322d75b0556273c16b45522b5ff4.1633520807.git.cdleonard@gmail.com (mailing list archive)
State New
Headers show
Series selftests: Improve nettest and net/fcnal-test.sh | expand

Commit Message

Leonard Crestez Oct. 6, 2021, 11:47 a.m. UTC
Test scripts must report 'pass' or 'fail' via exit status, not just
logging.

Signed-off-by: Leonard Crestez <cdleonard@gmail.com>
---
 tools/testing/selftests/net/fcnal-test.sh | 1 +
 1 file changed, 1 insertion(+)

Comments

David Ahern Oct. 6, 2021, 2:37 p.m. UTC | #1
On 10/6/21 5:47 AM, Leonard Crestez wrote:
> Test scripts must report 'pass' or 'fail' via exit status, not just
> logging.
> 
> Signed-off-by: Leonard Crestez <cdleonard@gmail.com>
> ---
>  tools/testing/selftests/net/fcnal-test.sh | 1 +
>  1 file changed, 1 insertion(+)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/fcnal-test.sh b/tools/testing/selftests/net/fcnal-test.sh
index 43ea5c878a85..9cf05e6e0d9b 100755
--- a/tools/testing/selftests/net/fcnal-test.sh
+++ b/tools/testing/selftests/net/fcnal-test.sh
@@ -4015,5 +4015,6 @@  done
 
 cleanup 2>/dev/null
 
 printf "\nTests passed: %3d\n" ${nsuccess}
 printf "Tests failed: %3d\n"   ${nfail}
+exit $(( nfail != 0 ))