Hi Ayuj,

________________________________________
From: Ayuj Verma <ayve...@marvell.com>
Sent: 01 April 2019 13:01:56
To: akhil.go...@nxp.com
Cc: arkadiuszx.kusz...@intel.com; Shally Verma; Sunila Sahu; Kanaka Durga 
Kotamarthy; Arvind Desai; dev@dpdk.org; Ayuj Verma
Subject: [PATCH v1] app/test: add check for tests skipped 
 
Add skipped counter to count for number of skipped testcases.

Signed-off-by: Ayuj Verma <ayve...@marvell.com>
Signed-off-by: Shally Verma <shal...@marvell.com>
---
 app/test/test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test.c b/app/test/test.c
index d646f51..1e0113b 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -237,6 +237,8 @@
                                 succeeded++;
                         else if (test_success == -ENOTSUP)
                                 unsupported++;
+                       else if (test_success == TEST_SKIPPED)
+                               skipped++;
                         else
                                 failed++;
                 } else if (test_success == -ENOTSUP) {
-- 
1.8.3.1

[Fiona] I just tried it out.
The patch itself is ok - it works if a test case at run-time decides to return 
TEST_SKIPPED.
A compile-time decision to skip a test-case can be made by using 
TEST_CASE_ST_DISABLED and this already counts as skipped.

But I see the 2 places you're using TEST_SKIPPED are where the device doesn't 
support the capability needed for the test. In other similar cases (e.g. 
sym_crypto ZUC test) -ENOTSUP is returned. This seems like a more appropriate 
return value.
So unless there's some other reason other than Unsupported that a run-time 
decision would be made to skip a test, I'd nack this patch as it leads to 
confusion about which value should be returned.

Fiona

Reply via email to