All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Marat Khalili <marat.khalili@huawei.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH] test: parenthesize common macro arguments
Date: Sat, 28 Mar 2026 14:51:49 -0700	[thread overview]
Message-ID: <20260328145149.6e2c303e@phoenix.local> (raw)
In-Reply-To: <20260326174749.40972-1-marat.khalili@huawei.com>

On Thu, 26 Mar 2026 17:47:49 +0000
Marat Khalili <marat.khalili@huawei.com> wrote:

> Parenthesize argument substitutions in macros commonly used by tests.
> 
> Without parentheses around arguments macros like TEST_ASSERT_SUCCESS
> could produce incorrect results if passed e.g. a ternary expression.
> 
> Signed-off-by: Marat Khalili <marat.khalili@huawei.com>
> ---
> Very curious how none of the code-checking tools we have like Coverity
> flagged this trivial issue.
> 
> To highlight non-whitespace changes: git show --word-diff --anchored='/*'

The bigger parts should be converted to functions.
This is test infrastructure no need for multi-line macros.

      reply	other threads:[~2026-03-28 21:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 17:47 [PATCH] test: parenthesize common macro arguments Marat Khalili
2026-03-28 21:51 ` Stephen Hemminger [this message]

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=20260328145149.6e2c303e@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=marat.khalili@huawei.com \
    /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 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.