All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rex Zhang <rex.zhang@intel.com>
To: fenghua.yu@intel.com, ramesh.thomas@intel.com,
	rex.zhang@intel.com, tony.zhu@intel.com,
	accel-config@lists.linuxfoundation.org
Subject: [Accel-config] [PATCH v1 2/2] accel-config/test: Fix bug about checking result of decompression
Date: Wed, 25 Oct 2023 16:52:59 +0800	[thread overview]
Message-ID: <20231025085259.2958695-2-rex.zhang@intel.com> (raw)
In-Reply-To: <20231025085259.2958695-1-rex.zhang@intel.com>

Previous code missed verifying the result of decompression, add the
verification as a complement.

Signed-off-by: Rex Zhang <rex.zhang@intel.com>
---
 test/iaa.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/test/iaa.c b/test/iaa.c
index 42cf6fb..44eea97 100644
--- a/test/iaa.c
+++ b/test/iaa.c
@@ -2000,7 +2000,7 @@ int iaa_decrypto_multi_task_nodes(struct acctest_context *ctx)
 /* mismatch_expected: expect mismatched buffer with success status 0x1 */
 int iaa_task_result_verify(struct task *tsk, int mismatch_expected)
 {
-	int ret = ACCTEST_STATUS_OK;
+	int ret = ACCTEST_STATUS_FAIL;
 
 	info("verifying task result for %#lx\n", tsk);
 
@@ -2008,6 +2008,9 @@ int iaa_task_result_verify(struct task *tsk, int mismatch_expected)
 		return tsk->comp->status;
 
 	switch (tsk->opcode) {
+	case IAX_OPCODE_NOOP:
+		ret = ACCTEST_STATUS_OK;
+		break;
 	case IAX_OPCODE_CRC64:
 		ret = task_result_verify_crc64(tsk, mismatch_expected);
 		break;
@@ -2032,6 +2035,9 @@ int iaa_task_result_verify(struct task *tsk, int mismatch_expected)
 	case IAX_OPCODE_COMPRESS:
 		ret = task_result_verify_compress(tsk, mismatch_expected);
 		break;
+	case IAX_OPCODE_DECOMPRESS:
+		ret = task_result_verify_decompress(tsk, mismatch_expected);
+		break;
 	case IAX_OPCODE_SCAN:
 		ret = task_result_verify_scan(tsk, mismatch_expected);
 		break;
-- 
2.39.3


      reply	other threads:[~2023-10-25  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25  8:52 [Accel-config] [PATCH v1 1/2] accel-config/test: Add parameter for specifying dev and wq Rex Zhang
2023-10-25  8:52 ` Rex Zhang [this message]

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=20231025085259.2958695-2-rex.zhang@intel.com \
    --to=rex.zhang@intel.com \
    --cc=accel-config@lists.linuxfoundation.org \
    --cc=fenghua.yu@intel.com \
    --cc=ramesh.thomas@intel.com \
    --cc=tony.zhu@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.