[PATCH v1] app/mldev: fix error reporting on IO failure

Srikanth Yalavarthi syalavarthi at marvell.com
Mon Jun 12 20:00:19 CEST 2023


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 at 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



More information about the dev mailing list