test/crypto: return correct value if feature not supported
authorDamian Nowak <damianx.nowak@intel.com>
Wed, 3 Jul 2019 11:15:58 +0000 (13:15 +0200)
committerAkhil Goyal <akhil.goyal@nxp.com>
Fri, 5 Jul 2019 13:28:14 +0000 (15:28 +0200)
This patch makes unsupported tests visible in
the testsuite summary.

Signed-off-by: Damian Nowak <damianx.nowak@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
app/test/test_cryptodev.c

index 336cfd0..05422da 100644 (file)
@@ -3420,7 +3420,7 @@ test_kasumi_encryption_sgl(const struct kasumi_test_data *tdata)
        if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
                printf("Device doesn't support in-place scatter-gather. "
                                "Test Skipped.\n");
-               return 0;
+               return -ENOTSUP;
        }
 
        /* Create KASUMI session */
@@ -3571,7 +3571,7 @@ test_kasumi_encryption_oop_sgl(const struct kasumi_test_data *tdata)
                printf("Device doesn't support out-of-place scatter-gather "
                                "in both input and output mbufs. "
                                "Test Skipped.\n");
-               return 0;
+               return -ENOTSUP;
        }
 
        /* Create KASUMI session */
@@ -3926,7 +3926,7 @@ test_snow3g_encryption_oop_sgl(const struct snow3g_test_data *tdata)
                printf("Device doesn't support out-of-place scatter-gather "
                                "in both input and output mbufs. "
                                "Test Skipped.\n");
-               return 0;
+               return -ENOTSUP;
        }
 
        /* Create SNOW 3G session */
@@ -5286,7 +5286,7 @@ test_zuc_encryption_sgl(const struct wireless_test_data *tdata)
        if (!(feat_flags & RTE_CRYPTODEV_FF_IN_PLACE_SGL)) {
                printf("Device doesn't support in-place scatter-gather. "
                                "Test Skipped.\n");
-               return 0;
+               return -ENOTSUP;
        }
 
        plaintext_len = ceil_byte_length(tdata->plaintext.len);