Hi Ayuj,
> -----Original Message-----
> From: Ayuj Verma [mailto:[email protected]]
> Sent: Tuesday, April 9, 2019 12:34 PM
> To: [email protected]; Trahe, Fiona <[email protected]>; Kusztal,
> ArkadiuszX
> <[email protected]>; De Lara Guarch, Pablo
> <[email protected]>
> Cc: [email protected]; [email protected]; [email protected];
> [email protected];
> [email protected]; Ayuj Verma <[email protected]>
> Subject: [PATCH v2] app/test: replace TEST_SKIPPED with -ENOTSUP
>
> Return -ENOTSUP for unsupported tests
>
> Signed-off-by: Ayuj Verma <[email protected]>
> Signed-off-by: Shally Verma <[email protected]>
> ---
> app/test/test_cryptodev_asym.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/app/test/test_cryptodev_asym.c b/app/test/test_cryptodev_asym.c
> index d2efce9..feed3a8 100644
> --- a/app/test/test_cryptodev_asym.c
> +++ b/app/test/test_cryptodev_asym.c
> @@ -352,7 +352,7 @@ struct test_cases_array {
> RTE_LOG(INFO, USER1,
> "Device doesn't support sign op with "
> "exponent key type. Test Skipped\n");
> - return TEST_SKIPPED;
> + return -ENOTSUP;
> }
>
> sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -498,7 +498,7 @@ struct test_cases_array {
> RTE_LOG(INFO, USER1,
> "Device doesn't support sign op with "
> "exponent key type. Test Skipped\n");
> - return TEST_SKIPPED;
> + return -ENOTSUP;
> }
>
> sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1261,7 +1261,7 @@ static inline void print_asym_capa(
> &modinv_xform.xform_type, "modinv") < 0) {
> RTE_LOG(ERR, USER1,
> "Invalid ASYNC algorithm specified\n");
> - return -1;
> + return -ENOTSUP;
[Fiona] this looks more like a test code bug rather than an indication that the
device doesn't support modinv. SO should still return -1.
Also - while you're updating, can you please fix the typo in the trace - ASYNC
should be ASYMM
> }
>
> cap_idx.type = modinv_xform.xform_type;
> @@ -1273,7 +1273,7 @@ static inline void print_asym_capa(
> modinv_xform.modinv.modulus.length)) {
> RTE_LOG(ERR, USER1,
> "Invalid MODULOUS length specified\n");
> - return -1;
> + return -ENOTSUP;
[Fiona] please update the trace to match the return, e.g. something like
"modulus length %len not supported by this device"
> }
>
> sess = rte_cryptodev_asym_session_create(sess_mpool);
> @@ -1380,7 +1380,7 @@ static inline void print_asym_capa(
> < 0) {
> RTE_LOG(ERR, USER1,
> "Invalid ASYNC algorithm specified\n");
> - return -1;
> + return -ENOTSUP;
> }
[Fiona] same as above, i.e. code bug. And typo in trace.
>
> /* check for modlen capability */
> @@ -1391,7 +1391,7 @@ static inline void print_asym_capa(
> capability, modex_xform.modex.modulus.length)) {
> RTE_LOG(ERR, USER1,
> "Invalid MODULOUS length specified\n");
> - return -1;
> + return -ENOTSUP;
[Fiona] same as above. Fix trace.
> }
>
> /* generate crypto op data structure */
> --
> 1.8.3.1