test/event_crypto: check adapter config failure
authorHemant Agrawal <hemant.agrawal@nxp.com>
Fri, 27 Sep 2019 08:16:06 +0000 (13:46 +0530)
committerJerin Jacob <jerinj@marvell.com>
Sat, 5 Oct 2019 13:39:31 +0000 (15:39 +0200)
Return error when the adapter creation fails.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
app/test/test_event_crypto_adapter.c

index a856150..652e458 100644 (file)
@@ -819,7 +819,8 @@ test_crypto_adapter_conf_op_forward_mode(void)
        enum rte_event_crypto_adapter_mode mode;
 
        mode = RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD;
-       test_crypto_adapter_conf(mode);
+       TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
+                               "Failed to config crypto adapter");
 
        return TEST_SUCCESS;
 }
@@ -830,7 +831,9 @@ test_crypto_adapter_conf_op_new_mode(void)
        enum rte_event_crypto_adapter_mode mode;
 
        mode = RTE_EVENT_CRYPTO_ADAPTER_OP_NEW;
-       test_crypto_adapter_conf(mode);
+       TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
+                               "Failed to config crypto adapter");
+
        return TEST_SUCCESS;
 }