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 B50A541CB1; Thu, 16 Feb 2023 12:09:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 940B442D40; Thu, 16 Feb 2023 12:09:45 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 902B042D2D for ; Thu, 16 Feb 2023 12:09:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676545784; x=1708081784; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7TvFRxftjUlmlTXkv4GGx7IcHm3n2JI2aYhlNd1fqOw=; b=O6CkVdjJqGxqNvzUt0VovdwVTWG2mujYDs3POK8jK/oIYV7cyGWRbB9Q IjTU0jBzm0Qg84nWsihhAGksre8gX1b9xa6IiUWLEj5K8EpAIgp8OfoDU Dh7uLd6bc0rftM9ZAQuBw+vmwf1sl47XeTG8mM4lF+hXaRwG9TOWMcs3C 5P9qVDKPNMjt1JCuZLznEis3voh2kUWRkAkTRMpHPVg/h6vXIIC7t6OFd zCUngq/ojzZ4r6k+VgEGVtCAqMvKapT8SGaxIddsI/KAMoGWwATit5/I0 nnjUSwjCE402Rc6kzBMu9kRWGMPzXZhjjHygyBiixjeTE+FMkCQRJYeNn w==; X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="315368183" X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208";a="315368183" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2023 03:09:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="702522839" X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208";a="702522839" Received: from silpixa00401385.ir.intel.com ([10.237.214.22]) by orsmga001.jf.intel.com with ESMTP; 16 Feb 2023 03:09:42 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: fengchengwen@huawei.com, Bruce Richardson , Conor Walsh , Kevin Laatz Subject: [PATCH v3 4/6] test/dmadev: check result for device stop Date: Thu, 16 Feb 2023 11:09:17 +0000 Message-Id: <20230216110919.373385-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230216110919.373385-1-bruce.richardson@intel.com> References: <20230116153714.554470-1-bruce.richardson@intel.com> <20230216110919.373385-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 Reviewed-by: Conor Walsh Acked-by: Kevin Laatz --- app/test/test_dmadev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index fe62e98af8..65226004d8 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c @@ -837,7 +837,10 @@ 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) + ERR_RETURN("Error stopping device %u\n", dev_id); + rte_dma_stats_reset(dev_id, vchan); return 0; -- 2.37.2