aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/testmgr.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 6f5f3ed8376c..4b0bcbc9f0bc 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -364,11 +364,14 @@ static int __test_hash(struct crypto_ahash *tfm,
if (memcmp(result, template[i].digest,
crypto_ahash_digestsize(tfm))) {
- printk(KERN_ERR "alg: hash: Test %d failed for %s\n",
+ printk(KERN_ERR "alg: hash: Test %d FAILED for %s\n",
j, algo);
hexdump(result, crypto_ahash_digestsize(tfm));
ret = -EINVAL;
goto out;
+ } else {
+ printk(KERN_ERR "alg: hash: Test %d SUCCEEDED for %s\n",
+ j, algo);
}
}
@@ -442,10 +445,16 @@ static int __test_hash(struct crypto_ahash *tfm,
if (memcmp(result, template[i].digest,
crypto_ahash_digestsize(tfm))) {
printk(KERN_ERR "alg: hash: Chunking test %d "
- "failed for %s\n", j, algo);
+ "FAILED for %s\n", j, algo);
+ printk(KERN_ERR "result:\n");
hexdump(result, crypto_ahash_digestsize(tfm));
+ printk(KERN_ERR "expected:\n");
+ hexdump(template[i].digest, crypto_ahash_digestsize(tfm));
ret = -EINVAL;
goto out;
+ } else {
+ printk(KERN_ERR "alg: hash: Chunking test %d SUCCEEDED for %s\n",
+ j, algo);
}
}
@@ -519,12 +528,16 @@ static int __test_hash(struct crypto_ahash *tfm,
}
if (memcmp(result, template[i].digest,
crypto_ahash_digestsize(tfm))) {
- pr_err("alg: hash: Partial Test %d failed for %s\n",
+ pr_err("alg: hash: Partial Test %d FAILED for %s\n",
j, algo);
hexdump(result, crypto_ahash_digestsize(tfm));
ret = -EINVAL;
goto out;
+ } else {
+ printk(KERN_ERR "alg: hash: Partial Test %d SUCCEEDED for %s\n",
+ j, algo);
}
+
}
ret = 0;