diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-06-20 09:33:09 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-05-15 09:57:33 +0200 |
commit | 2eb19141cc6db5ab79471c7bbbe5d35f49025307 (patch) | |
tree | 9c4c6cc73b4fdfa33f92533be3cf5e2ed348c686 | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
download | linux-stericsson-ux500-crypto-hash.tar.gz |
slaskux500-crypto-hash
-rw-r--r-- | crypto/testmgr.c | 19 |
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; |