DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: <dev@dpdk.org>, <msantana@redhat.com>, <stable@dpdk.org>,
	Tyler Retzlaff <roretzla@linux.microsoft.com>,
	Michael Santana <maicolgabriel@hotmail.com>,
	David Marchand <david.marchand@redhat.com>,
	Aaron Conole <aconole@redhat.com>
Subject: Re: [PATCH v2 07/10] test/eal: fix core check in c flag test
Date: Fri, 15 Nov 2024 09:07:42 +0000	[thread overview]
Message-ID: <ZzcPXs_gY61nx9fd@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20241114192603.41145-8-stephen@networkplumber.org>

On Thu, Nov 14, 2024 at 11:25:05AM -0800, Stephen Hemminger wrote:
> The expression for checking which lcore is enabled for 0-7
> was wrong (missing case for 6).
> 
> Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
> 
> Fixes: b0209034f2bb ("test/eal: check number of cores before running subtests")
> Cc: msantana@redhat.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Just wondering would it not be better/safer to put in an actual loop check
here? 
However, I'm also ok with keeping the fix as-is, so:

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


> ---
>  app/test/test_eal_flags.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
> index d37d6b8627..e32f83d3c8 100644
> --- a/app/test/test_eal_flags.c
> +++ b/app/test/test_eal_flags.c
> @@ -677,8 +677,8 @@ test_missing_c_flag(void)
>  
>  	if (rte_lcore_is_enabled(0) && rte_lcore_is_enabled(1) &&
>  	    rte_lcore_is_enabled(2) && rte_lcore_is_enabled(3) &&
> -	    rte_lcore_is_enabled(3) && rte_lcore_is_enabled(5) &&
> -	    rte_lcore_is_enabled(4) && rte_lcore_is_enabled(7) &&
> +	    rte_lcore_is_enabled(4) && rte_lcore_is_enabled(5) &&
> +	    rte_lcore_is_enabled(6) && rte_lcore_is_enabled(7) &&
>  	    launch_proc(argv29) != 0) {
>  		printf("Error - "
>  		       "process did not run ok with valid corelist value\n");
> -- 
> 2.45.2
> 

  reply	other threads:[~2024-11-15  9:08 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14  0:12 [RFC 00/10] unit test bugs Stephen Hemminger
2024-11-14  0:12 ` [RFC 01/10] app/test: do not duplicate loop variable Stephen Hemminger
2024-11-14  0:12 ` [RFC 02/10] app/test: fix typo in mac address compare Stephen Hemminger
2024-11-14  0:12 ` [RFC 03/10] app/test: fix paren typo Stephen Hemminger
2024-11-14  0:12 ` [RFC 04/10] app/test: avoid duplicate initialization Stephen Hemminger
2024-11-14  0:12 ` [RFC 05/10] app/test: fix TLS zero length record Stephen Hemminger
2024-11-14  0:12 ` [RFC 06/10] test/eal: fix core check in c flag test Stephen Hemminger
2024-11-14  0:12 ` [RFC 07/10] app/test-pmd: remove redundant condition Stephen Hemminger
2024-11-14  0:12 ` [RFC 08/10] app/test-pmd: avoid potential outside of array reference Stephen Hemminger
2024-11-14  0:12 ` [RFC 09/10] app/test-dma-perf: fix parsing of dma address Stephen Hemminger
2024-11-14  7:00   ` Morten Brørup
2024-11-14 16:21     ` Stephen Hemminger
2024-11-15  7:19   ` fengchengwen
2024-11-14  0:12 ` [RFC 10/10] app/test: fix operator precedence bug Stephen Hemminger
2024-11-14 19:24 ` [PATCH v2 00/10] Bug fixes for unit tests Stephen Hemminger
2024-11-14 19:24   ` [PATCH v2 01/10] app/test: do not duplicated loop variable Stephen Hemminger
2024-11-15  9:01     ` Bruce Richardson
2024-11-14 19:25   ` [PATCH v2 02/10] app/test: fix typo in address compare Stephen Hemminger
2024-11-14 19:25   ` [PATCH v2 03/10] app/test: fix paren typo Stephen Hemminger
2024-11-15  9:02     ` Bruce Richardson
2024-11-14 19:25   ` [PATCH v2 04/10] app/test: avoid duplicate initialization Stephen Hemminger
2024-11-15  9:03     ` Bruce Richardson
2024-11-14 19:25   ` [PATCH v2 05/10] app/test: fix TLS zero length record Stephen Hemminger
2024-11-14 19:25   ` [PATCH v2 06/10] app/test: fix operator precedence bug Stephen Hemminger
2024-11-15  9:06     ` Bruce Richardson
2024-11-14 19:25   ` [PATCH v2 07/10] test/eal: fix core check in c flag test Stephen Hemminger
2024-11-15  9:07     ` Bruce Richardson [this message]
2024-11-14 19:25   ` [PATCH v2 08/10] app/test-pmd: remove redundant condition Stephen Hemminger
2024-11-14 19:27     ` Ajit Khaparde
2024-11-15  9:08     ` Bruce Richardson
2024-11-14 19:25   ` [PATCH v2 09/10] app/test-pmd: avoid potential outside of array reference Stephen Hemminger
2024-11-15  9:09     ` Bruce Richardson
2024-11-14 19:25   ` [PATCH v2 10/10] app/test-dma-perf: fix parsing of DMA address Stephen Hemminger
2024-11-15  9:13     ` 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=ZzcPXs_gY61nx9fd@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=aconole@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maicolgabriel@hotmail.com \
    --cc=msantana@redhat.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.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).