diff --git a/tests/crypto/test_cbc/src/test_cbc_mode.c b/tests/crypto/test_cbc/src/test_cbc_mode.c index 45bf089f42a..7088e7c6d06 100644 --- a/tests/crypto/test_cbc/src/test_cbc_mode.c +++ b/tests/crypto/test_cbc/src/test_cbc_mode.c @@ -140,7 +140,7 @@ uint32_t test_1_and_2(void) if (tc_cbc_mode_decrypt(decrypted, length - TC_AES_BLOCK_SIZE, p, length, encrypted, &a) == 0) { TC_ERROR - ("CBC test #2 (decryption SP 800-38a tests) failed in.\n", + ("CBC test #2 (decryption SP 800-38a tests) failed in. %s\n", __func__); result = TC_FAIL; goto exitTest1; diff --git a/tests/crypto/test_ccm_mode/src/test_ccm_mode.c b/tests/crypto/test_ccm_mode/src/test_ccm_mode.c index bc9c8a76d71..3008064c365 100644 --- a/tests/crypto/test_ccm_mode/src/test_ccm_mode.c +++ b/tests/crypto/test_ccm_mode/src/test_ccm_mode.c @@ -119,7 +119,7 @@ uint32_t test_vector_1(void) uint32_t result = TC_PASS; - TC_PRINT("Performing CCM test #1 (RFC 3610 test vector #1):\n", __func__); + TC_PRINT("%s: Performing CCM test #1 (RFC 3610 test vector #1):\n", __func__); /* RFC 3610 test vector #1 */ const uint8_t key[NUM_NIST_KEYS] = { diff --git a/tests/crypto/test_cmac_mode/src/test_cmac_mode.c b/tests/crypto/test_cmac_mode/src/test_cmac_mode.c index 6f65e9aabad..96bc96d582e 100644 --- a/tests/crypto/test_cmac_mode/src/test_cmac_mode.c +++ b/tests/crypto/test_cmac_mode/src/test_cmac_mode.c @@ -88,7 +88,7 @@ static uint32_t verify_gf_2_128_double(uint8_t *K1, uint8_t *K2, struct tc_cmac_ (void) memset(zero, '\0', sizeof(zero)); tc_aes_encrypt(L, zero, s.sched); if (memcmp(L, l, BUF_LEN) != 0) { - TC_ERROR("AES encryption failed in %s.\n", __func__); + TC_ERROR("%s: AES encryption failed\n", __func__); show("expected L =", l, sizeof(l)); show("computed L =", L, sizeof(L)); return TC_FAIL; @@ -96,7 +96,7 @@ static uint32_t verify_gf_2_128_double(uint8_t *K1, uint8_t *K2, struct tc_cmac_ gf_double(K1, L); if (memcmp(K1, k1, BUF_LEN) != 0) { - TC_ERROR("gf_2_128_double failed when msb = 0\n", __func__); + TC_ERROR("%s: gf_2_128_double failed when msb = 0\n", __func__); show("expected K1 =", k1, sizeof(k1)); show("computed K1 =", K1, sizeof(k1)); return TC_FAIL; @@ -104,7 +104,7 @@ static uint32_t verify_gf_2_128_double(uint8_t *K1, uint8_t *K2, struct tc_cmac_ gf_double(K2, K1); if (memcmp(K2, k2, BUF_LEN) != 0) { - TC_ERROR("gf_2_128_double failed when msb = 1\n", __func__); + TC_ERROR("%s: gf_2_128_double failed when msb = 1\n", __func__); show("expected K2 =", k2, sizeof(k2)); show("computed K2 =", K2, sizeof(k2)); return TC_FAIL; @@ -131,7 +131,7 @@ static uint32_t verify_cmac_null_msg(TCCmacState_t s) (void) tc_cmac_final(Tag, s); if (memcmp(Tag, tag, BUF_LEN) != 0) { - TC_ERROR("aes_cmac failed with null msg = 1\n", __func__); + TC_ERROR("%s: aes_cmac failed with null msg = 1\n", __func__); show("expected Tag =", tag, sizeof(tag)); show("computed Tag =", Tag, sizeof(Tag)); return TC_FAIL; @@ -162,7 +162,7 @@ static uint32_t verify_cmac_1_block_msg(TCCmacState_t s) (void) tc_cmac_final(Tag, s); if (memcmp(Tag, tag, BUF_LEN) != 0) { - TC_ERROR("aes_cmac failed with 1 block msg\n", __func__); + TC_ERROR("%s: aes_cmac failed with 1 block msg\n", __func__); show("aes_cmac failed with 1 block msg =", msg, sizeof(msg)); show("expected Tag =", tag, sizeof(tag)); show("computed Tag =", Tag, sizeof(Tag)); @@ -197,7 +197,7 @@ static uint32_t verify_cmac_320_bit_msg(TCCmacState_t s) (void) tc_cmac_final(Tag, s); if (memcmp(Tag, tag, BUF_LEN) != 0) { - TC_ERROR("aes_cmac failed with 320 bit msg\n", __func__); + TC_ERROR("%s: aes_cmac failed with 320 bit msg\n", __func__); show("aes_cmac failed with 320 bit msg =", msg, sizeof(msg)); show("expected Tag =", tag, sizeof(tag)); show("computed Tag =", Tag, sizeof(Tag)); @@ -235,7 +235,7 @@ static uint32_t verify_cmac_512_bit_msg(TCCmacState_t s) (void)tc_cmac_final(Tag, s); if (memcmp(Tag, tag, BUF_LEN) != 0) { - TC_ERROR("aes_cmac failed with 512 bit msg\n", __func__); + TC_ERROR("%s: aes_cmac failed with 512 bit msg\n", __func__); show("aes_cmac failed with 512 bit msg =", msg, sizeof(msg)); show("expected Tag =", tag, sizeof(tag)); show("computed Tag =", Tag, sizeof(Tag)); diff --git a/tests/crypto/test_ctr/src/test_ctr_mode.c b/tests/crypto/test_ctr/src/test_ctr_mode.c index c35933d9b49..22139e652cf 100644 --- a/tests/crypto/test_ctr/src/test_ctr_mode.c +++ b/tests/crypto/test_ctr/src/test_ctr_mode.c @@ -115,7 +115,7 @@ uint32_t test_1_and_2(void) if (tc_ctr_mode(decrypted, sizeof(decrypted), &out[TC_AES_BLOCK_SIZE], sizeof(decrypted), ctr, &sched) == 0) { TC_ERROR - ("CTR test #2 (decryption SP 800-38a tests) failed in.\n", + ("CTR test #2 (decryption SP 800-38a tests) failed in. %s\n", __func__); result = TC_FAIL; goto exitTest1;