DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/3] test: fix typo in memzone autotest
@ 2017-12-21 18:19 Anatoly Burakov
  2017-12-21 18:19 ` [dpdk-dev] [PATCH 2/3] test: fix copypaste error " Anatoly Burakov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Anatoly Burakov @ 2017-12-21 18:19 UTC (permalink / raw)
  To: dev; +Cc: Sergio Gonzalez Monroy, radoslaw.biernacki, stable

Fixes: 71330483a193 ("test/memzone: fix memory leak")
Cc: radoslaw.biernacki@linaro.org
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 test/test/test_memzone.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index 1cf235a..aaffef9 100644
--- a/test/test/test_memzone.c
+++ b/test/test/test_memzone.c
@@ -948,11 +948,11 @@ test_memzone_basic(void)
 	return 0;
 }
 
-static int memzone_calk_called;
+static int memzone_walk_called;
 static void memzone_walk_clb(const struct rte_memzone *mz __rte_unused,
 			     void *arg __rte_unused)
 {
-	memzone_calk_called = 1;
+	memzone_walk_called = 1;
 }
 
 static int
@@ -996,7 +996,7 @@ test_memzone(void)
 
 	printf("check memzone cleanup\n");
 	rte_memzone_walk(memzone_walk_clb, NULL);
-	if (memzone_calk_called) {
+	if (memzone_walk_called) {
 		printf("there are some memzones left after test\n");
 		rte_memzone_dump(stdout);
 		return -1;
-- 
2.7.4

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

* [dpdk-dev] [PATCH 2/3] test: fix copypaste error in memzone autotest
  2017-12-21 18:19 [dpdk-dev] [PATCH 1/3] test: fix typo in memzone autotest Anatoly Burakov
@ 2017-12-21 18:19 ` Anatoly Burakov
  2017-12-21 18:19 ` [dpdk-dev] [PATCH 3/3] test: fix wrong test " Anatoly Burakov
  2018-01-03 12:01 ` [dpdk-dev] [PATCH 1/3] test: fix typo " Radoslaw Biernacki
  2 siblings, 0 replies; 5+ messages in thread
From: Anatoly Burakov @ 2017-12-21 18:19 UTC (permalink / raw)
  To: dev; +Cc: Sergio Gonzalez Monroy, chaozhu, stable

Fixes: b77b5639726e ("mem: add huge page sizes for IBM Power")
Cc: chaozhu@linux.vnet.ibm.com
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 test/test/test_memzone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index aaffef9..5c0567f 100644
--- a/test/test/test_memzone.c
+++ b/test/test/test_memzone.c
@@ -321,7 +321,7 @@ test_memzone_reserve_flags(void)
 		mz = rte_memzone_reserve("flag_zone_16M_HINT", size,
 		SOCKET_ID_ANY, RTE_MEMZONE_16MB|RTE_MEMZONE_SIZE_HINT_ONLY);
 		if (mz == NULL) {
-			printf("MEMZONE FLAG 2MB\n");
+			printf("MEMZONE FLAG 16MB\n");
 			return -1;
 		}
 		if (mz->hugepage_sz != RTE_PGSIZE_16M) {
-- 
2.7.4

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

* [dpdk-dev] [PATCH 3/3] test: fix wrong test in memzone autotest
  2017-12-21 18:19 [dpdk-dev] [PATCH 1/3] test: fix typo in memzone autotest Anatoly Burakov
  2017-12-21 18:19 ` [dpdk-dev] [PATCH 2/3] test: fix copypaste error " Anatoly Burakov
@ 2017-12-21 18:19 ` Anatoly Burakov
  2018-01-03 12:01 ` [dpdk-dev] [PATCH 1/3] test: fix typo " Radoslaw Biernacki
  2 siblings, 0 replies; 5+ messages in thread
From: Anatoly Burakov @ 2017-12-21 18:19 UTC (permalink / raw)
  To: dev; +Cc: Sergio Gonzalez Monroy, stable

When reserving memzones in autotest, it makes no sense to expect a
failed memzone reserve when we specify both size flags - instead,
we should expect a memzone reserved with one of the two sizes.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 test/test/test_memzone.c | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
index 5c0567f..ecd9880 100644
--- a/test/test/test_memzone.c
+++ b/test/test/test_memzone.c
@@ -289,10 +289,19 @@ test_memzone_reserve_flags(void)
 		if (hugepage_2MB_avail && hugepage_1GB_avail) {
 			mz = rte_memzone_reserve("flag_zone_2M_HINT", size, SOCKET_ID_ANY,
 								RTE_MEMZONE_2MB|RTE_MEMZONE_1GB);
-			if (mz != NULL) {
+			if (mz == NULL) {
 				printf("BOTH SIZES SET\n");
 				return -1;
 			}
+			if (mz->hugepage_sz != RTE_PGSIZE_1G &&
+					mz->hugepage_sz != RTE_PGSIZE_2M) {
+				printf("Wrong size when both sizes set\n");
+				return -1;
+			}
+			if (rte_memzone_free(mz)) {
+				printf("Fail memzone free\n");
+				return -1;
+			}
 		}
 	}
 	/*
@@ -424,10 +433,19 @@ test_memzone_reserve_flags(void)
 			mz = rte_memzone_reserve("flag_zone_16M_HINT", size,
 				SOCKET_ID_ANY,
 				RTE_MEMZONE_16MB|RTE_MEMZONE_16GB);
-			if (mz != NULL) {
+			if (mz == NULL) {
 				printf("BOTH SIZES SET\n");
 				return -1;
 			}
+			if (mz->hugepage_sz != RTE_PGSIZE_16G &&
+					mz->hugepage_sz != RTE_PGSIZE_16M) {
+				printf("Wrong size when both sizes set\n");
+				return -1;
+			}
+			if (rte_memzone_free(mz)) {
+				printf("Fail memzone free\n");
+				return -1;
+			}
 		}
 	}
 	return 0;
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH 1/3] test: fix typo in memzone autotest
  2017-12-21 18:19 [dpdk-dev] [PATCH 1/3] test: fix typo in memzone autotest Anatoly Burakov
  2017-12-21 18:19 ` [dpdk-dev] [PATCH 2/3] test: fix copypaste error " Anatoly Burakov
  2017-12-21 18:19 ` [dpdk-dev] [PATCH 3/3] test: fix wrong test " Anatoly Burakov
@ 2018-01-03 12:01 ` Radoslaw Biernacki
  2018-01-17 23:35   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  2 siblings, 1 reply; 5+ messages in thread
From: Radoslaw Biernacki @ 2018-01-03 12:01 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: dev, Sergio Gonzalez Monroy, stable

s///g effects ;)
Thank you!

Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>

On 21 December 2017 at 19:19, Anatoly Burakov <anatoly.burakov@intel.com>
wrote:

> Fixes: 71330483a193 ("test/memzone: fix memory leak")
> Cc: radoslaw.biernacki@linaro.org
> Cc: stable@dpdk.org
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> ---
>  test/test/test_memzone.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/test/test/test_memzone.c b/test/test/test_memzone.c
> index 1cf235a..aaffef9 100644
> --- a/test/test/test_memzone.c
> +++ b/test/test/test_memzone.c
> @@ -948,11 +948,11 @@ test_memzone_basic(void)
>         return 0;
>  }
>
> -static int memzone_calk_called;
> +static int memzone_walk_called;
>  static void memzone_walk_clb(const struct rte_memzone *mz __rte_unused,
>                              void *arg __rte_unused)
>  {
> -       memzone_calk_called = 1;
> +       memzone_walk_called = 1;
>  }
>
>  static int
> @@ -996,7 +996,7 @@ test_memzone(void)
>
>         printf("check memzone cleanup\n");
>         rte_memzone_walk(memzone_walk_clb, NULL);
> -       if (memzone_calk_called) {
> +       if (memzone_walk_called) {
>                 printf("there are some memzones left after test\n");
>                 rte_memzone_dump(stdout);
>                 return -1;
> --
> 2.7.4
>

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

* Re: [dpdk-dev] [dpdk-stable] [PATCH 1/3] test: fix typo in memzone autotest
  2018-01-03 12:01 ` [dpdk-dev] [PATCH 1/3] test: fix typo " Radoslaw Biernacki
@ 2018-01-17 23:35   ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2018-01-17 23:35 UTC (permalink / raw)
  To: Anatoly Burakov; +Cc: stable, Radoslaw Biernacki, dev, Sergio Gonzalez Monroy

03/01/2018 13:01, Radoslaw Biernacki:
> s///g effects ;)
> Thank you!
> 
> Reviewed-by: Radoslaw Biernacki <radoslaw.biernacki@linaro.org>
> 
> On 21 December 2017 at 19:19, Anatoly Burakov <anatoly.burakov@intel.com>
> wrote:
> 
> > Fixes: 71330483a193 ("test/memzone: fix memory leak")
> > Cc: radoslaw.biernacki@linaro.org
> > Cc: stable@dpdk.org
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

Series applied, thanks

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-21 18:19 [dpdk-dev] [PATCH 1/3] test: fix typo in memzone autotest Anatoly Burakov
2017-12-21 18:19 ` [dpdk-dev] [PATCH 2/3] test: fix copypaste error " Anatoly Burakov
2017-12-21 18:19 ` [dpdk-dev] [PATCH 3/3] test: fix wrong test " Anatoly Burakov
2018-01-03 12:01 ` [dpdk-dev] [PATCH 1/3] test: fix typo " Radoslaw Biernacki
2018-01-17 23:35   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

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).