netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] selftests: fib_rule_tests: print the result and return 1 if any tests failed
@ 2019-04-30  2:46 Hangbin Liu
  2019-05-01 15:48 ` David Ahern
  2019-05-01 18:30 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Hangbin Liu @ 2019-04-30  2:46 UTC (permalink / raw)
  To: netdev; +Cc: Roopa Prabhu, David Ahern, Hangbin Liu

Fixes: 65b2b4939a64 ("selftests: net: initial fib rule tests")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
---
 tools/testing/selftests/net/fib_rule_tests.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/testing/selftests/net/fib_rule_tests.sh b/tools/testing/selftests/net/fib_rule_tests.sh
index d4cfb6a7a086..d84193bdc307 100755
--- a/tools/testing/selftests/net/fib_rule_tests.sh
+++ b/tools/testing/selftests/net/fib_rule_tests.sh
@@ -27,6 +27,7 @@ log_test()
 		nsuccess=$((nsuccess+1))
 		printf "\n    TEST: %-50s  [ OK ]\n" "${msg}"
 	else
+		ret=1
 		nfail=$((nfail+1))
 		printf "\n    TEST: %-50s  [FAIL]\n" "${msg}"
 		if [ "${PAUSE_ON_FAIL}" = "yes" ]; then
@@ -245,4 +246,9 @@ setup
 run_fibrule_tests
 cleanup
 
+if [ "$TESTS" != "none" ]; then
+	printf "\nTests passed: %3d\n" ${nsuccess}
+	printf "Tests failed: %3d\n"   ${nfail}
+fi
+
 exit $ret
-- 
2.19.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] selftests: fib_rule_tests: print the result and return 1 if any tests failed
  2019-04-30  2:46 [PATCH net] selftests: fib_rule_tests: print the result and return 1 if any tests failed Hangbin Liu
@ 2019-05-01 15:48 ` David Ahern
  2019-05-01 18:30 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2019-05-01 15:48 UTC (permalink / raw)
  To: Hangbin Liu, netdev; +Cc: Roopa Prabhu, David Ahern


On 4/29/19 8:46 PM, Hangbin Liu wrote:
> Fixes: 65b2b4939a64 ("selftests: net: initial fib rule tests")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
>  tools/testing/selftests/net/fib_rule_tests.sh | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/fib_rule_tests.sh b/tools/testing/selftests/net/fib_rule_tests.sh
> index d4cfb6a7a086..d84193bdc307 100755
> --- a/tools/testing/selftests/net/fib_rule_tests.sh
> +++ b/tools/testing/selftests/net/fib_rule_tests.sh
> @@ -27,6 +27,7 @@ log_test()
>  		nsuccess=$((nsuccess+1))
>  		printf "\n    TEST: %-50s  [ OK ]\n" "${msg}"
>  	else
> +		ret=1
>  		nfail=$((nfail+1))
>  		printf "\n    TEST: %-50s  [FAIL]\n" "${msg}"
>  		if [ "${PAUSE_ON_FAIL}" = "yes" ]; then
> @@ -245,4 +246,9 @@ setup
>  run_fibrule_tests
>  cleanup
>  
> +if [ "$TESTS" != "none" ]; then
> +	printf "\nTests passed: %3d\n" ${nsuccess}
> +	printf "Tests failed: %3d\n"   ${nfail}
> +fi
> +
>  exit $ret
> 

Thanks for adding the summary.

Reviewed-by: David Ahern <dsahern@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] selftests: fib_rule_tests: print the result and return 1 if any tests failed
  2019-04-30  2:46 [PATCH net] selftests: fib_rule_tests: print the result and return 1 if any tests failed Hangbin Liu
  2019-05-01 15:48 ` David Ahern
@ 2019-05-01 18:30 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-05-01 18:30 UTC (permalink / raw)
  To: liuhangbin; +Cc: netdev, roopa, dsahern

From: Hangbin Liu <liuhangbin@gmail.com>
Date: Tue, 30 Apr 2019 10:46:10 +0800

> Fixes: 65b2b4939a64 ("selftests: net: initial fib rule tests")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-01 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-30  2:46 [PATCH net] selftests: fib_rule_tests: print the result and return 1 if any tests failed Hangbin Liu
2019-05-01 15:48 ` David Ahern
2019-05-01 18:30 ` David Miller

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).