linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: testmgr: notify expected failures on aead tests
@ 2015-01-19 13:54 Cristian Stoica
  2015-01-20  3:35 ` Herbert Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Cristian Stoica @ 2015-01-19 13:54 UTC (permalink / raw)
  To: davem, herbert, linux-crypto; +Cc: horia.geanta, tudor.ambarus, Cristian Stoica

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@freescale.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-20  7:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 13:54 [PATCH] crypto: testmgr: notify expected failures on aead tests Cristian Stoica
2015-01-20  3:35 ` Herbert Xu
2015-01-20  7:58   ` Cristian Stoica

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).