patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] test/compress: fix max mbuf size test case
@ 2019-04-19  9:57 Tomasz Jozwiak
  2019-04-19 10:05 ` [dpdk-stable] [dpdk-dev] " Bruce Richardson
  2019-04-19 10:17 ` Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: Tomasz Jozwiak @ 2019-04-19  9:57 UTC (permalink / raw)
  To: dev, stable, fiona.trahe, tomaszx.jozwiak, yskoh

Fixed the compilation error on gcc (GCC)
4.8.5 20150623 (Red Hat 4.8.5-28)

Fixes: 355b02eedc65 ("test/compress: add max mbuf size test case")
Cc: stable@dpdk.org

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
---
 app/test/test_compressdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c
index 404b98f..603eeea 100644
--- a/app/test/test_compressdev.c
+++ b/app/test/test_compressdev.c
@@ -1948,6 +1948,7 @@ test_compressdev_deflate_stateless_dynamic_big(void)
 	struct comp_testsuite_params *ts_params = &testsuite_params;
 	uint16_t i = 0;
 	int ret = TEST_SUCCESS;
+	int j = 0;
 	const struct rte_compressdev_capabilities *capab;
 	char *test_buffer = NULL;
 
@@ -1989,8 +1990,8 @@ test_compressdev_deflate_stateless_dynamic_big(void)
 
 	/* fill the buffer with data based on rand. data */
 	srand(BIG_DATA_TEST_SIZE);
-	for (uint32_t i = 0; i < BIG_DATA_TEST_SIZE - 1; ++i)
-		test_buffer[i] = (uint8_t)(rand() % ((uint8_t)-1)) | 1;
+	for (j = 0; j < BIG_DATA_TEST_SIZE - 1; ++j)
+		test_buffer[j] = (uint8_t)(rand() % ((uint8_t)-1)) | 1;
 
 	test_buffer[BIG_DATA_TEST_SIZE-1] = 0;
 	int_data.buf_idx = &i;
-- 
2.7.4


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] test/compress: fix max mbuf size test case
  2019-04-19  9:57 [dpdk-stable] [PATCH] test/compress: fix max mbuf size test case Tomasz Jozwiak
@ 2019-04-19 10:05 ` Bruce Richardson
  2019-04-19 10:17 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Bruce Richardson @ 2019-04-19 10:05 UTC (permalink / raw)
  To: Tomasz Jozwiak; +Cc: dev, stable, fiona.trahe, yskoh

On Fri, Apr 19, 2019 at 11:57:07AM +0200, Tomasz Jozwiak wrote:
> Fixed the compilation error on gcc (GCC)
> 4.8.5 20150623 (Red Hat 4.8.5-28)
> 
> Fixes: 355b02eedc65 ("test/compress: add max mbuf size test case")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
> ---
>  app/test/test_compressdev.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
This fixes compilation for me with gcc4.8, though I can't comment on the
correctness of the code.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] test/compress: fix max mbuf size test case
  2019-04-19  9:57 [dpdk-stable] [PATCH] test/compress: fix max mbuf size test case Tomasz Jozwiak
  2019-04-19 10:05 ` [dpdk-stable] [dpdk-dev] " Bruce Richardson
@ 2019-04-19 10:17 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2019-04-19 10:17 UTC (permalink / raw)
  To: Tomasz Jozwiak; +Cc: dev, stable, fiona.trahe, yskoh, bruce.richardson

Please check my comments below:

19/04/2019 11:57, Tomasz Jozwiak:
> Fixed the compilation error on gcc (GCC)
> 4.8.5 20150623 (Red Hat 4.8.5-28)

It is seen with more compilers:
https://build.opensuse.org/project/show/home:bluca:dpdk

Please add the log of the error.

> Fixes: 355b02eedc65 ("test/compress: add max mbuf size test case")
> Cc: stable@dpdk.org

It is a recent commit, no need to Cc stable for backport.

> Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
> ---
>  app/test/test_compressdev.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c
> index 404b98f..603eeea 100644
> --- a/app/test/test_compressdev.c
> +++ b/app/test/test_compressdev.c
> @@ -1948,6 +1948,7 @@ test_compressdev_deflate_stateless_dynamic_big(void)
>  	struct comp_testsuite_params *ts_params = &testsuite_params;
>  	uint16_t i = 0;
>  	int ret = TEST_SUCCESS;
> +	int j = 0;
>  	const struct rte_compressdev_capabilities *capab;
>  	char *test_buffer = NULL;
>  
> @@ -1989,8 +1990,8 @@ test_compressdev_deflate_stateless_dynamic_big(void)
>  
>  	/* fill the buffer with data based on rand. data */
>  	srand(BIG_DATA_TEST_SIZE);
> -	for (uint32_t i = 0; i < BIG_DATA_TEST_SIZE - 1; ++i)
> -		test_buffer[i] = (uint8_t)(rand() % ((uint8_t)-1)) | 1;
> +	for (j = 0; j < BIG_DATA_TEST_SIZE - 1; ++j)
> +		test_buffer[j] = (uint8_t)(rand() % ((uint8_t)-1)) | 1;
>  
>  	test_buffer[BIG_DATA_TEST_SIZE-1] = 0;
>  	int_data.buf_idx = &i;

What is supposed to be "i"?
It is initialized at 0 and never touched.



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

end of thread, other threads:[~2019-04-19 10:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-19  9:57 [dpdk-stable] [PATCH] test/compress: fix max mbuf size test case Tomasz Jozwiak
2019-04-19 10:05 ` [dpdk-stable] [dpdk-dev] " Bruce Richardson
2019-04-19 10:17 ` 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).