All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Li, WeiyuanX" <weiyuanx.li@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	Olivier Matz <olivier.matz@6wind.com>,
	Ray Kinsella <mdr@ashroe.eu>
Subject: RE: [PATCH v2 1/2] cmdline: add function to verify valid commands
Date: Mon, 23 May 2022 06:52:53 +0000	[thread overview]
Message-ID: <BN6PR11MB392362173B99563C405355D4E4D49@BN6PR11MB3923.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220520151240.139566-2-bruce.richardson@intel.com>

> -----Original Message-----
> From: Richardson, Bruce <bruce.richardson@intel.com>
> Sent: Friday, May 20, 2022 11:13 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Li, WeiyuanX <weiyuanx.li@intel.com>; Richardson,
> Bruce <bruce.richardson@intel.com>; Olivier Matz
> <olivier.matz@6wind.com>; Ray Kinsella <mdr@ashroe.eu>
> Subject: [PATCH v2 1/2] cmdline: add function to verify valid commands
> 
> The cmdline library cmdline_parse() function parses a command and
> executes the action automatically too. The cmdline_valid_buffer function
> also uses this function to validate commands, meaning that there is no
> function to validate a command as ok without executing it.
> 
> To fix this omission, we extract the body of cmdline_parse into a new static
> inline function with an extra parameter to indicate whether the action should
> be performed or not. Then we create two wrappers around that - a
> replacement for the existing cmdline_parse function where the extra
> parameter is "true" to execute the command, and a new function
> "cmdline_parse_check" which passes the parameter as "false" to perform
> cmdline validation only.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---

Tested-by:  Weiyuan Li  <weiyuanx.li@intel.com>

Regards,
Li, Weiyuan

  reply	other threads:[~2022-05-23  6:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 14:56 [PATCH 0/2] fix uncallable unit tests (Bugzilla 1002) Bruce Richardson
2022-05-20 14:56 ` [PATCH 1/2] cmdline: add function to verify valid commands Bruce Richardson
2022-05-24 14:57   ` Ray Kinsella
2022-05-20 14:56 ` [PATCH 2/2] test: use cmdline library to validate args Bruce Richardson
2022-05-20 15:12 ` [PATCH v2 0/2] fix uncallable unit tests (Bugzilla 1002) Bruce Richardson
2022-05-20 15:12   ` [PATCH v2 1/2] cmdline: add function to verify valid commands Bruce Richardson
2022-05-23  6:52     ` Li, WeiyuanX [this message]
2022-06-07  8:08     ` Olivier Matz
2022-06-10 14:08       ` Bruce Richardson
2022-06-10 14:21         ` Olivier Matz
2022-05-20 15:12   ` [PATCH v2 2/2] test: use cmdline library to validate args Bruce Richardson
2022-06-07  8:08     ` Olivier Matz
2022-06-10 14:24 ` [PATCH v3 0/2] fix uncallable unit tests (Bugzilla 1002) Bruce Richardson
2022-06-10 14:24   ` [PATCH v3 1/2] cmdline: add function to verify valid commands Bruce Richardson
2022-06-10 14:24   ` [PATCH v3 2/2] test: use cmdline library to validate args Bruce Richardson
2022-06-13  9:22   ` [PATCH v3 0/2] fix uncallable unit tests (Bugzilla 1002) David Marchand

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=BN6PR11MB392362173B99563C405355D4E4D49@BN6PR11MB3923.namprd11.prod.outlook.com \
    --to=weiyuanx.li@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=mdr@ashroe.eu \
    --cc=olivier.matz@6wind.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.