DPDK patches and discussions
 help / color / mirror / Atom feed
From: Srikanth Yalavarthi <syalavarthi@marvell.com>
To: Srikanth Yalavarthi <syalavarthi@marvell.com>,
	Anup Prabhu <aprabhu@marvell.com>
Cc: <dev@dpdk.org>, <sshankarnara@marvell.com>, <ptakkar@marvell.com>
Subject: [PATCH v1] app/mldev: fix error reporting on IO failure
Date: Mon, 12 Jun 2023 11:00:19 -0700	[thread overview]
Message-ID: <20230612180019.13176-1-syalavarthi@marvell.com> (raw)

Application is reporting the test output as success when a
failure occurs in writing the output. Fix incorrect error
reporting on failure to write output files.

Fixes: da6793390596 ("app/mldev: support inference validation")

Signed-off-by: Srikanth Yalavarthi <syalavarthi@marvell.com>
---
 app/test-mldev/test_inference_common.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/app/test-mldev/test_inference_common.c b/app/test-mldev/test_inference_common.c
index 7c62726761..418bf38be4 100644
--- a/app/test-mldev/test_inference_common.c
+++ b/app/test-mldev/test_inference_common.c
@@ -867,9 +867,6 @@ ml_inference_validation(struct ml_test *test, struct ml_request *req)
 			goto next_output;
 	}
 done:
-	if (match)
-		t->nb_valid++;
-
 	return match;
 }
 
@@ -892,10 +889,8 @@ ml_request_finish(struct rte_mempool *mp, void *opaque, void *obj, unsigned int
 	rte_ml_io_dequantize(t->cmn.opt->dev_id, model->id, t->model[req->fid].nb_batches,
 			     req->output, model->output);
 
-	if (model->reference == NULL) {
-		t->nb_valid++;
+	if (model->reference == NULL)
 		goto dump_output_pass;
-	}
 
 	if (!ml_inference_validation(opaque, req))
 		goto dump_output_fail;
@@ -920,6 +915,7 @@ ml_request_finish(struct rte_mempool *mp, void *opaque, void *obj, unsigned int
 		if (error)
 			return;
 	}
+	t->nb_valid++;
 
 	return;
 
-- 
2.17.1


             reply	other threads:[~2023-06-12 18:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-12 18:00 Srikanth Yalavarthi [this message]
2023-07-07  8:18 ` Thomas Monjalon

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=20230612180019.13176-1-syalavarthi@marvell.com \
    --to=syalavarthi@marvell.com \
    --cc=aprabhu@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ptakkar@marvell.com \
    --cc=sshankarnara@marvell.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 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).