From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6B5FF42C99; Mon, 12 Jun 2023 20:00:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C029410DD; Mon, 12 Jun 2023 20:00:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 8498340698 for ; Mon, 12 Jun 2023 20:00:24 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35CEGjOo029520 for ; Mon, 12 Jun 2023 11:00:23 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=hfV6dSlzYGJ9KOHs9tKPo82VXO7Vmy+dEjbCRA6KR4I=; b=hlrXi0KcXO12A91rd4mXYn7WBDyFJldSW5hoRCe8ct0RDha/3PFpInVnLsueg6m4My/u CLP/+nJ28oeHy7UWtumq/ipmUFkBySJB1uWTPfdzvhRBdS04ULLla3191GSyKLw41ow9 djv0yFmadh1k71x5cYilew33EpnqBkMUAjtpMUcpC/uAKHH6FQH+yQI87cBqbtWJ7rPZ 4rVq3WOvSHCWVViktIiswbBNpeOqCIRa7GgHh+Ca5x58VRDv/qZaR0TOggFItqTCGke/ q0vHHNrKdwrwVHyYJGw7duIbDCQkWSRduy5WMabghKinhbW1nWCubRE0LX4ij5cJBmsB Ig== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3r65020wdq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 12 Jun 2023 11:00:23 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 12 Jun 2023 11:00:22 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 12 Jun 2023 11:00:22 -0700 Received: from ml-host-33.caveonetworks.com (unknown [10.110.143.233]) by maili.marvell.com (Postfix) with ESMTP id C687F5B694C; Mon, 12 Jun 2023 11:00:21 -0700 (PDT) From: Srikanth Yalavarthi To: Srikanth Yalavarthi , Anup Prabhu CC: , , Subject: [PATCH v1] app/mldev: fix error reporting on IO failure Date: Mon, 12 Jun 2023 11:00:19 -0700 Message-ID: <20230612180019.13176-1-syalavarthi@marvell.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: 00fN1rNoAcenfi9fecl4d9WTQCmBJ7Mw X-Proofpoint-GUID: 00fN1rNoAcenfi9fecl4d9WTQCmBJ7Mw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-12_13,2023-06-12_02,2023-05-22_02 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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