For tests, rename TEST_CALLOC_OR_FAIL() to just TEST_CALLOC()
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
diff --git a/tests/suites/test_suite_cipher.function b/tests/suites/test_suite_cipher.function
index bf7f421..fffc513 100644
--- a/tests/suites/test_suite_cipher.function
+++ b/tests/suites/test_suite_cipher.function
@@ -1229,7 +1229,7 @@
* (we need the tag appended to the ciphertext)
*/
cipher_plus_tag_len = cipher->len + tag->len;
- TEST_CALLOC_OR_FAIL(cipher_plus_tag, cipher_plus_tag_len);
+ TEST_CALLOC(cipher_plus_tag, cipher_plus_tag_len);
memcpy(cipher_plus_tag, cipher->x, cipher->len);
memcpy(cipher_plus_tag + cipher->len, tag->x, tag->len);
@@ -1247,7 +1247,7 @@
* Try decrypting to a buffer that's 1B too small
*/
if (decrypt_buf_len != 0) {
- TEST_CALLOC_OR_FAIL(decrypt_buf, decrypt_buf_len - 1);
+ TEST_CALLOC(decrypt_buf, decrypt_buf_len - 1);
outlen = 0;
ret = mbedtls_cipher_auth_decrypt_ext(&ctx, iv->x, iv->len,
@@ -1262,7 +1262,7 @@
/*
* Authenticate and decrypt, and check result
*/
- TEST_CALLOC_OR_FAIL(decrypt_buf, decrypt_buf_len);
+ TEST_CALLOC(decrypt_buf, decrypt_buf_len);
outlen = 0;
ret = mbedtls_cipher_auth_decrypt_ext(&ctx, iv->x, iv->len,
@@ -1306,7 +1306,7 @@
/*
* Try encrypting with an output buffer that's 1B too small
*/
- TEST_CALLOC_OR_FAIL(encrypt_buf, encrypt_buf_len - 1);
+ TEST_CALLOC(encrypt_buf, encrypt_buf_len - 1);
outlen = 0;
ret = mbedtls_cipher_auth_encrypt_ext(&ctx, iv->x, iv->len,
@@ -1320,7 +1320,7 @@
/*
* Encrypt and check the result
*/
- TEST_CALLOC_OR_FAIL(encrypt_buf, encrypt_buf_len);
+ TEST_CALLOC(encrypt_buf, encrypt_buf_len);
outlen = 0;
ret = mbedtls_cipher_auth_encrypt_ext(&ctx, iv->x, iv->len,
@@ -1374,7 +1374,7 @@
* Authenticate and decrypt, and check result
*/
- TEST_CALLOC_OR_FAIL(decrypt_buf, cipher->len);
+ TEST_CALLOC(decrypt_buf, cipher->len);
outlen = 0;
ret = mbedtls_cipher_auth_decrypt(&ctx, iv->x, iv->len, ad->x, ad->len,
tmp_cipher, cipher->len, decrypt_buf, &outlen,
@@ -1411,14 +1411,14 @@
/* prepare buffers for encryption */
#if defined(MBEDTLS_USE_PSA_CRYPTO)
if (use_psa) {
- TEST_CALLOC_OR_FAIL(cipher_plus_tag, cipher->len + tag->len);
+ TEST_CALLOC(cipher_plus_tag, cipher->len + tag->len);
tmp_cipher = cipher_plus_tag;
tmp_tag = cipher_plus_tag + cipher->len;
} else
#endif /* MBEDTLS_USE_PSA_CRYPTO */
{
- TEST_CALLOC_OR_FAIL(encrypt_buf, cipher->len);
- TEST_CALLOC_OR_FAIL(tag_buf, tag->len);
+ TEST_CALLOC(encrypt_buf, cipher->len);
+ TEST_CALLOC(tag_buf, tag->len);
tmp_cipher = encrypt_buf;
tmp_tag = tag_buf;
}