[PATCH v2 06/10] app/test: fix operator precedence bug
Bruce Richardson
bruce.richardson at intel.com
Fri Nov 15 10:06:03 CET 2024
On Thu, Nov 14, 2024 at 11:25:04AM -0800, Stephen Hemminger wrote:
> The test loop was much shorter than desired because when
> MAX_NUM is defined with out paren's the divide operator /
> takes precedence over shift.
>
> But when MAX_NUM is fixed, some tests take too long
> and have to modified to avoid running over full N^2
> space of 1<<20.
>
> Note: this is a very old bug, goes back to 2013.
>
> Link: https://pvs-studio.com/en/blog/posts/cpp/1179/
>
> Fixes: 1fb8b07ee511 ("app: add some tests")
> Cc: stable at dpdk.org
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the stable
mailing list