app/test: add corrupted data for qat
authorArek Kusztal <arkadiuszx.kusztal@intel.com>
Thu, 13 Oct 2016 10:03:46 +0000 (11:03 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 26 Oct 2016 12:58:37 +0000 (14:58 +0200)
This commit adds tests with corrupted data to the Intel QuickAssist
Technology tests suite in test_cryptodev.c

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
app/test/test_cryptodev.c

index 7d03899..c7e88c4 100644 (file)
@@ -6161,6 +6161,20 @@ static struct unit_test_suite cryptodev_qat_testsuite  = {
                TEST_CASE_ST(ut_setup, ut_teardown,
                        test_kasumi_cipher_auth_test_case_1),
 
+               /** Negative tests */
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       authentication_verify_HMAC_SHA1_fail_data_corrupt),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       authentication_verify_HMAC_SHA1_fail_tag_corrupt),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       authentication_verify_AES128_GMAC_fail_data_corrupt),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       authentication_verify_AES128_GMAC_fail_tag_corrupt),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       auth_decryption_AES128CBC_HMAC_SHA1_fail_data_corrupt),
+               TEST_CASE_ST(ut_setup, ut_teardown,
+                       auth_decryption_AES128CBC_HMAC_SHA1_fail_tag_corrupt),
+
                TEST_CASES_END() /**< NULL terminate unit test array */
        }
 };