app/test: update skipped count when setup returns skipped

Message ID 1653401771-120-1-git-send-email-anoobj@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series app/test: update skipped count when setup returns skipped |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS

Commit Message

Anoob Joseph May 24, 2022, 2:16 p.m. UTC
  If the setup function returns TEST_SKIPPED, the logs would say the test
case is skipped while the summary count would consider it under failed
cases. Address this by counting such test cases under 'skipped'.

Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
 app/test/test.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Akhil Goyal May 25, 2022, 6:10 a.m. UTC | #1
> Subject: [PATCH] app/test: update skipped count when setup returns skipped
> 
> If the setup function returns TEST_SKIPPED, the logs would say the test
> case is skipped while the summary count would consider it under failed
> cases. Address this by counting such test cases under 'skipped'.
> 
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
  
Thomas Monjalon June 7, 2022, 4:41 p.m. UTC | #2
25/05/2022 08:10, Akhil Goyal:
> > Subject: [PATCH] app/test: update skipped count when setup returns skipped
> > 
> > If the setup function returns TEST_SKIPPED, the logs would say the test
> > case is skipped while the summary count would consider it under failed
> > cases. Address this by counting such test cases under 'skipped'.
> > 
> > Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> Acked-by: Akhil Goyal <gakhil@marvell.com>

Applied, thanks.
  

Patch

diff --git a/app/test/test.c b/app/test/test.c
index 5194131..f4d2854 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -358,6 +358,8 @@  unit_test_suite_runner(struct unit_test_suite *suite)
 				suite->failed++;
 		} else if (test_success == -ENOTSUP) {
 			suite->unsupported++;
+		} else if (test_success == TEST_SKIPPED) {
+			suite->skipped++;
 		} else {
 			suite->failed++;
 		}