From: Cyril Hrubis <chrubis@suse.cz>
To: Petr Vorel <pvorel@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 2/4] lib/C-API: Add option -V to print LTP version
Date: Tue, 25 Jul 2023 14:01:21 +0200 [thread overview]
Message-ID: <ZL-5kfsRIzh1ZkNd@yuki> (raw)
In-Reply-To: <20230719110051.1237775-3-pvorel@suse.cz>
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.
> 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
>
--
Cyril Hrubis
chrubis@suse.cz
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-07-25 12:00 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 [this message]
2023-07-25 12:23 ` Petr Vorel
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=ZL-5kfsRIzh1ZkNd@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.