[PATCH v2] test: parenthesize assertion macro parameters
Stephen Hemminger
stephen at networkplumber.org
Wed Apr 29 16:26:10 CEST 2026
On Mon, 27 Apr 2026 12:17:13 -0500
Weijun Pan <wpan3636 at gmail.com> wrote:
> 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>
This is not critical path code, and there is secondary problem
of arguements being evaluated multiple times. Perhaps use helper
functions instead.
For test.h do this. The rte_test.h part is correct.
Let me split them and send a followup
More information about the dev
mailing list