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 E816FA034F; Tue, 11 Jan 2022 14:42:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 588D742713; Tue, 11 Jan 2022 14:42:07 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 30F2741143 for ; Tue, 11 Jan 2022 14:42:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1641908525; x=1673444525; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mnU0RH389KKJ+xurCwvI5HjJXJyeEO1DGCaKdJwUtKc=; b=FOAFghsVUOek0VMxgELB+TAbEZ982uvDtOppr3hvzl6q+vjzgk9bJ9LB XB/tHwuzwkaR13LyEclXhBXpqPAUdlEwRsdDSc3orQtSZH3shnWyHjPzd nnZiF86unf9qMRgz3fjdsO667JfcHA1t703SUUf8K5y9YzdNx5g1EN7BW lDu9gWXdr8P9OSIn7sPyHY1T2HeXRx2Ow5Ylt2nkJGmevCK/ms6yW2OKu Xq+4IBkDnDudtkjHL9FJ6F8JLVFCL+axjvmfj98WjVubDIYwAyyEaz018 HmZt07hideJuxL72pZr64olfO54u4ePt0ppdDD1J1JHji7rQ+vwdIz0qH w==; X-IronPort-AV: E=McAfee;i="6200,9189,10223"; a="223467492" X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="223467492" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2022 05:42:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,279,1635231600"; d="scan'208";a="690997282" Received: from silpixa00399126.ir.intel.com ([10.237.223.86]) by orsmga005.jf.intel.com with ESMTP; 11 Jan 2022 05:42:03 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Chengwen Feng , Kevin Laatz Subject: [PATCH v2 4/4] test_dmadev: increase iterations of capacity test case Date: Tue, 11 Jan 2022 13:41:05 +0000 Message-Id: <20220111134105.1007191-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220111134105.1007191-1-bruce.richardson@intel.com> References: <20211220170514.736732-1-bruce.richardson@intel.com> <20220111134105.1007191-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 To ensure we catch any bugs in calculation due to wrap-around of the id values, increase the number of iterations of the burst_capacity test. Signed-off-by: Bruce Richardson --- app/test/test_dmadev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c index b206db27ae..db5aff701c 100644 --- a/app/test/test_dmadev.c +++ b/app/test/test_dmadev.c @@ -686,10 +686,11 @@ test_burst_capacity(int16_t dev_id, uint16_t vchan) /* to test capacity, we enqueue elements and check capacity is reduced * by one each time - rebaselining the expected value after each burst * as the capacity is only for a burst. We enqueue multiple bursts to - * fill up half the ring, before emptying it again. We do this twice to - * ensure that we get to test scenarios where we get ring wrap-around + * fill up half the ring, before emptying it again. We do this multiple + * times to ensure that we get to test scenarios where we get ring + * wrap-around and wrap-around of the ids returned (at UINT16_MAX). */ - for (iter = 0; iter < 2; iter++) { + for (iter = 0; iter < 2 * (((int)UINT16_MAX + 1) / ring_space); iter++) { for (i = 0; i < (ring_space / (2 * CAP_TEST_BURST_SIZE)) + 1; i++) { cap = rte_dma_burst_capacity(dev_id, vchan); -- 2.32.0