[PATCH v2] test: parenthesize assertion macro parameters

Marat Khalili marat.khalili at huawei.com
Wed Apr 29 14:31:41 CEST 2026


Acked-by: Marat Khalili <marat.khalili at huawei.com>

> -----Original Message-----
> From: Weijun Pan <wpan3636 at gmail.com>
> Sent: Monday 27 April 2026 18:17
> Cc: dev at dpdk.org; Weijun Pan <wpan3636 at gmail.com>
> Subject: [PATCH v2] test: parenthesize assertion macro parameters
> 
> Some test assertion macros use parameters directly in expressions,
> which can lead to unexpected evaluation due to operator precedence
> after macro substitution.
> 
> Fix this by parenthesizing macro parameters and the resulting
> expressions in rte_test.h and app/test/test.h.
> 
> This is a test macro robustness fix and does not fix a runtime issue
> in DPDK, so no Fixes or stable tags are added.
> 
> Bugzilla ID: 1925
> 
> Signed-off-by: Weijun Pan <wpan3636 at gmail.com>
> 
> ---
> v2:
> - Remove unnecessary parentheses surrounded by commas
> - Keep parenthesize substitutions even in unambiguous places in rte_test.h
>   to maintain coding style: parenthesize a condition
> - Keep msg unparenthesized to preserve string literal concatenation
> ---
>  app/test/test.h            | 30 +++++++++++++++---------------
>  lib/eal/include/rte_test.h | 12 ++++++------
>  2 files changed, 21 insertions(+), 21 deletions(-)
> 


More information about the dev mailing list