linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: Tomas Glozar <tglozar@redhat.com>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: [PATCH v2 1/3] rteval: Allow arguments specific to module group
Date: Fri, 15 Sep 2023 14:58:54 -0400 (EDT)	[thread overview]
Message-ID: <f739a8e8-2bb7-7fc1-94ed-c6847ed79bf@redhat.com> (raw)
In-Reply-To: <20230811095228.200772-2-tglozar@redhat.com>



On Fri, 11 Aug 2023, Tomas Glozar wrote:

> Return grparser from ModuleContainer.SetupModuleOptions, which allows it
> to be used to setup additional options in *Modules class.
> 
> Signed-off-by: Tomas Glozar <tglozar@redhat.com>
> ---
>  rteval/modules/__init__.py | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py
> index 794135d..f4fd160 100644
> --- a/rteval/modules/__init__.py
> +++ b/rteval/modules/__init__.py
> @@ -312,7 +312,7 @@ the information provided by the module"""
>                  # Ignore if a section is not found
>                  cfg = None
>  
> -            grparser = parser.add_argument_group("Options for the %s module" % shortmod)
> +            modgrparser = parser.add_argument_group("Options for the %s module" % shortmod)
>              for (o, s) in list(opts.items()):
>                  descr = 'descr' in s and s['descr'] or ""
>                  metavar = 'metavar' in s and s['metavar'] or None
> @@ -327,13 +327,15 @@ the information provided by the module"""
>                      default = 'default' in s and s['default'] or None
>  
>  
> -                grparser.add_argument('--%s-%s' % (shortmod, o),
> -                                    dest="%s___%s" % (shortmod, o),
> -                                    action='store',
> -                                    help='%s%s' % (descr,
> -                                                   default and ' (default: %s)' % default or ''),
> -                                    default=default,
> -                                    metavar=metavar)
> +                modgrparser.add_argument('--%s-%s' % (shortmod, o),
> +                                         dest="%s___%s" % (shortmod, o),
> +                                         action='store',
> +                                         help='%s%s' % (descr,
> +                                                        default and ' (default: %s)' % default or ''),
> +                                         default=default,
> +                                         metavar=metavar)
> +
> +            return grparser
>  
>  
>      def InstantiateModule(self, modname, modcfg, modroot=None):
> -- 
> 2.41.0
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


  reply	other threads:[~2023-09-15 19:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11  9:52 [PATCH v2 0/3] rteval: Add cmdline option to run measurements on isolcpus by default Tomas Glozar
2023-08-11  9:52 ` [PATCH v2 1/3] rteval: Allow arguments specific to module group Tomas Glozar
2023-09-15 18:58   ` John Kacur [this message]
2023-08-11  9:52 ` [PATCH v2 2/3] rteval: Add run_on_isolcpus option to measurements Tomas Glozar
2023-09-15 19:01   ` John Kacur
2023-09-15 19:06   ` John Kacur
2023-08-11  9:52 ` [PATCH v2 3/3] rteval: Support run-on-isolcpus in cyclictest Tomas Glozar
2023-09-15 19:12   ` John Kacur

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=f739a8e8-2bb7-7fc1-94ed-c6847ed79bf@redhat.com \
    --to=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=tglozar@redhat.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 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).