public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: Martin Doucha <martin.doucha@suse.com>,
	ltp@lists.linux.it, Richard Palethorpe <rpalethorpe@suse.com>
Subject: Re: [LTP] [PATCH v2 2/4] lib/C-API: Add option -V to print LTP version
Date: Tue, 25 Jul 2023 14:23:25 +0200	[thread overview]
Message-ID: <20230725122325.GB12613@pevik> (raw)
In-Reply-To: <ZL-5kfsRIzh1ZkNd@yuki>

Hi Cyril,

> Hi!
> > It can be useful for troubleshooting reported issues.

> I still wonder if this should be rather put into the output of the -h or
> both.

I used -V, because this is common, but I have no problem to add it to -h
or even move to -h (i.e. not introduce -V).

Any more opinions, please?

Kind regards,
Petr

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> >  lib/tst_test.c | 6 ++++++
> >  1 file changed, 6 insertions(+)

> > diff --git a/lib/tst_test.c b/lib/tst_test.c
> > index 04da456c6..456d3d1e6 100644
> > --- a/lib/tst_test.c
> > +++ b/lib/tst_test.c
> > @@ -34,6 +34,7 @@
> >  #include "old_resource.h"
> >  #include "old_device.h"
> >  #include "old_tmpdir.h"
> > +#include "ltp-version.h"

> >  /*
> >   * Hack to get TCID defined in newlib tests
> > @@ -509,6 +510,7 @@ static struct option {
> >  	{"h",  "-h       Prints this help"},
> >  	{"i:", "-i n     Execute test n times"},
> >  	{"I:", "-I x     Execute test for n seconds"},
> > +	{"V",  "-V       Prints LTP version"},
> >  	{"C:", "-C ARG   Run child process with ARG arguments (used internally)"},
> >  };

> > @@ -686,6 +688,10 @@ static void parse_opts(int argc, char *argv[])
> >  			else
> >  				duration = SAFE_STRTOF(optarg, 0.1, HUGE_VALF);
> >  		break;
> > +		case 'V':
> > +			fprintf(stderr, "LTP version: " LTP_VERSION "\n");
> > +			exit(0);
> > +		break;
> >  		case 'C':
> >  #ifdef UCLINUX
> >  			child_args = optarg;
> > -- 
> > 2.40.1

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-07-25 12:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-19 11:00 [LTP] [PATCH v2 0/4] Makefile: Add C header with generated LTP version Petr Vorel
2023-07-19 11:00 ` [LTP] [PATCH v2 1/4] " Petr Vorel
2023-07-20  5:23   ` Li Wang
2023-07-20  7:28     ` Petr Vorel
2023-07-19 11:00 ` [LTP] [PATCH v2 2/4] lib/C-API: Add option -V to print " Petr Vorel
2023-07-25 12:01   ` Cyril Hrubis
2023-07-25 12:23     ` Petr Vorel [this message]
2023-07-19 11:00 ` [LTP] [PATCH v2 3/4] lib/C-API: Print LTP version at test start Petr Vorel
2023-07-25 12:06   ` Cyril Hrubis
2023-07-19 11:00 ` [LTP] [PATCH v2 4/4] lib: Move gitignore entries to their directory Petr Vorel
2023-07-25 12:02   ` Cyril Hrubis
2023-09-06  9:40 ` [LTP] [PATCH v2 0/4] Makefile: Add C header with generated LTP version Cyril Hrubis

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=20230725122325.GB12613@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=martin.doucha@suse.com \
    --cc=rpalethorpe@suse.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