DPDK patches and discussions
 help / color / mirror / Atom feed
From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: pablo.de.lara.guarch@intel.com, fiona.trahe@intel.com,
	roy.fan.zhang@intel.com, akhil.goyal@nxp.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] test/crypto: fix misleading trace message
Date: Fri, 21 Dec 2018 00:01:25 +0000	[thread overview]
Message-ID: <1545350485-6025-1-git-send-email-fiona.trahe@intel.com> (raw)

Test was reporting digest verification failed for all operation errors.
Fixed so it only reports this if the PMD actually reports an auth failure.

Fixes: 9c0eed2f06ae ("app/test: rework crypto AES unit test")
CC: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
 test/test/test_cryptodev_blockcipher.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/test/test_cryptodev_blockcipher.c b/test/test/test_cryptodev_blockcipher.c
index 1c3f29f6b..4f1298ea2 100644
--- a/test/test/test_cryptodev_blockcipher.c
+++ b/test/test/test_cryptodev_blockcipher.c
@@ -401,13 +401,14 @@ test_blockcipher_one_case(const struct blockcipher_test_case *t,
 
 	/* Verify results */
 	if (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {
-		if (t->op_mask & BLOCKCIPHER_TEST_OP_AUTH_VERIFY)
+		if ((t->op_mask & BLOCKCIPHER_TEST_OP_AUTH_VERIFY) &&
+			(op->status == RTE_CRYPTO_OP_STATUS_AUTH_FAILED))
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "line %u "
 				"FAILED: Digest verification failed "
 				"(0x%X)", __LINE__, op->status);
 		else
 			snprintf(test_msg, BLOCKCIPHER_TEST_MSG_LEN, "line %u "
-				"FAILED: Digest verification failed "
+				"FAILED: Operation failed "
 				"(0x%X)", __LINE__, op->status);
 		status = TEST_FAILED;
 		goto error_exit;
-- 
2.13.6

             reply	other threads:[~2018-12-21  0:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-21  0:01 Fiona Trahe [this message]
2018-12-21 11:41 ` De Lara Guarch, Pablo
2019-01-09 22:45   ` De Lara Guarch, Pablo
2019-01-11  0:05 ` De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1545350485-6025-1-git-send-email-fiona.trahe@intel.com \
    --to=fiona.trahe@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).