DPDK patches and discussions
 help / color / mirror / Atom feed
From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, tomaszx.jozwiak@intel.com,
	yskoh@mellanox.com, bruce.richardson@intel.com,
	thomas@monjalon.net, Fiona Trahe <fiona.trahe@intel.com>
Subject: [dpdk-dev] [PATCH v3] test/compress: fix max mbuf size test case
Date: Fri, 19 Apr 2019 17:52:48 +0100	[thread overview]
Message-ID: <1555692768-17046-1-git-send-email-fiona.trahe@intel.com> (raw)
Message-ID: <20190419165248.9LcZlFKzlg1RQxXMUZC9-o7c48_tuRFBA5Merz4JJ6I@z> (raw)
In-Reply-To: <1555674338-4887-1-git-send-email-tomaszx.jozwiak@intel.com>

Fixed the compilation error:

../app/test/test_compressdev.c:1949:11: note: previous
definition of 'i' was here

../app/test/test_compressdev.c:1992:2: error: 'for' loop
initial declarations are only allowed in C99 mode

../app/test/test_compressdev.c:1992:2: note: use option
-std=c99 or -std=gnu99 to compile your code

../app/test/test_compressdev.c:1996:19: warning: assignment
from incompatible pointer type [enabled by default]

Fixes: 355b02eedc65 ("test/compress: add max mbuf size test case")

Signed-off-by: Tomasz Jozwiak <tomaszx.jozwiak@intel.com>
Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
v3 changes:
 - moved idx variable to improve code clarity and consistency
   with other tests

v2 changes:
 - added compile error to commit msg

 app/test/test_compressdev.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/app/test/test_compressdev.c b/app/test/test_compressdev.c
index 404b98f60..8d6dbf00d 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;
 	const struct rte_compressdev_capabilities *capab;
 	char *test_buffer = NULL;
 
@@ -1970,7 +1971,7 @@ test_compressdev_deflate_stateless_dynamic_big(void)
 	struct interim_data_params int_data = {
 		(const char * const *)&test_buffer,
 		1,
-		NULL,
+		&i,
 		&ts_params->def_comp_xform,
 		&ts_params->def_decomp_xform,
 		1
@@ -1989,11 +1990,9 @@ 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;
 
 	/* Compress with compressdev, decompress with Zlib */
 	test_data.zlib_dir = ZLIB_DECOMPRESS;
-- 
2.13.6


  parent reply	other threads:[~2019-04-19 16:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19  9:57 [dpdk-dev] [PATCH] " Tomasz Jozwiak
2019-04-19  9:57 ` Tomasz Jozwiak
2019-04-19 10:05 ` Bruce Richardson
2019-04-19 10:05   ` Bruce Richardson
2019-04-19 10:17 ` Thomas Monjalon
2019-04-19 10:17   ` Thomas Monjalon
     [not found]   ` <CA70B6012E3ADB4184D44E025E5FF01B6A20A888@LCSMSX155.ger.corp.intel.com>
2019-04-19 11:25     ` Thomas Monjalon
2019-04-19 11:25       ` Thomas Monjalon
2019-04-19 11:36       ` Jozwiak, TomaszX
2019-04-19 11:36         ` Jozwiak, TomaszX
2019-04-19 11:50         ` Thomas Monjalon
2019-04-19 11:50           ` Thomas Monjalon
2019-04-19 12:14           ` Jozwiak, TomaszX
2019-04-19 12:14             ` Jozwiak, TomaszX
2019-04-19 17:01             ` Trahe, Fiona
2019-04-19 17:01               ` Trahe, Fiona
2019-04-19 10:49 ` David Marchand
2019-04-19 10:49   ` David Marchand
2019-04-19 11:45 ` [dpdk-dev] [PATCH v2] " Tomasz Jozwiak
2019-04-19 11:45   ` Tomasz Jozwiak
2019-04-19 16:52   ` Fiona Trahe [this message]
2019-04-19 16:52     ` [dpdk-dev] [PATCH v3] " Fiona Trahe
2019-04-19 21:06     ` Thomas Monjalon
2019-04-19 21:06       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1555692768-17046-1-git-send-email-fiona.trahe@intel.com \
    --to=fiona.trahe@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    --cc=tomaszx.jozwiak@intel.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).