DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Cc: reshma.pattan@intel.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] test/reorder: fix reorder drain test
Date: Thu, 12 Oct 2017 09:28:00 +0100	[thread overview]
Message-ID: <20171012082759.GA44304@bricha3-MOBL3.ger.corp.intel.com> (raw)
In-Reply-To: <1505228764-9738-2-git-send-email-pbhagavatula@caviumnetworks.com>

On Tue, Sep 12, 2017 at 08:36:04PM +0530, Pavan Nikhilesh wrote:
> The reorder drain test fails due to mempool corruption caused by freeing
> packet buffer twice.
> 
> Fixes: d0c9b58d7156 ("app/test: new reorder unit test")
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> ---
>  test/test/test_reorder.c | 33 +++++++++++++++++++++++----------
>  1 file changed, 23 insertions(+), 10 deletions(-)
> 
> diff --git a/test/test/test_reorder.c b/test/test/test_reorder.c
> index 4ec22ac..51c2dcd 100644
> --- a/test/test/test_reorder.c
> +++ b/test/test/test_reorder.c
> @@ -70,13 +70,15 @@ test_reorder_create(void)
>  	TEST_ASSERT((b == NULL) && (rte_errno == EINVAL),
>  			"No error on create() with NULL name");
>  
> -	b = rte_reorder_create("PKT", rte_socket_id(), REORDER_BUFFER_SIZE_INVALID);
> +	b = rte_reorder_create("PKT", rte_socket_id(),
> +			REORDER_BUFFER_SIZE_INVALID);
>  	TEST_ASSERT((b == NULL) && (rte_errno == EINVAL),
>  			"No error on create() with invalid buffer size param.");
>  
>  	b = rte_reorder_create("PKT_RO1", rte_socket_id(), REORDER_BUFFER_SIZE);
>  	TEST_ASSERT_EQUAL(b, test_params->b,
> -			"New reorder instance created with already existing name");
> +			"New reorder instance created with already existing"
> +			" name");
>  
>  	return 0;
>  }

These changes are just cosmetic and so shouldn't really be included in
this patch. Ideally, cosmetic changes should be made only when you are
already touching the affected lines anyway due to some other change.
Also, it's bad practice to split literal strings across lines, even if
the line ends up crossing the 80-char threshold. Being able to grep
error strings is more important than keeping lines short.

This applies to many of the other changes in this patch. It makes it hard to
review for the actual functional changes.

Regards,
/Bruce

  reply	other threads:[~2017-10-12  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 15:06 [dpdk-dev] [PATCH 1/2] reorder: fix ready buffers not being nulled out Pavan Nikhilesh
2017-09-12 15:06 ` [dpdk-dev] [PATCH 2/2] test/reorder: fix reorder drain test Pavan Nikhilesh
2017-10-12  8:28   ` Bruce Richardson [this message]
2017-10-11 21:04 ` [dpdk-dev] [PATCH 1/2] reorder: fix ready buffers not being nulled out Thomas Monjalon
2017-10-12  8:32 ` Bruce Richardson

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=20171012082759.GA44304@bricha3-MOBL3.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@caviumnetworks.com \
    --cc=reshma.pattan@intel.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).