From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [RFC PATCH 2/3] lib/C-API: Add option -V to print LTP version
Date: Tue, 4 Jul 2023 12:33:13 +0200 [thread overview]
Message-ID: <ZKP1afDMgcKSIESE@yuki> (raw)
In-Reply-To: <20230704091933.496989-3-pvorel@suse.cz>
Hi!
> It can be useful for troubleshooting reported issues.
>
> 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..e81a3d036 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 "\n");
> + exit(0);
> + break;
Why don't we print that as a part of help? Do we really need to allocate
a flag for this?
> case 'C':
> #ifdef UCLINUX
> child_args = optarg;
> --
> 2.40.1
>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-07-04 10:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 9:19 [LTP] [RFC PATCH 1/3] Makefile: Add C header with generated LTP version Petr Vorel
2023-07-04 9:19 ` Petr Vorel
2023-07-04 9:25 ` Petr Vorel
2023-07-13 11:58 ` Cyril Hrubis
2023-07-14 2:54 ` Li Wang
2023-07-14 4:53 ` Petr Vorel
2023-07-14 6:46 ` Cyril Hrubis
2023-07-14 9:25 ` Li Wang
2023-07-04 9:19 ` [LTP] [RFC PATCH 2/3] lib/C-API: Add option -V to print " Petr Vorel
2023-07-04 10:33 ` Cyril Hrubis [this message]
2023-07-04 11:50 ` Petr Vorel
2023-07-04 12:04 ` Cyril Hrubis
2023-07-04 12:07 ` Petr Vorel
2023-07-04 9:19 ` [LTP] [RFC PATCH 3/3] lib/C-API: Print LTP version at test start Petr Vorel
2023-07-04 9:26 ` [LTP] [RFC PATCH 1/3] Makefile: Add C header with generated LTP version Petr Vorel
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=ZKP1afDMgcKSIESE@yuki \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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.