All of lore.kernel.org
 help / color / mirror / Atom feed
* [DPDK/core Bug 1925] parameters of macros in lib/eal/include/rte_test.h are not parenthesized
@ 2026-04-03  8:55 bugzilla
  2026-06-16 10:50 ` bugzilla
  0 siblings, 1 reply; 2+ messages in thread
From: bugzilla @ 2026-04-03  8:55 UTC (permalink / raw)
  To: dev

http://bugs.dpdk.org/show_bug.cgi?id=1925

            Bug ID: 1925
           Summary: parameters of macros in lib/eal/include/rte_test.h are
                    not parenthesized
           Product: DPDK
           Version: 26.03
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev@dpdk.org
          Reporter: marat.khalili@huawei.com
  Target Milestone: ---

Parameters of macros like RTE_TEST_ASSERT_EQUAL defined in
lib/eal/include/rte_test.h are not enclosed in parentheses, which potentially
may result in unintended operator precedence after substitution and in the
worst case scenario false negatives in library and user tests. E.g. the
following statement:
```c
RTE_TEST_ASSERT_EQUAL(port_status & FLAG_UP, FLAG_UP, "Port is not UP!");
```
will check bit 1 (FLAG_UP == FLAG_UP) of port_status, not FLAG_UP.

See https://gcc.gnu.org/onlinedocs/cpp/Operator-Precedence-Problems.html

Same problem in app/test/test.h

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [DPDK/core Bug 1925] parameters of macros in lib/eal/include/rte_test.h are not parenthesized
  2026-04-03  8:55 [DPDK/core Bug 1925] parameters of macros in lib/eal/include/rte_test.h are not parenthesized bugzilla
@ 2026-06-16 10:50 ` bugzilla
  0 siblings, 0 replies; 2+ messages in thread
From: bugzilla @ 2026-06-16 10:50 UTC (permalink / raw)
  To: dev

http://bugs.dpdk.org/show_bug.cgi?id=1925

Thomas Monjalon (thomas@monjalon.net) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|IN_PROGRESS                 |RESOLVED

--- Comment #4 from Thomas Monjalon (thomas@monjalon.net) ---
Resolved in https://dpdk.org/id/55ab726133

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-16 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-03  8:55 [DPDK/core Bug 1925] parameters of macros in lib/eal/include/rte_test.h are not parenthesized bugzilla
2026-06-16 10:50 ` bugzilla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.