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 02D53423F2; Mon, 16 Jan 2023 18:38:19 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28AD242D2A; Mon, 16 Jan 2023 18:38:02 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id B3FBF42D0E for ; Mon, 16 Jan 2023 18:37:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673890679; x=1705426679; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=clFEMN+caSJ2XWJZ8CvtgRiTLoqxEFz9MbLvMRL/uW0=; b=LqU6UNj5tPajUNvmoeO/fduzbL/GY6YVOEVucKZJFpuFV3/9mAqhDoIZ uvlA9WRsJ3ZR5SPWqbHfRhQElSLw6ZjpN8fYn53NfH3WrDLyEZPYwUHk+ HilJth/kqoPQdMKKIzt2Y88D4YR1GC36UmkCRChKNgufIbTzN347aauy6 ctc93JCfxpOq7wlK20bb+ILDAZzQ1Ya1q+nRQi2IBBTB33/IN3Ntuj6sN HIwR4yHYXenH8TtgfxBK1SwPduMO0wUCxPR52yXll+giu6y9J/xN81gup L/myK6/svtG93RzCP8iK9g05i5o3zhRnvZwcFJknPmjTEEjwuOGrCUTU9 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="326570399" X-IronPort-AV: E=Sophos;i="5.97,221,1669104000"; d="scan'208";a="326570399" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jan 2023 09:37:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10592"; a="987869185" X-IronPort-AV: E=Sophos;i="5.97,221,1669104000"; d="scan'208";a="987869185" Received: from silpixa00401385.ir.intel.com ([10.237.214.55]) by fmsmga005.fm.intel.com with ESMTP; 16 Jan 2023 09:37:58 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Chengwen Feng , Kevin Laatz Subject: [PATCH v2 4/6] test/dmadev: check result for device stop Date: Mon, 16 Jan 2023 17:37:35 +0000 Message-Id: <20230116173738.562322-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230116173738.562322-1-bruce.richardson@intel.com> References: <20230116153714.554470-1-bruce.richardson@intel.com> <20230116173738.562322-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