| 13433 | 0xab, 0xab, 0xab, 0xab}; |
| 13434 | |
| 13435 | static int |
| 13436 | test_null_invalid_operation(void) |
| 13437 | { |
| 13438 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 13439 | struct crypto_unittest_params *ut_params = &unittest_params; |
| 13440 | |
| 13441 | /* This test is for NULL PMD only */ |
| 13442 | if (gbl_driver_id != rte_cryptodev_driver_id_get( |
| 13443 | RTE_STR(CRYPTODEV_NAME_NULL_PMD))) |
| 13444 | return TEST_SKIPPED; |
| 13445 | |
| 13446 | /* Setup Cipher Parameters */ |
| 13447 | ut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER; |
| 13448 | ut_params->cipher_xform.next = NULL; |
| 13449 | |
| 13450 | ut_params->cipher_xform.cipher.algo = RTE_CRYPTO_CIPHER_AES_CBC; |
| 13451 | ut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT; |
| 13452 | |
| 13453 | /* Create Crypto session*/ |
| 13454 | ut_params->sess = rte_cryptodev_sym_session_create( |
| 13455 | ts_params->valid_devs[0], &ut_params->cipher_xform, |
| 13456 | ts_params->session_mpool); |
| 13457 | TEST_ASSERT(ut_params->sess == NULL, |
| 13458 | "Session creation succeeded unexpectedly"); |
| 13459 | |
| 13460 | /* Setup HMAC Parameters */ |
| 13461 | ut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH; |
| 13462 | ut_params->auth_xform.next = NULL; |
| 13463 | |
| 13464 | ut_params->auth_xform.auth.algo = RTE_CRYPTO_AUTH_SHA1_HMAC; |
| 13465 | ut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE; |
| 13466 | |
| 13467 | /* Create Crypto session*/ |
| 13468 | ut_params->sess = rte_cryptodev_sym_session_create( |
| 13469 | ts_params->valid_devs[0], &ut_params->auth_xform, |
| 13470 | ts_params->session_mpool); |
| 13471 | TEST_ASSERT(ut_params->sess == NULL, |
| 13472 | "Session creation succeeded unexpectedly"); |
| 13473 | |
| 13474 | return TEST_SUCCESS; |
| 13475 | } |
| 13476 | |
| 13477 | |
| 13478 | #define NULL_BURST_LENGTH (32) |
nothing calls this directly
no test coverage detected