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 6699943C5D; Tue, 12 Mar 2024 02:29:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1DB7940E7C; Tue, 12 Mar 2024 02:29:37 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 649554013F for ; Tue, 12 Mar 2024 02:29:09 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4TtwyF6bTtzbcxR; Tue, 12 Mar 2024 09:28:21 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id CEB2A140F7C; Tue, 12 Mar 2024 09:29:06 +0800 (CST) Received: from [10.67.121.161] (10.67.121.161) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 12 Mar 2024 09:29:06 +0800 Subject: Re: [PATCH] test/dma: fix api testuite teardown To: Kevin Laatz , CC: , References: <20240311152550.1406686-1-kevin.laatz@intel.com> From: fengchengwen Message-ID: <1f3988ea-8e74-ce66-f749-4d0003f9eced@huawei.com> Date: Tue, 12 Mar 2024 09:29:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <20240311152550.1406686-1-kevin.laatz@intel.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.161] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpeml500024.china.huawei.com (7.185.36.10) 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 It's not a bugfix, but a best practice for test (clean state before continuing). The other is LGTM, Acked-by: Chengwen Feng On 2024/3/11 23:25, Kevin Laatz wrote: > The API testsuite previously only used the dmadev skeleton. Now that real > devices are being used for the API tests, the DMA stats need to be reset > during testsuite teardown to ensure a known, clean state before continuing. > > Fixes: 14b477ed1740 ("test/dma: use unit test framework") > > Signed-off-by: Kevin Laatz > --- > app/test/test_dmadev_api.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/app/test/test_dmadev_api.c b/app/test/test_dmadev_api.c > index a130e74b51..d40c05cfbf 100644 > --- a/app/test/test_dmadev_api.c > +++ b/app/test/test_dmadev_api.c > @@ -82,6 +82,7 @@ testsuite_teardown(void) > dst = NULL; > /* Ensure the dmadev is stopped. */ > rte_dma_stop(test_dev_id); > + rte_dma_stats_reset(test_dev_id, RTE_DMA_ALL_VCHAN); > > rte_log_set_level_pattern("lib.dmadev", RTE_LOG_INFO); > } >