All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Mingjin Ye <mingjinx.ye@intel.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH v4] test: fix option devices
Date: Tue, 24 Feb 2026 08:30:16 -0800	[thread overview]
Message-ID: <20260224083016.2c07ba44@phoenix.local> (raw)
In-Reply-To: <20241016081719.1619975-1-mingjinx.ye@intel.com>

On Wed, 16 Oct 2024 08:17:19 +0000
Mingjin Ye <mingjinx.ye@intel.com> wrote:

> +		for (i = 0; i < numargs; i++) {
> +			if (strcmp(argv[i], "-b") == 0 ||
> +			    strcmp(argv[i], "--block") == 0)
> +				block_num++;
> +			if (strcmp(argv[i], "-a") == 0 ||
> +			    strcmp(argv[i], "--allow") == 0)
> +				allow_num++;
> +		}

The long options format allows the equals form, but this doesn't.

The argv scan for -a/-b/--allow/--block uses exact strcmp, so it won't
detect the --allow=DEVICE or --block=DEVICE joined form. If callers use
the = form, the parent's device list will be duplicated in the child's
arguments. Consider adding strncmp checks for the PREFIX_ALLOW and
PREFIX_BLOCK prefixes or use getopt_long to scan.

This is not a huge issue, but could you change and resubmit.

      parent reply	other threads:[~2026-02-24 16:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  9:46 [PATCH] test: fix option block Mingjin Ye
2024-03-15  6:49 ` Jiale, SongX
     [not found] ` <LV3PR11MB8601B4FC344CC7102C5AC010E5DD2@LV3PR11MB8601.namprd11.prod.outlook.com>
2024-07-03 14:35   ` Stokes, Ian
2024-07-04  8:09     ` Ye, MingjinX
2024-07-04 12:02       ` Stokes, Ian
2024-07-05  1:38         ` Ye, MingjinX
2024-07-10  9:02           ` Stokes, Ian
2024-10-07 17:02 ` Stephen Hemminger
2024-10-12  9:35 ` [PATCH v2] " Mingjin Ye
2024-10-12 22:20   ` Stephen Hemminger
2024-10-14 10:22     ` Ye, MingjinX
2024-10-14 10:00   ` [PATCH v3] test: fix option devices Mingjin Ye
2024-10-15 16:21     ` Stephen Hemminger
2024-10-16  8:17     ` [PATCH v4] " Mingjin Ye
2024-10-17  2:31       ` Jiale, SongX
2026-02-24 16:30       ` 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=20260224083016.2c07ba44@phoenix.local \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=mingjinx.ye@intel.com \
    --cc=stable@dpdk.org \
    /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.