linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ira Weiny <ira.weiny@intel.com>
To: Sohil Mehta <sohil.mehta@intel.com>
Cc: <linux-api@vger.kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
	<x86@kernel.org>, <linuxppc-dev@lists.ozlabs.org>,
	<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
	<linux-kselftest@vger.kernel.org>
Subject: Re: [RFC PATCH 1/6] testing/pkeys: Add command line options
Date: Mon, 13 Jun 2022 16:41:35 -0700	[thread overview]
Message-ID: <YqfLL2IyMWWWkvQd@iweiny-desk3> (raw)
In-Reply-To: <951dc92e-b4fe-71fb-4601-d9df1319a9ca@intel.com>

On Mon, Jun 13, 2022 at 03:31:02PM -0700, Mehta, Sohil wrote:
> On 6/10/2022 4:35 PM, ira.weiny@intel.com wrote:
> 
> > Add command line options for debug level and number of iterations.
> > 
> > $ ./protection_keys_64 -h
> > Usage: ./protection_keys_64 [-h,-d,-i <iter>]
> >          --help,-h   This help
> > 	--debug,-d  Increase debug level for each -d
> 
> Is this mechanism (of counting d's) commonplace in other selftests as well?
> Looking at the test code for pkeys the debug levels run from 1-5. That feels
> like quite a few d's to input :)

I've seen (and used) it before yes.  See ibnetdiscover.

...
# Debugging flags
-d raise the IB debugging level. May be used several times (-ddd or -d -d -d).
...
-v increase the application verbosity level. May be used several times (-vv or -v -v -v)
...
	- https://linux.die.net/man/8/ibnetdiscover

But a much more mainstream example I can think of is verbosity level with
lspci.

16:29:12 > lspci -h
...
Display options:
-v              Be verbose (-vv or -vvv for higher verbosity)
...

> 
> Would it be easier to input the number in the command line directly?
> 
> Either way it would be useful to know the debug range in the help.
> Maybe something like:
> 	--debug,-d  Increase debug level for each -d (1-5)

I'm inclined not to do this because it would encode the max debug level.  On
the other hand I'm not sure why there are 5 levels now.  ;-)

Having the multiple options specified was an easy way to maintain the large
number of levels.

Ira

> 
> The patch seems fine to me otherwise.
> 
> > 	--iterations,-i <iter>  repeate test <iter> times
> > 		default: 22
> > 
> 
> Thanks,
> Sohil

  reply	other threads:[~2022-06-13 23:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 23:35 [RFC PATCH 0/6] User pkey minor bug fixes ira.weiny
2022-06-10 23:35 ` [RFC PATCH 1/6] testing/pkeys: Add command line options ira.weiny
2022-06-13 22:31   ` Sohil Mehta
2022-06-13 23:41     ` Ira Weiny [this message]
2022-06-10 23:35 ` [RFC PATCH 2/6] testing/pkeys: Don't use uninitialized variable ira.weiny
2022-06-13 22:48   ` Sohil Mehta
2022-06-13 23:59     ` Ira Weiny
2022-06-10 23:35 ` [RFC PATCH 3/6] testing/pkeys: Add additional test for pkey_alloc() ira.weiny
2022-06-16 19:25   ` Sohil Mehta
2022-06-16 20:24     ` Dave Hansen
2022-06-10 23:35 ` [RFC PATCH 4/6] pkeys: Lift pkey hardware check " ira.weiny
2022-06-16 19:31   ` Sohil Mehta
2022-06-10 23:35 ` [RFC PATCH 5/6] pkeys: Up level pkey_free() checks ira.weiny
2022-06-13  9:14   ` Christophe Leroy
2022-06-10 23:35 ` [RFC PATCH 6/6] pkeys: Change mm_pkey_free() to void ira.weiny
2022-06-13  9:17   ` Christophe Leroy
2022-06-13 16:16     ` Ira Weiny
2022-06-13 22:05 ` [RFC PATCH 0/6] User pkey minor bug fixes Sohil Mehta

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=YqfLL2IyMWWWkvQd@iweiny-desk3 \
    --to=ira.weiny@intel.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sohil.mehta@intel.com \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).