[PATCH] crypto: testmgr: notify expected failures on aead tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some hardware drivers (e.g. caamalg) log failed operations reported by
hw to assist in debugging. However, these messages are confusing when they
are the result of a testmgr test that is expected to fail.

This patch puts the driver messages in their testing context and helps the
user classify them as harmless.

Signed-off-by: Cristian Stoica <cristian.stoica@xxxxxxxxxxxxx>
---
 crypto/testmgr.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/crypto/testmgr.c b/crypto/testmgr.c
index 235b1ff..ec19e98 100644
--- a/crypto/testmgr.c
+++ b/crypto/testmgr.c
@@ -573,9 +573,11 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
 			if (!ret)
 				break;
 		case -EBADMSG:
-			if (template[i].novrfy)
-				/* verification failure was expected */
+			if (template[i].novrfy) {
+				pr_info("aead%s: expected %s failure on test %d for %s: ret=-EBADMSG\n",
+					d, e, j, algo);
 				continue;
+			}
 			/* fall through */
 		default:
 			pr_err("alg: aead%s: %s failed on test %d for %s: ret=%d\n",
@@ -723,9 +725,11 @@ static int __test_aead(struct crypto_aead *tfm, int enc,
 			if (!ret)
 				break;
 		case -EBADMSG:
-			if (template[i].novrfy)
-				/* verification failure was expected */
+			if (template[i].novrfy) {
+				pr_info("aead%s: expected %s failure on test %d for %s: ret=-EBADMSG\n",
+					d, e, j, algo);
 				continue;
+			}
 			/* fall through */
 		default:
 			pr_err("alg: aead%s: %s failed on chunk test %d for %s: ret=%d\n",
-- 
2.2.0

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux