DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Santana Francisco <msantana@redhat.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, Aaron Conole <aconole@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] test/eal: fix incorrect array sizes
Date: Wed, 31 Jul 2019 15:57:23 -0400	[thread overview]
Message-ID: <CABzctQ9Wu2+DiT98GG5dgkz7OjUe6RPTnux-RJO4qtZzLw0-Dg@mail.gmail.com> (raw)
In-Reply-To: <1564599390-9684-1-git-send-email-david.marchand@redhat.com>

On Wed, Jul 31, 2019 at 2:56 PM David Marchand
<david.marchand@redhat.com> wrote:
>
> Following removal of -c and -n options, the array should have been
> shrunk to avoid launch_proc to access unitialised strings.
>
> Fixes: b4dbacdb1ad7 ("test/eal: set core mask/list config only in dedicated test")
> Fixes: 501fa9a40298 ("test/eal: set memory channel config only in dedicated test")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Good patch, but is it just me or are you off by one in some places? see inline
> ---
>  app/test/test_eal_flags.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
> index 827ea88..5b2c0f5 100644
> --- a/app/test/test_eal_flags.c
> +++ b/app/test/test_eal_flags.c
> @@ -244,7 +244,7 @@ test_whitelist_flag(void)
>         snprintf(prefix, sizeof(prefix), "--file-prefix=%s", tmp);
>  #endif
>
> -       const char *wlinval[][11] = {
> +       const char *wlinval[][7] = {
Shoudln't this be wlinval[][6]?
>                 {prgname, prefix, mp_flag,
>                                 pci_whitelist, "error", "", ""},
>                 {prgname, prefix, mp_flag,
> @@ -310,7 +310,7 @@ test_invalid_b_flag(void)
>         snprintf(prefix, sizeof(prefix), "--file-prefix=%s", tmp);
>  #endif
>
> -       const char *blinval[][9] = {
> +       const char *blinval[][5] = {
blinval[][6]?
>                 {prgname, prefix, mp_flag, "-b", "error"},
>                 {prgname, prefix, mp_flag, "-b", "0:0:0"},
>                 {prgname, prefix, mp_flag, "-b", "0:error:0.1"},
> @@ -414,7 +414,7 @@ test_invalid_r_flag(void)
>         snprintf(prefix, sizeof(prefix), "--file-prefix=%s", tmp);
>  #endif
>
> -       const char *rinval[][9] = {
> +       const char *rinval[][5] = {
rinval[][4]?
>                         {prgname, prefix, mp_flag, "-r", "error"},
>                         {prgname, prefix, mp_flag, "-r", "0"},
>                         {prgname, prefix, mp_flag, "-r", "-1"},
> --
> 1.8.3.1
>

  reply	other threads:[~2019-07-31 19:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 18:56 David Marchand
2019-07-31 19:57 ` Michael Santana Francisco [this message]
2019-08-01  7:25   ` David Marchand
2019-08-02 13:43     ` Michael Santana Francisco
2019-08-02 20:49       ` 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=CABzctQ9Wu2+DiT98GG5dgkz7OjUe6RPTnux-RJO4qtZzLw0-Dg@mail.gmail.com \
    --to=msantana@redhat.com \
    --cc=aconole@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /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).