summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2017-07-25 07:16:50 +0100
committerPablo de Lara <pablo.de.lara.guarch@intel.com>2017-07-27 17:25:54 +0200
commit27391b53b3fceb84e21173fa663650c3912dffca (patch)
treea577cf0f27d90ca6dfc306c83460a259a0cf1165 /test
parentb5b047aa441adf5c13d25f0a5d3eb76787080903 (diff)
downloaddpdk-27391b53b3fceb84e21173fa663650c3912dffca.zip
dpdk-27391b53b3fceb84e21173fa663650c3912dffca.tar.gz
dpdk-27391b53b3fceb84e21173fa663650c3912dffca.tar.xz
cryptodev: fix session init return value
When calling rte_cryptodev_sym_session_init(), if there was an error, it returned -1, instead of returning the specific error code, which can be valuable for the application for error handling. Fixes: b3bbd9e5f265 ("cryptodev: support device independent sessions") Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/test/test_cryptodev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test/test_cryptodev.c b/test/test/test_cryptodev.c
index 32d65ce..9803e66 100644
--- a/test/test/test_cryptodev.c
+++ b/test/test/test_cryptodev.c
@@ -6415,7 +6415,7 @@ test_null_invalid_operation(void)
ret = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->cipher_xform,
ts_params->session_mpool);
- TEST_ASSERT(ret == -1,
+ TEST_ASSERT(ret < 0,
"Session creation succeeded unexpectedly");
@@ -6433,7 +6433,7 @@ test_null_invalid_operation(void)
ret = rte_cryptodev_sym_session_init(ts_params->valid_devs[0],
ut_params->sess, &ut_params->auth_xform,
ts_params->session_mpool);
- TEST_ASSERT(ret == -1,
+ TEST_ASSERT(ret < 0,
"Session creation succeeded unexpectedly");
return TEST_SUCCESS;