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 7C75C423F1; Mon, 16 Jan 2023 16:37:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F089342C54; Mon, 16 Jan 2023 16:37:44 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 6A5A342C54 for ; Mon, 16 Jan 2023 16:37:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673883463; x=1705419463; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dMtPYaqO1H4YzTxPQY04XxsyD6/YnL3VpwmaVaxASic=; b=U+N0rs//QI12CzAl3JZo0fJAXUBtpxjMCrHuIvOWUm1j4y8VWSogvVea IIG66w8QqCyXj8XsU9ibF/pocMpqyHlTKhYyo1wYEn+lSTQILT/xF3FVK Y+GrWAgpq5YcEUoF9t44p2rrxwxzb8pO0bdeYJYgv3ekMJZKieaRQgc0N r1GEgUPWB+b8bmOIiLMArvSpFzZoB29LXZ+XRdikBC1UxpecsQHe2qlTU +EOW81y6EK4aQMVIBucLPw+sd4Frqa7rgNZEbV37DeyRI4oIZWknDBED2 vYjswmA2542oUnDxohVdRr3J6VH+bRPPSvDpbEPiHOJFSuymIHxPSS4d4 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="351735370" X-IronPort-AV: E=Sophos;i="5.97,221,1669104000"; d="scan'208";a="351735370" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 07:37:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="727505474" X-IronPort-AV: E=Sophos;i="5.97,221,1669104000"; d="scan'208";a="727505474" Received: from silpixa00401385.ir.intel.com ([10.237.214.55]) by fmsmga004.fm.intel.com with ESMTP; 16 Jan 2023 07:37:41 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Chengwen Feng , Kevin Laatz Subject: [PATCH 3/5] test/dmadev: check result for device stop Date: Mon, 16 Jan 2023 15:37:12 +0000 Message-Id: <20230116153714.554470-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116153714.554470-1-bruce.richardson@intel.com> References: <20230116153714.554470-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The DMA device stop API can return an error value so check that return value when running dmadev unit tests. Signed-off-by: Bruce Richardson --- app/test/test_dmadev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index fe62e98af8..4e1dbcaa19 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c @@ -837,7 +837,11 @@ test_dmadev_instance(int16_t dev_id) goto err; rte_mempool_free(pool); - rte_dma_stop(dev_id); + + if (rte_dma_stop(dev_id) < 0) { + rte_mempool_free(pool); + ERR_RETURN("Error stopping device %u\n", dev_id); + } rte_dma_stats_reset(dev_id, vchan); return 0; -- 2.37.2