Skip to content

Commit 15226e4

Browse files
committed
crypto: testmgr - Print akcipher algorithm name
When an akcipher test fails, we don't know which algorithm failed because the name is not printed. This patch fixes this. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent aa6416e commit 15226e4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

crypto/testmgr.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,15 +2034,17 @@ static int test_akcipher_one(struct crypto_akcipher *tfm,
20342034
static int test_akcipher(struct crypto_akcipher *tfm, const char *alg,
20352035
struct akcipher_testvec *vecs, unsigned int tcount)
20362036
{
2037+
const char *algo =
2038+
crypto_tfm_alg_driver_name(crypto_akcipher_tfm(tfm));
20372039
int ret, i;
20382040

20392041
for (i = 0; i < tcount; i++) {
20402042
ret = test_akcipher_one(tfm, vecs++);
20412043
if (!ret)
20422044
continue;
20432045

2044-
pr_err("alg: akcipher: test failed on vector %d, err=%d\n",
2045-
i + 1, ret);
2046+
pr_err("alg: akcipher: test %d failed for %s, err=%d\n",
2047+
i + 1, algo, ret);
20462048
return ret;
20472049
}
20482050
return 0;

0 commit comments

Comments
 (0)