DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues.
@ 2018-01-11  9:41 Phil Yang
  2018-01-12  5:46 ` Jianbo Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Phil Yang @ 2018-01-11  9:41 UTC (permalink / raw)
  To: dev; +Cc: nd, jianbo.liu, herbert.guan

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 <phil.yang@arm.com>
---
 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];
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-01-17 23:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-11  9:41 [dpdk-dev] [PATCH] test/memzone: Fix test_memzone_basic & test_memzone_free issues Phil Yang
2018-01-12  5:46 ` Jianbo Liu
2018-01-12 17:43 ` Burakov, Anatoly
2018-01-15  5:57   ` Phil Yang
2018-01-15  5:43 ` [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues Phil Yang
2018-01-15  5:43   ` [dpdk-dev] [PATCH 1/2] test/memzone: Fix test_memzone_basic issue Phil Yang
2018-01-15  5:43   ` [dpdk-dev] [PATCH 2/2] test/memzone: Fix test_memzone_free issue Phil Yang
2018-01-17 23:41   ` [dpdk-dev] [PATCH 0/2] Fix memzone autotest issues Thomas Monjalon
2018-01-15  5:52 ` [dpdk-dev] [PATCH v2 " Phil Yang
2018-01-15  5:52   ` [dpdk-dev] [PATCH v2 1/2] test/memzone: Fix test_memzone_basic issue Phil Yang
2018-01-15  9:48     ` Burakov, Anatoly
2018-01-15  5:52   ` [dpdk-dev] [PATCH v2 2/2] test/memzone: Fix test_memzone_free issue Phil Yang
2018-01-15  9:49     ` Burakov, Anatoly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).