From: Daniel Wagner <dwagner@suse.de>
To: Clark Williams <williams@redhat.com>, John Kacur <jkacur@redhat.com>
Cc: linux-rt-users@vger.kernel.org, Daniel Wagner <dwagner@suse.de>
Subject: [PATCH rt-tests v1 04/23] pi_stress: Rename command line option --output to --json
Date: Wed, 19 May 2021 19:09:26 +0200 [thread overview]
Message-ID: <20210519170945.21941-5-dwagner@suse.de> (raw)
In-Reply-To: <20210519170945.21941-1-dwagner@suse.de>
The initial idea was to have several different output format
supported but it turns out everyone is happy with JSON, so
there is no need to add another format.
Thus let's make the command line option more specific and
rename it to --json.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
src/pi_tests/pi_stress.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/pi_tests/pi_stress.c b/src/pi_tests/pi_stress.c
index 3f93d4aadd53..7782ea717c55 100644
--- a/src/pi_tests/pi_stress.c
+++ b/src/pi_tests/pi_stress.c
@@ -100,7 +100,7 @@ int debugging = 0;
int quiet = 0; /* turn off all prints, default = 0 (off) */
/* filename for JSON output */
-char outfile[MAX_PATH];
+char jsonfile[MAX_PATH];
/* prompt to start test */
int prompt = 0;
@@ -342,8 +342,8 @@ int main(int argc, char **argv)
finish = time(NULL);
summary();
- if (strlen(outfile) != 0)
- rt_write_json(outfile, retval, write_stats, NULL);
+ if (strlen(jsonfile) != 0)
+ rt_write_json(jsonfile, retval, write_stats, NULL);
if (lockall)
munlockall();
@@ -992,8 +992,8 @@ void usage(int error)
"-g N --groups=N set the number of inversion groups\n"
"-h --help print this message\n"
"-i INV --inversions=INV number of inversions per group (default is infinite)\n"
+ " --json=FILENAME write final results into FILENAME, JSON formatted\n"
"-m --mlockall lock current and future memory\n"
- " --output=FILENAME write final results into FILENAME, JSON formatted\n"
"-p --prompt prompt before starting the test\n"
"-q --quiet suppress running output\n"
"-r --rr use SCHED_RR for test threads [SCHED_FIFO]\n"
@@ -1287,7 +1287,7 @@ int process_sched_line(const char *arg)
enum option_values {
OPT_DEBUG=1, OPT_DURATION, OPT_GROUPS, OPT_HELP, OPT_INVERSIONS,
- OPT_MLOCKALL, OPT_OUTPUT, OPT_PROMPT, OPT_QUIET, OPT_RR, OPT_SCHED,
+ OPT_JSON, OPT_MLOCKALL, OPT_PROMPT, OPT_QUIET, OPT_RR, OPT_SCHED,
OPT_UNIPROCESSOR, OPT_VERBOSE, OPT_VERSION,
};
@@ -1300,8 +1300,8 @@ void process_command_line(int argc, char **argv)
{"groups", required_argument, NULL, OPT_GROUPS},
{"help", no_argument, NULL, OPT_HELP},
{"inversions", required_argument, NULL, OPT_INVERSIONS},
+ {"json", required_argument, NULL, OPT_JSON},
{"mlockall", no_argument, NULL, OPT_MLOCKALL},
- {"output", required_argument, NULL, OPT_OUTPUT},
{"prompt", no_argument, NULL, OPT_PROMPT},
{"quiet", no_argument, NULL, OPT_QUIET},
{"rr", no_argument, NULL, OPT_RR},
@@ -1344,13 +1344,13 @@ void process_command_line(int argc, char **argv)
inversions = strtol(optarg, NULL, 10);
pi_info("doing %d inversion per group\n", inversions);
break;
+ case OPT_JSON:
+ strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
+ break;
case OPT_MLOCKALL:
case 'm':
lockall = 1;
break;
- case OPT_OUTPUT:
- strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
- break;
case OPT_PROMPT:
case 'p':
prompt = 1;
--
2.31.1
next prev parent reply other threads:[~2021-05-19 17:09 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
2021-05-19 17:09 ` [PATCH rt-tests v1 01/23] cyclicdeadline: Fix JSON output format Daniel Wagner
2021-05-21 21:30 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 02/23] cyclictest: Rename command line option --output to --json Daniel Wagner
2021-05-21 21:32 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 03/23] oslat: " Daniel Wagner
2021-05-21 21:35 ` John Kacur
2021-05-19 17:09 ` Daniel Wagner [this message]
2021-05-21 21:39 ` [PATCH rt-tests v1 04/23] pi_stress: " John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 05/23] pmqtest: " Daniel Wagner
2021-05-21 21:41 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 06/23] ptsematest: " Daniel Wagner
2021-05-21 21:45 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 07/23] rt-migrate-test: " Daniel Wagner
2021-05-21 21:47 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 08/23] cyclicdeadline: " Daniel Wagner
2021-05-21 21:49 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 09/23] signaltest: " Daniel Wagner
2021-05-21 21:51 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 10/23] sigwaittest: " Daniel Wagner
2021-05-22 3:33 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 11/23] ssdd: " Daniel Wagner
2021-05-22 3:34 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 12/23] svsematest: " Daniel Wagner
2021-05-22 3:51 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 13/23] cyclictest: Add --json to man page Daniel Wagner
2021-05-22 3:38 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 14/23] oslat: " Daniel Wagner
2021-05-22 3:39 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 15/23] pi_stress: " Daniel Wagner
2021-05-22 3:41 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 16/23] pmqtest: " Daniel Wagner
2021-05-22 3:42 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 17/23] ptsematest: " Daniel Wagner
2021-05-22 3:44 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 18/23] rt-migrate-test: " Daniel Wagner
2021-05-22 3:45 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 19/23] cyclicdeadline: " Daniel Wagner
2021-05-22 3:46 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 20/23] signaltest: " Daniel Wagner
2021-05-22 3:48 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 21/23] sigwaittest: " Daniel Wagner
2021-05-22 3:49 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 22/23] ssdd: " Daniel Wagner
2021-05-22 3:52 ` John Kacur
2021-05-19 17:09 ` [PATCH rt-tests v1 23/23] svematest: " Daniel Wagner
2021-05-22 3:54 ` 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=20210519170945.21941-5-dwagner@suse.de \
--to=dwagner@suse.de \
--cc=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=williams@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 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.