diff mbox series

[API-NEXT,v1,2/2] validation: crypto: do not run tests if mode is not supported

Message ID 1513807210-15376-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v1,1/2] linux-gen: crypto: populate sync/async_mode caps | expand

Commit Message

Github ODP bot Dec. 20, 2017, 10 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Do not run packet tests if corresponding packet-mode operation is not
supported by the platform.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 355 (lumag:crypto-modes-caps)
 ** https://github.com/Linaro/odp/pull/355
 ** Patch: https://github.com/Linaro/odp/pull/355.patch
 ** Base sha: f2a1a84b43642f3d0911a351d9308d5501693290
 ** Merge commit sha: 993c22bbf65ef0688c2bc8064173c967fde07571
 **/
 test/validation/api/crypto/odp_crypto_test_inp.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/test/validation/api/crypto/odp_crypto_test_inp.c b/test/validation/api/crypto/odp_crypto_test_inp.c
index cba472ded..77fd49954 100644
--- a/test/validation/api/crypto/odp_crypto_test_inp.c
+++ b/test/validation/api/crypto/odp_crypto_test_inp.c
@@ -533,6 +533,15 @@  static int check_alg_support(odp_cipher_alg_t cipher, odp_auth_alg_t auth)
 	if (odp_crypto_capability(&capability))
 		return ODP_TEST_INACTIVE;
 
+	if (suite_context.packet) {
+		if (suite_context.op_mode == ODP_CRYPTO_SYNC &&
+		    capability.sync_mode == ODP_SUPPORT_NO)
+			return ODP_TEST_INACTIVE;
+		if (suite_context.op_mode == ODP_CRYPTO_ASYNC &&
+		    capability.async_mode == ODP_SUPPORT_NO)
+			return ODP_TEST_INACTIVE;
+	}
+
 	/* Cipher algorithms */
 	switch (cipher) {
 	case ODP_CIPHER_ALG_NULL: