From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 1162C7260 for ; Fri, 12 Jan 2018 18:43:56 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jan 2018 09:43:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,350,1511856000"; d="scan'208";a="9151273" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.237.220.145]) ([10.237.220.145]) by fmsmga007.fm.intel.com with ESMTP; 12 Jan 2018 09:43:53 -0800 To: Phil Yang , dev@dpdk.org Cc: nd@arm.com, jianbo.liu@arm.com, herbert.guan@arm.com References: <1515663706-762-1-git-send-email-phil.yang@arm.com> From: "Burakov, Anatoly" Message-ID: Date: Fri, 12 Jan 2018 17:43:52 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1515663706-762-1-git-send-email-phil.yang@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 17:43:57 -0000 On 11-Jan-18 9:41 AM, Phil Yang wrote: > 1. test_memzone_basic: No need to free a NULL memzone. It will cause test > termination. > 2. test_memzone_free: Out of mz[RTE_MAX_MEMZONE] memory bound while > reserving memzone for mz. It will flush variable i. Fix by extend to > mz[RTE_MAX_MEMZONE + 1]. > > Signed-off-by: Phil Yang > --- > test/test/test_memzone.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c > index 6e80977..24e29a7 100644 > --- a/test/test/test_memzone.c > +++ b/test/test/test_memzone.c > @@ -251,10 +251,6 @@ test_memzone_reserve_flags(void) > printf("MEMZONE FLAG 2MB\n"); > return -1; > } > - if (rte_memzone_free(mz)) { > - printf("Fail memzone free\n"); > - return -1; > - } > } > > if (hugepage_2MB_avail && hugepage_1GB_avail) { > @@ -746,7 +742,7 @@ test_memzone_bounded(void) > static int > test_memzone_free(void) > { > - const struct rte_memzone *mz[RTE_MAX_MEMZONE]; > + const struct rte_memzone *mz[RTE_MAX_MEMZONE + 1]; > int i; > char name[20]; > > This should be split into two separate patches, as there are two different issues being addressed. Provided that's done, Acked-by: Anatoly Burakov -- Thanks, Anatoly