All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rt-tests v1 00/23] Rename --output to --json
@ 2021-05-19 17:09 Daniel Wagner
  2021-05-19 17:09 ` [PATCH rt-tests v1 01/23] cyclicdeadline: Fix JSON output format Daniel Wagner
                   ` (22 more replies)
  0 siblings, 23 replies; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

This is the final cleanup for the JSON output feature. As agreed on
IRC rename the very generic --output command line option to a more
specific one --json.

Update the man pages accordingly.

Daniel Wagner (23):
  cyclicdeadline: Fix JSON output format
  cyclictest: Rename command line option --output to --json
  oslat: Rename command line option --output to --json
  pi_stress: Rename command line option --output to --json
  pmqtest: Rename command line option --output to --json
  ptsematest: Rename command line option --output to --json
  rt-migrate-test: Rename command line option --output to --json
  cyclicdeadline: Rename command line option --output to --json
  signaltest: Rename command line option --output to --json
  sigwaittest: Rename command line option --output to --json
  ssdd: Rename command line option --output to --json
  svsematest: Rename command line option --output to --json
  cyclictest: Add --json to man page
  oslat: Add --json to man page
  pi_stress: Add --json to man page
  pmqtest: Add --json to man page
  ptsematest: Add --json to man page
  rt-migrate-test: Add --json to man page
  cyclicdeadline: Add --json to man page
  signaltest: Add --json to man page
  sigwaittest: Add --json to man page
  ssdd: Add --json to man page
  svematest: Add --json to man page

 src/cyclictest/cyclictest.8           |  7 +++++--
 src/cyclictest/cyclictest.c           | 20 ++++++++++----------
 src/oslat/oslat.8                     |  8 ++++++--
 src/oslat/oslat.c                     | 18 +++++++++---------
 src/pi_tests/pi_stress.8              |  8 +++++++-
 src/pi_tests/pi_stress.c              | 18 +++++++++---------
 src/pmqtest/pmqtest.8                 |  5 ++++-
 src/pmqtest/pmqtest.c                 | 21 ++++++++++-----------
 src/ptsematest/ptsematest.8           |  5 ++++-
 src/ptsematest/ptsematest.c           | 18 +++++++++---------
 src/rt-migrate-test/rt-migrate-test.8 |  6 +++++-
 src/rt-migrate-test/rt-migrate-test.c | 20 ++++++++++----------
 src/sched_deadline/cyclicdeadline.8   |  5 ++++-
 src/sched_deadline/cyclicdeadline.c   | 18 +++++++++---------
 src/signaltest/signaltest.8           |  5 ++++-
 src/signaltest/signaltest.c           | 20 ++++++++++----------
 src/sigwaittest/sigwaittest.8         |  5 ++++-
 src/sigwaittest/sigwaittest.c         | 18 +++++++++---------
 src/ssdd/ssdd.8                       |  5 ++++-
 src/ssdd/ssdd.c                       | 16 ++++++++--------
 src/svsematest/svsematest.8           |  5 ++++-
 src/svsematest/svsematest.c           | 18 +++++++++---------
 22 files changed, 153 insertions(+), 116 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 01/23] cyclicdeadline: Fix JSON output format
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
@ 2021-05-19 17:09 ` 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
                   ` (21 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add missing comma after the max entry.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/sched_deadline/cyclicdeadline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index 8d801b4c154a..b81fb3a2091d 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -977,7 +977,7 @@ static void write_stats(FILE *f, void *data)
 		fprintf(f, "    \"%u\": {\n", i);
 		fprintf(f, "	 \"cycles\": %ld,\n", s->cycles);
 		fprintf(f, "	 \"min\": %ld,\n", s->min);
-		fprintf(f, "	 \"max\": %ld\n", s->max);
+		fprintf(f, "	 \"max\": %ld,\n", s->max);
 		fprintf(f, "	 \"avg\": %.2f\n", s->avg/s->cycles);
 		fprintf(f, "    }%s\n", i == nr_threads - 1 ? "" : ",");
 	}
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 02/23] cyclictest: Rename command line option --output to --json
  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-19 17:09 ` Daniel Wagner
  2021-05-21 21:32   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 03/23] oslat: " Daniel Wagner
                   ` (20 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/cyclictest/cyclictest.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 59dda1973b1a..a561443fa67b 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -218,7 +218,7 @@ static struct timespec globalt;
 
 static char fifopath[MAX_PATH];
 static char histfile[MAX_PATH];
-static char outfile[MAX_PATH];
+static char jsonfile[MAX_PATH];
 
 static struct thread_param **parameters;
 static struct thread_stat **statistics;
@@ -832,6 +832,7 @@ static void display_help(int error)
 	       "-H       --histofall=US    same as -h except with an additional summary column\n"
 	       "	 --histfile=<path> dump the latency histogram to <path> instead of stdout\n"
 	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
+	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
 	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
 	       "	 --laptop	   Save battery when running cyclictest\n"
 	       "			   This will give you poorer realtime results\n"
@@ -841,7 +842,6 @@ static void display_help(int error)
 	       "			   latency is hit. Useful for low bandwidth.\n"
 	       "-N       --nsecs           print results in ns instead of us (default us)\n"
 	       "-o RED   --oscope=RED      oscilloscope mode, reduce verbose output by RED\n"
-	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
 	       "-p PRIO  --priority=PRIO   priority of highest prio thread\n"
 	       "	 --policy=NAME     policy of measurement thread, where NAME may be one\n"
 	       "                           of: other, normal, batch, idle, fifo or rr.\n"
@@ -944,14 +944,14 @@ enum option_values {
 	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_CLOCK,
 	OPT_DISTANCE, OPT_DURATION, OPT_LATENCY,
 	OPT_FIFO, OPT_HISTOGRAM, OPT_HISTOFALL, OPT_HISTFILE,
-	OPT_INTERVAL, OPT_LOOPS, OPT_MLOCKALL, OPT_REFRESH,
+	OPT_INTERVAL, OPT_JSON, OPT_LOOPS, OPT_MLOCKALL, OPT_REFRESH,
 	OPT_NANOSLEEP, OPT_NSECS, OPT_OSCOPE, OPT_PRIORITY,
 	OPT_QUIET, OPT_PRIOSPREAD, OPT_RELATIVE, OPT_RESOLUTION,
 	OPT_SYSTEM, OPT_SMP, OPT_THREADS, OPT_TRIGGER,
 	OPT_TRIGGER_NODES, OPT_UNBUFFERED, OPT_NUMA, OPT_VERBOSE,
 	OPT_DBGCYCLIC, OPT_POLICY, OPT_HELP, OPT_NUMOPTS,
 	OPT_ALIGNED, OPT_SECALIGNED, OPT_LAPTOP, OPT_SMI,
-	OPT_TRACEMARK, OPT_POSIX_TIMERS, OPT_OUTPUT
+	OPT_TRACEMARK, OPT_POSIX_TIMERS,
 };
 
 /* Process commandline options */
@@ -979,13 +979,13 @@ static void process_options(int argc, char *argv[], int max_cpus)
 			{"histofall",        required_argument, NULL, OPT_HISTOFALL },
 			{"histfile",	     required_argument, NULL, OPT_HISTFILE },
 			{"interval",         required_argument, NULL, OPT_INTERVAL },
+			{"json",             required_argument, NULL, OPT_JSON },
 			{"laptop",	     no_argument,	NULL, OPT_LAPTOP },
 			{"loops",            required_argument, NULL, OPT_LOOPS },
 			{"mlockall",         no_argument,       NULL, OPT_MLOCKALL },
 			{"refresh_on_max",   no_argument,       NULL, OPT_REFRESH },
 			{"nsecs",            no_argument,       NULL, OPT_NSECS },
 			{"oscope",           required_argument, NULL, OPT_OSCOPE },
-			{"output",           required_argument, NULL, OPT_OUTPUT },
 			{"priority",         required_argument, NULL, OPT_PRIORITY },
 			{"quiet",            no_argument,       NULL, OPT_QUIET },
 			{"priospread",       no_argument,       NULL, OPT_PRIOSPREAD },
@@ -1080,6 +1080,9 @@ static void process_options(int argc, char *argv[], int max_cpus)
 		case 'i':
 		case OPT_INTERVAL:
 			interval = atoi(optarg); break;
+		case OPT_JSON:
+			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
+			break;
 		case 'l':
 		case OPT_LOOPS:
 			max_cycles = atoi(optarg); break;
@@ -1095,9 +1098,6 @@ static void process_options(int argc, char *argv[], int max_cpus)
 		case 'o':
 		case OPT_OSCOPE:
 			oscope_reduction = atoi(optarg); break;
-		case OPT_OUTPUT:
-			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
-			break;
 		case 'p':
 		case OPT_PRIORITY:
 			priority = atoi(optarg);
@@ -2134,8 +2134,8 @@ int main(int argc, char **argv)
 	if (!verbose && !quiet && refresh_on_max)
 		printf("\033[%dB", num_threads + 2);
 
-	if (strlen(outfile) != 0)
-		rt_write_json(outfile, ret, write_stats, NULL);
+	if (strlen(jsonfile) != 0)
+		rt_write_json(jsonfile, ret, write_stats, NULL);
 
 	if (quiet)
 		quiet = 2;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 03/23] oslat: Rename command line option --output to --json
  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-19 17:09 ` [PATCH rt-tests v1 02/23] cyclictest: Rename command line option --output to --json Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-21 21:35   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 04/23] pi_stress: " Daniel Wagner
                   ` (19 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/oslat/oslat.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
index 37d528f0f7ff..32de951f27c0 100644
--- a/src/oslat/oslat.c
+++ b/src/oslat/oslat.c
@@ -174,7 +174,7 @@ struct global {
 	int                   quiet;
 	int                   single_preheat_thread;
 	int                   output_omit_zero_buckets;
-	char                  outfile[MAX_PATH];
+	char                  jsonfile[MAX_PATH];
 
 	/* Mutable state. */
 	volatile enum command cmd;
@@ -560,6 +560,7 @@ static void usage(int error)
 	       "-C, --cpu-main-thread  Specify which CPU the main thread runs on.  Default is cpu0.\n"
 	       "-D, --duration         Specify test duration, e.g., 60, 20m, 2H\n"
 	       "                       (m/M: minutes, h/H: hours, d/D: days)\n"
+	       "    --json=FILENAME    write final results into FILENAME, JSON formatted\n"
 	       "-f, --rtprio           Using SCHED_FIFO priority (1-99)\n"
 	       "-m, --workload-mem     Size of the memory to use for the workload (e.g., 4K, 1M).\n"
 	       "                       Total memory usage will be this value multiplies 2*N,\n"
@@ -570,7 +571,6 @@ static void usage(int error)
 	       "                       NOTE: please make sure the CPU frequency on all testing cores\n"
 	       "                       are locked before using this parmater.  If you don't know how\n"
 	       "                       to lock the freq then please don't use this parameter.\n"
-	       "    --output=FILENAME  write final results into FILENAME, JSON formatted\n"
 	       "-T, --trace-threshold  Stop the test when threshold triggered (in us),\n"
 	       "                       print a marker in ftrace and stop ftrace too.\n"
 	       "-v, --version          Display the version of the software.\n"
@@ -597,8 +597,8 @@ static int workload_select(char *name)
 
 enum option_value {
 	OPT_BUCKETSIZE=1, OPT_CPU_LIST, OPT_CPU_MAIN_THREAD,
-	OPT_DURATION, OPT_RT_PRIO, OPT_HELP, OPT_TRACE_TH,
-	OPT_WORKLOAD, OPT_WORKLOAD_MEM, OPT_BIAS, OPT_OUTPUT,
+	OPT_DURATION, OPT_JSON, OPT_RT_PRIO, OPT_HELP, OPT_TRACE_TH,
+	OPT_WORKLOAD, OPT_WORKLOAD_MEM, OPT_BIAS,
 	OPT_QUIET, OPT_SINGLE_PREHEAT, OPT_ZERO_OMIT,
 	OPT_VERSION
 };
@@ -613,6 +613,7 @@ static void parse_options(int argc, char *argv[])
 			{ "cpu-list",	required_argument,	NULL, OPT_CPU_LIST },
 			{ "cpu-main-thread", required_argument, NULL, OPT_CPU_MAIN_THREAD},
 			{ "duration",	required_argument,	NULL, OPT_DURATION },
+			{ "json",	required_argument,      NULL, OPT_JSON },
 			{ "rtprio",	required_argument,	NULL, OPT_RT_PRIO },
 			{ "help",	no_argument,		NULL, OPT_HELP },
 			{ "trace-threshold", required_argument,	NULL, OPT_TRACE_TH },
@@ -621,7 +622,6 @@ static void parse_options(int argc, char *argv[])
 			{ "bias",	no_argument,		NULL, OPT_BIAS },
 			{ "quiet",	no_argument,		NULL, OPT_QUIET },
 			{ "single-preheat", no_argument,	NULL, OPT_SINGLE_PREHEAT },
-			{ "output",	required_argument,      NULL, OPT_OUTPUT },
 			{ "zero-omit",	no_argument,		NULL, OPT_ZERO_OMIT },
 			{ "version",	no_argument,		NULL, OPT_VERSION },
 			{ NULL, 0, NULL, 0 },
@@ -677,8 +677,8 @@ static void parse_options(int argc, char *argv[])
 				exit(1);
 			}
 			break;
-		case OPT_OUTPUT:
-			strncpy(g.outfile, optarg, strnlen(optarg, MAX_PATH-1));
+		case OPT_JSON:
+			strncpy(g.jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
 			break;
 		case OPT_TRACE_TH:
 		case 'T':
@@ -862,8 +862,8 @@ int main(int argc, char *argv[])
 
 	write_summary(threads);
 
-	if (strlen(g.outfile) != 0)
-		rt_write_json(g.outfile, 0, write_summary_json, threads);
+	if (strlen(g.jsonfile) != 0)
+		rt_write_json(g.jsonfile, 0, write_summary_json, threads);
 
 	if (g.cpu_list) {
 		free(g.cpu_list);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 04/23] pi_stress: Rename command line option --output to --json
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (2 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 03/23] oslat: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-21 21:39   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 05/23] pmqtest: " Daniel Wagner
                   ` (18 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 05/23] pmqtest: Rename command line option --output to --json
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (3 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 04/23] pi_stress: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-21 21:41   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 06/23] ptsematest: " Daniel Wagner
                   ` (17 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/pmqtest/pmqtest.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/pmqtest/pmqtest.c b/src/pmqtest/pmqtest.c
index af10b416600c..edda7c69652e 100644
--- a/src/pmqtest/pmqtest.c
+++ b/src/pmqtest/pmqtest.c
@@ -231,8 +231,8 @@ static void display_help(int error)
 	       "-f TO    --forcetimeout=TO force timeout of mq_timedreceive(), requires -T\n"
 	       "-h       --help            print this help message\n"
 	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
+	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
 	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
-	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
 	       "-p PRIO  --prio=PRIO       priority\n"
 	       "-q       --quiet           print a summary only on exit\n"
 	       "-S       --smp             SMP testing: options -a -t and same priority\n"
@@ -260,13 +260,12 @@ static int sameprio;
 static int timeout;
 static int forcetimeout;
 static int quiet;
-static char outfile[MAX_PATH];
+static char jsonfile[MAX_PATH];
 
 enum option_value {
 	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_DISTANCE, OPT_DURATION,
-	OPT_FORCETIMEOUT, OPT_HELP, OPT_INTERVAL, OPT_LOOPS,
-	OPT_OUTPUT, OPT_PRIORITY, OPT_QUIET, OPT_SMP, OPT_THREADS,
-	OPT_TIMEOUT
+	OPT_FORCETIMEOUT, OPT_HELP, OPT_INTERVAL, OPT_JSON, OPT_LOOPS,
+	OPT_PRIORITY, OPT_QUIET, OPT_SMP, OPT_THREADS, OPT_TIMEOUT
 };
 
 static void process_options(int argc, char *argv[])
@@ -285,8 +284,8 @@ static void process_options(int argc, char *argv[])
 			{"forcetimeout",required_argument,	NULL, OPT_FORCETIMEOUT},
 			{"help",	no_argument,		NULL, OPT_HELP},
 			{"interval",	required_argument,	NULL, OPT_INTERVAL},
+			{"json",	required_argument,      NULL, OPT_JSON },
 			{"loops",	required_argument,	NULL, OPT_LOOPS},
-			{"output",	required_argument,      NULL, OPT_OUTPUT },
 			{"priority",	required_argument,	NULL, OPT_PRIORITY},
 			{"quiet",	no_argument,		NULL, OPT_QUIET},
 			{"smp",		no_argument,		NULL, OPT_SMP},
@@ -340,13 +339,13 @@ static void process_options(int argc, char *argv[])
 		case 'i':
 			interval = atoi(optarg);
 			break;
+		case OPT_JSON:
+			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
+			break;
 		case OPT_LOOPS:
 		case 'l':
 			max_cycles = atoi(optarg);
 			break;
-		case OPT_OUTPUT:
-			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
-			break;
 		case OPT_PRIORITY:
 		case 'p':
 			priority = atoi(optarg);
@@ -647,12 +646,12 @@ int main(int argc, char *argv[])
 		mq_unlink(mqname);
 	}
 
-	if (strlen(outfile) != 0) {
+	if (strlen(jsonfile) != 0) {
 		struct params_stats ps = {
 			.receiver = receiver,
 			.sender = sender,
 		};
-		rt_write_json(outfile, 0, write_stats, &ps);
+		rt_write_json(jsonfile, 0, write_stats, &ps);
 	}
 
 nomem:
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 06/23] ptsematest: Rename command line option --output to --json
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (4 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 05/23] pmqtest: " Daniel Wagner
@ 2021-05-19 17:09 ` 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
                   ` (16 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/ptsematest/ptsematest.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/ptsematest/ptsematest.c b/src/ptsematest/ptsematest.c
index 70eb79e89635..5822164386de 100644
--- a/src/ptsematest/ptsematest.c
+++ b/src/ptsematest/ptsematest.c
@@ -155,8 +155,8 @@ static void display_help(int error)
 	       "                           Append 'm', 'h', or 'd' to specify minutes, hours or\n"
 	       "                           days.\n"
 	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
+	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
 	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
-	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
 	       "-p PRIO  --prio=PRIO       priority\n"
 	       "-q       --quiet           print a summary only on exit\n"
 	       "-S       --smp             SMP testing: options -a -t and same priority\n"
@@ -182,11 +182,11 @@ static int distance = 500;
 static int smp;
 static int sameprio;
 static int quiet;
-static char outfile[MAX_PATH];
+static char jsonfile[MAX_PATH];
 
 enum option_value {
 	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_DISTANCE, OPT_DURATION,
-	OPT_HELP, OPT_INTERVAL, OPT_LOOPS, OPT_OUTPUT, OPT_PRIORITY,
+	OPT_HELP, OPT_INTERVAL, OPT_JSON, OPT_LOOPS, OPT_PRIORITY,
 	OPT_QUIET, OPT_SMP, OPT_THREADS
 };
 
@@ -205,8 +205,8 @@ static void process_options(int argc, char *argv[])
 			{"duration",	required_argument,	NULL, OPT_DURATION},
 			{"help",	no_argument,		NULL, OPT_HELP},
 			{"interval",	required_argument,	NULL, OPT_INTERVAL},
+			{"json",	required_argument,      NULL, OPT_JSON },
 			{"loops",	required_argument,	NULL, OPT_LOOPS},
-			{"output",	required_argument,      NULL, OPT_OUTPUT },
 			{"priority",	required_argument,	NULL, OPT_PRIORITY},
 			{"quiet",	no_argument	,	NULL, OPT_QUIET},
 			{"smp",		no_argument,		NULL, OPT_SMP},
@@ -250,6 +250,9 @@ static void process_options(int argc, char *argv[])
 		case 'i':
 			interval = atoi(optarg);
 			break;
+		case OPT_JSON:
+			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
+			break;
 		case OPT_HELP:
 		case '?':
 		case 'h':
@@ -259,9 +262,6 @@ static void process_options(int argc, char *argv[])
 		case 'l':
 			max_cycles = atoi(optarg);
 			break;
-		case OPT_OUTPUT:
-			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
-			break;
 		case OPT_PRIORITY:
 		case 'p':
 			priority = atoi(optarg);
@@ -515,12 +515,12 @@ int main(int argc, char *argv[])
 		pthread_mutex_destroy(&syncmutex[i]);
 	}
 
-	if (strlen(outfile) != 0) {
+	if (strlen(jsonfile) != 0) {
 		struct params_stats ps = {
 			.receiver = receiver,
 			.sender = sender,
 		};
-		rt_write_json(outfile, 0, write_stats, &ps);
+		rt_write_json(jsonfile, 0, write_stats, &ps);
 	}
 
 nomem:
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 07/23] rt-migrate-test: Rename command line option --output to --json
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (5 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 06/23] ptsematest: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-21 21:47   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 08/23] cyclicdeadline: " Daniel Wagner
                   ` (15 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/rt-migrate-test/rt-migrate-test.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c
index 1e0abdd6c0fa..0c4dabeee249 100644
--- a/src/rt-migrate-test/rt-migrate-test.c
+++ b/src/rt-migrate-test/rt-migrate-test.c
@@ -102,7 +102,7 @@ static int done;
 static int loop;
 static int duration;
 static int quiet;
-static char outfile[MAX_PATH];
+static char jsonfile[MAX_PATH];
 
 static pthread_barrier_t start_barrier;
 static pthread_barrier_t end_barrier;
@@ -162,9 +162,9 @@ static void usage(int error)
 	       "                           days.\n"
 	       "-e       --equal           Use equal prio for #CPU-1 tasks (requires > 2 CPUS)\n"
 	       "-h       --help            Print this help message\n"
+	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
 	       "-l LOOPS --loops=LOOPS     Number of iterations to run (50)\n"
 	       "-m TIME  --maxerr=TIME     Max allowed error (microsecs)\n"
-	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
 	       "-p PRIO  --prio=PRIO       base priority to start RT tasks with (2)\n"
 	       "-q       --quiet           print a summary only on exit\n"
 	       "-r TIME  --run-time=TIME   Run time (ms) to busy loop the threads (20)\n"
@@ -175,8 +175,8 @@ static void usage(int error)
 }
 
 enum option_value {
-	OPT_CHECK=1, OPT_DURATION, OPT_EQUAL, OPT_HELP, OPT_LOOPS,
-	OPT_MAXERR, OPT_OUTPUT, OPT_PRIO, OPT_QUIET, OPT_RUN_TIME,
+	OPT_CHECK=1, OPT_DURATION, OPT_EQUAL, OPT_HELP, OPT_JSON,
+	OPT_LOOPS, OPT_MAXERR, OPT_PRIO, OPT_QUIET, OPT_RUN_TIME,
 	OPT_SLEEP_TIME
 };
 
@@ -190,9 +190,9 @@ static void parse_options(int argc, char *argv[])
 			{"duration",	required_argument,	NULL, OPT_DURATION},
 			{"equal",	no_argument,		NULL, OPT_EQUAL},
 			{"help",	no_argument,		NULL, OPT_HELP},
+			{"json",	required_argument,      NULL, OPT_JSON},
 			{"loops",	required_argument,	NULL, OPT_LOOPS},
 			{"maxerr",	required_argument,	NULL, OPT_MAXERR},
-			{"output",	required_argument,      NULL, OPT_OUTPUT },
 			{"prio",	required_argument,	NULL, OPT_PRIO},
 			{"quiet",	no_argument,		NULL, OPT_QUIET},
 			{"run-time",	required_argument,	NULL, OPT_RUN_TIME},
@@ -221,6 +221,9 @@ static void parse_options(int argc, char *argv[])
 		case 'h':
 			usage(0);
 			break;
+		case OPT_JSON:
+			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
+			break;
 		case OPT_LOOPS:
 		case 'l':
 			nr_runs = atoi(optarg);
@@ -229,9 +232,6 @@ static void parse_options(int argc, char *argv[])
 		case 'm':
 			max_err = usec2nano(atoi(optarg));
 			break;
-		case OPT_OUTPUT:
-			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
-			break;
 		case OPT_PRIO:
 		case 'p':
 			prio_start = atoi(optarg);
@@ -663,8 +663,8 @@ int main (int argc, char **argv)
 
 	print_results();
 
-	if (strlen(outfile) != 0)
-		rt_write_json(outfile, check < 0, write_stats, NULL);
+	if (strlen(jsonfile) != 0)
+		rt_write_json(jsonfile, check < 0, write_stats, NULL);
 
 	if (stop) {
 		/*
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 08/23] cyclicdeadline: Rename command line option --output to --json
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (6 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 07/23] rt-migrate-test: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-21 21:49   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 09/23] signaltest: " Daniel Wagner
                   ` (14 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/sched_deadline/cyclicdeadline.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
index b81fb3a2091d..4c81891bbe63 100644
--- a/src/sched_deadline/cyclicdeadline.c
+++ b/src/sched_deadline/cyclicdeadline.c
@@ -89,7 +89,7 @@ static int nr_threads;
 static int use_nsecs;
 static int mark_fd;
 static int quiet;
-static char outfile[MAX_PATH];
+static char jsonfile[MAX_PATH];
 
 static int find_mount(const char *mount, char *debugfs)
 {
@@ -605,7 +605,7 @@ static void usage(int error)
 	       "-h       --help            Show this help menu.\n"
 	       "-i INTV  --interval        The shortest deadline for the tasks in us\n"
 	       "                           (default 1000us).\n"
-	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
+	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
 	       "-s STEP  --step            The amount to increase the deadline for each task in us\n"
 	       "                           (default 500us).\n"
 	       "-t NUM   --threads         The number of threads to run as deadline (default 1).\n"
@@ -986,7 +986,7 @@ static void write_stats(FILE *f, void *data)
 
 enum options_valud {
 	OPT_AFFINITY=1, OPT_DURATION, OPT_HELP, OPT_INTERVAL,
-	OPT_OUTPUT, OPT_STEP, OPT_THREADS, OPT_QUIET
+	OPT_JSON, OPT_STEP, OPT_THREADS, OPT_QUIET
 };
 
 int main(int argc, char **argv)
@@ -1021,7 +1021,7 @@ int main(int argc, char **argv)
 			{ "duration",	required_argument,	NULL,	OPT_DURATION },
 			{ "help",	no_argument,		NULL,	OPT_HELP },
 			{ "interval",	required_argument,	NULL,	OPT_INTERVAL },
-			{ "output",	required_argument,	NULL,	OPT_OUTPUT },
+			{ "json",	required_argument,	NULL,	OPT_JSON },
 			{ "step",	required_argument,	NULL,	OPT_STEP },
 			{ "threads",	required_argument,	NULL,	OPT_THREADS },
 			{ "quiet",	no_argument,		NULL,	OPT_QUIET },
@@ -1047,8 +1047,8 @@ int main(int argc, char **argv)
 		case 'i':
 			interval = atoi(optarg);
 			break;
-		case OPT_OUTPUT:
-			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
+		case OPT_JSON:
+			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
 			break;
 		case OPT_STEP:
 		case 's':
@@ -1227,8 +1227,8 @@ int main(int argc, char **argv)
 		}
 	}
 
-	if (strlen(outfile) != 0)
-		rt_write_json(outfile, 0, write_stats, sched_data);
+	if (strlen(jsonfile) != 0)
+		rt_write_json(jsonfile, 0, write_stats, sched_data);
 
 	if (setcpu_buf)
 		free(setcpu_buf);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 09/23] signaltest: Rename command line option --output to --json
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (7 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 08/23] cyclicdeadline: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-21 21:51   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 10/23] sigwaittest: " Daniel Wagner
                   ` (13 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/signaltest/signaltest.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/signaltest/signaltest.c b/src/signaltest/signaltest.c
index f43920e1a853..2dd22070cb5d 100644
--- a/src/signaltest/signaltest.c
+++ b/src/signaltest/signaltest.c
@@ -187,9 +187,9 @@ static void display_help(int error)
 		"                           Append 'm', 'h', or 'd' to specify minutes, hours or\n"
 		"                           days.\n"
 		"-h       --help            display usage information\n"
+		"         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
 		"-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
 		"-m       --mlockall        lock current and future memory allocations\n"
-		"         --output=FILENAME write final results into FILENAME, JSON formatted\n"
 		"-p PRIO  --prio=PRIO       priority of highest prio thread\n"
 		"-q       --quiet           print a summary only on exit\n"
 		"-t NUM   --threads=NUM     number of threads: default=2\n"
@@ -210,12 +210,12 @@ static struct bitmask *affinity_mask = NULL;
 static int smp = 0;
 static int numa = 0;
 static int setaffinity = AFFINITY_UNSPECIFIED;
-static char outfile[MAX_PATH];
+static char jsonfile[MAX_PATH];
 
 enum option_values {
 	OPT_AFFINITY=1, OPT_BREAKTRACE,
-	OPT_DURATION, OPT_HELP, OPT_LOOPS,
-	OPT_MLOCKALL, OPT_OUTPUT, OPT_PRIORITY,
+	OPT_DURATION, OPT_HELP, OPT_JSON,
+	OPT_LOOPS, OPT_MLOCKALL, OPT_PRIORITY,
 	OPT_QUIET, OPT_SMP, OPT_THREADS, OPT_VERBOSE
 };
 
@@ -233,9 +233,9 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)
 			{"breaktrace",	required_argument,	NULL, OPT_BREAKTRACE},
 			{"duration",	required_argument,	NULL, OPT_DURATION},
 			{"help",	no_argument,		NULL, OPT_HELP},
+			{"json",	required_argument,	NULL, OPT_JSON},
 			{"loops",	required_argument,	NULL, OPT_LOOPS},
 			{"mlockall",	no_argument,		NULL, OPT_MLOCKALL},
-			{"output",	required_argument,	NULL, OPT_OUTPUT},
 			{"priority",	required_argument,	NULL, OPT_PRIORITY},
 			{"quiet",	no_argument,		NULL, OPT_QUIET},
 			{"smp",		no_argument,		NULL, OPT_SMP},
@@ -287,6 +287,9 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)
 		case 'h':
 			display_help(0);
 			break;
+		case OPT_JSON:
+			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
+			break;
 		case OPT_LOOPS:
 		case 'l':
 			max_cycles = atoi(optarg);
@@ -295,9 +298,6 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)
 		case 'm':
 			lockall = 1;
 			break;
-		case OPT_OUTPUT:
-			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
-			break;
 		case OPT_PRIORITY:
 		case 'p':
 			priority = atoi(optarg);
@@ -558,8 +558,8 @@ int main(int argc, char **argv)
 		if (stat[i].values)
 			free(stat[i].values);
 	}
-	if (strlen(outfile) != 0)
-		rt_write_json(outfile, ret, write_stats, par);
+	if (strlen(jsonfile) != 0)
+		rt_write_json(jsonfile, ret, write_stats, par);
 
 	free(stat);
  outpar:
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 10/23] sigwaittest: Rename command line option --output to --json
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (8 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 09/23] signaltest: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:33   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 11/23] ssdd: " Daniel Wagner
                   ` (12 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/sigwaittest/sigwaittest.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/sigwaittest/sigwaittest.c b/src/sigwaittest/sigwaittest.c
index fda44724dd62..98a740d2cce2 100644
--- a/src/sigwaittest/sigwaittest.c
+++ b/src/sigwaittest/sigwaittest.c
@@ -220,8 +220,8 @@ static void display_help(int error)
 	       "                           days.\n"
 	       "-f [OPT] --fork[=OPT]      fork new processes instead of creating threads\n"
 	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
+	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
 	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
-	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
 	       "-p PRIO  --prio=PRIO       priority\n"
 	       "-q       --quiet           print a summary only on exit\n"
 	       "-t       --threads         one thread per available processor\n"
@@ -242,11 +242,11 @@ static int duration;
 static int interval = 1000;
 static int distance = 500;
 static int quiet;
-static char outfile[MAX_PATH];
+static char jsonfile[MAX_PATH];
 
 enum option_value {
 	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_DISTANCE, OPT_DURATION,
-	OPT_FORK, OPT_HELP, OPT_INTERVAL, OPT_LOOPS, OPT_OUTPUT,
+	OPT_FORK, OPT_HELP, OPT_INTERVAL, OPT_JSON, OPT_LOOPS,
 	OPT_PRIORITY, OPT_QUIET, OPT_THREADS
 };
 
@@ -267,8 +267,8 @@ static void process_options(int argc, char *argv[])
 			{"fork",	optional_argument,	NULL, OPT_FORK},
 			{"help",	no_argument,		NULL, OPT_HELP},
 			{"interval",	required_argument,	NULL, OPT_INTERVAL},
+			{"json",	required_argument,      NULL, OPT_JSON},
 			{"loops",	required_argument,	NULL, OPT_LOOPS},
-			{"output",	required_argument,      NULL, OPT_OUTPUT },
 			{"priority",	required_argument,	NULL, OPT_PRIORITY},
 			{"quiet",	no_argument,		NULL, OPT_QUIET},
 			{"threads",	optional_argument,	NULL, OPT_THREADS},
@@ -324,13 +324,13 @@ static void process_options(int argc, char *argv[])
 		case 'i':
 			interval = atoi(optarg);
 			break;
+		case OPT_JSON:
+			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
+			break;
 		case OPT_LOOPS:
 		case 'l':
 			max_cycles = atoi(optarg);
 			break;
-		case OPT_OUTPUT:
-			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
-			break;
 		case OPT_PRIORITY:
 		case 'p':
 			priority = atoi(optarg);
@@ -702,12 +702,12 @@ int main(int argc, char *argv[])
 		}
 	}
 
-	if (strlen(outfile) != 0) {
+	if (strlen(jsonfile) != 0) {
 		struct params_stats ps = {
 			.receiver = receiver,
 			.sender = sender,
 		};
-		rt_write_json(outfile, 0, write_stats, &ps);
+		rt_write_json(jsonfile, 0, write_stats, &ps);
 	}
 
 nomem:
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 11/23] ssdd: Rename command line option --output to --json
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (9 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 10/23] sigwaittest: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:34   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 12/23] svsematest: " Daniel Wagner
                   ` (11 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/ssdd/ssdd.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
index 3ead14d0127e..421688c7f47c 100644
--- a/src/ssdd/ssdd.c
+++ b/src/ssdd/ssdd.c
@@ -67,11 +67,11 @@ static const char *get_state_name(int state)
 #define unused __attribute__((unused))
 
 static int quiet;
-static char outfile[MAX_PATH];
+static char jsonfile[MAX_PATH];
 
 static int got_sigchld;
 
-enum option_value { OPT_NFORKS=1, OPT_NITERS, OPT_HELP, OPT_OUTPUT, OPT_QUIET };
+enum option_value { OPT_NFORKS=1, OPT_NITERS, OPT_HELP, OPT_JSON, OPT_QUIET };
 
 static void usage(int error)
 {
@@ -80,7 +80,7 @@ static void usage(int error)
 	       "ssdd <options>\n\n"
 	       "-f       --forks=NUM       number of forks\n"
 	       "-h       --help            print this message\n"
-	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
+	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
 	       "-q       --quiet           suppress running output\n"
 	       "-i       --iters=NUM       number of iterations\n"
 	       );
@@ -306,7 +306,7 @@ int main(int argc, char **argv)
 		static struct option long_options[] = {
 			{"forks",		required_argument,	NULL, OPT_NFORKS},
 			{"help",		no_argument,		NULL, OPT_HELP},
-			{"output",		required_argument,	NULL, OPT_OUTPUT},
+			{"json",		required_argument,	NULL, OPT_JSON},
 			{"quiet",		no_argument,		NULL, OPT_QUIET},
 			{"iters",		required_argument,	NULL, OPT_NITERS},
 			{NULL, 0, NULL, 0},
@@ -323,8 +323,8 @@ int main(int argc, char **argv)
 		case OPT_HELP:
 			usage(0);
 			break;
-		case OPT_OUTPUT:
-			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
+		case OPT_JSON:
+			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
 			break;
 		case OPT_QUIET:
 		case 'q':
@@ -374,8 +374,8 @@ int main(int argc, char **argv)
 		"One or more tests FAILED" :
 		"All tests PASSED");
 
-	if (strlen(outfile) != 0)
-		rt_write_json(outfile, error, NULL, NULL);
+	if (strlen(jsonfile) != 0)
+		rt_write_json(jsonfile, error, NULL, NULL);
 
 	exit(error);
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 12/23] svsematest: Rename command line option --output to --json
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (10 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 11/23] ssdd: " Daniel Wagner
@ 2021-05-19 17:09 ` 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
                   ` (10 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

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/svsematest/svsematest.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c
index 9485ab6d95c8..8c55b6b7c48d 100644
--- a/src/svsematest/svsematest.c
+++ b/src/svsematest/svsematest.c
@@ -233,8 +233,8 @@ static void display_help(int error)
 	       "                           days.\n"
 	       "-f [OPT] --fork[=OPT]      fork new processes instead of creating threads\n"
 	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
+	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
 	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
-	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
 	       "-p PRIO  --prio=PRIO       priority\n"
 	       "-S       --smp             SMP testing: options -a -t and same priority\n"
 	       "                           of all threads\n"
@@ -257,11 +257,11 @@ static int distance = 500;
 static int smp;
 static int sameprio;
 static int quiet;
-static char outfile[MAX_PATH];
+static char jsonfile[MAX_PATH];
 
 enum option_value {
 	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_DISTANCE, OPT_DURATION,
-	OPT_FORK, OPT_HELP, OPT_INTERVAL, OPT_LOOPS, OPT_OUTPUT,
+	OPT_FORK, OPT_HELP, OPT_INTERVAL, OPT_JSON, OPT_LOOPS,
 	OPT_PRIORITY, OPT_QUIET, OPT_SMP, OPT_THREADS
 };
 
@@ -282,8 +282,8 @@ static void process_options(int argc, char *argv[])
 			{"fork",	optional_argument,	NULL, OPT_FORK},
 			{"help",	no_argument,		NULL, OPT_HELP},
 			{"interval",	required_argument,	NULL, OPT_INTERVAL},
+			{"json",	required_argument,      NULL, OPT_JSON},
 			{"loops",	required_argument,	NULL, OPT_LOOPS},
-			{"output",	required_argument,      NULL, OPT_OUTPUT},
 			{"priority",	required_argument,	NULL, OPT_PRIORITY},
 			{"quiet",	no_argument,		NULL, OPT_QUIET},
 			{"smp",		no_argument,		NULL, OPT_SMP},
@@ -343,13 +343,13 @@ static void process_options(int argc, char *argv[])
 		case 'i':
 			interval = atoi(optarg);
 			break;
+		case OPT_JSON:
+			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
+			break;
 		case OPT_LOOPS:
 		case 'l':
 			max_cycles = atoi(optarg);
 			break;
-		case OPT_OUTPUT:
-			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
-			break;
 		case OPT_PRIORITY:
 		case 'p':
 			priority = atoi(optarg);
@@ -774,12 +774,12 @@ int main(int argc, char *argv[])
 		}
 	}
 
-	if (strlen(outfile) != 0) {
+	if (strlen(jsonfile) != 0) {
 		struct params_stats ps = {
 			.receiver = receiver,
 			.sender = sender,
 		};
-		rt_write_json(outfile, 0, write_stats, &ps);
+		rt_write_json(jsonfile, 0, write_stats, &ps);
 	}
 
 nosem:
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 13/23] cyclictest: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (11 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 12/23] svsematest: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:38   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 14/23] oslat: " Daniel Wagner
                   ` (9 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/cyclictest/cyclictest.8 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/cyclictest/cyclictest.8 b/src/cyclictest/cyclictest.8
index 44b5d0dbcc4a..4fe42e502535 100644
--- a/src/cyclictest/cyclictest.8
+++ b/src/cyclictest/cyclictest.8
@@ -17,8 +17,8 @@ cyclictest \- High resolution test program
 .SH SYNOPSIS
 .SY cyclictest
 .RI "[ \-hfmnqrsvMS ] [\-a " proc " ] [\-A " align " ] [\-b " usec " ] [\-c " clock " ] [\-d " dist " ] \
-[\-h " histogram " ] [\-i " intv " ] [\-l " loop " ] [\-o " red " ] [\-p " prio " ] \
-[\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ \-S | \-U ]"
+[\-h " histogram " ] [\-i " intv " ] [\-\-json " filename " ] [\-l " loop " ] [\-o " red " ] \
+[\-p " prio " ] [\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ \-S | \-U ]"
 
 .\" .SH DESCRIPTION
 .\" This manual page documents briefly the
@@ -85,6 +85,9 @@ Dump the latency histogram to <path> instead of stdout.
 .B \-i, \-\-interval=INTV
 Set the base interval of the thread(s) in microseconds (default is 1000us). This sets the interval of the first thread. See also \-d.
 .TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.TP
 .B \-l, \-\-loops=LOOPS
 Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. Cyclictest is stopped once the number of timer intervals has been reached.
 .TP
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 14/23] oslat: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (12 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 13/23] cyclictest: Add --json to man page Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:39   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 15/23] pi_stress: " Daniel Wagner
                   ` (8 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/oslat/oslat.8 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/oslat/oslat.8 b/src/oslat/oslat.8
index b481d8d82783..4b28abd24425 100644
--- a/src/oslat/oslat.8
+++ b/src/oslat/oslat.8
@@ -5,8 +5,9 @@ oslat \- OS Latency Detector
 .SH SYNOPSIS
 .SY oslat
 .RI "[ \-shvz ] [ \-b " bucket-size " ] [ \-B " bias " ] [ \-c " cpu-list " ] \
-[ \-C " cpu-main-thread " ] [ \-f " rt-prio " ] [ \-m " workload-mem " ] \
-[\-t " runtime " ] [ \-T " trace-threshold " ] [ \-w " workload " ]"
+[ \-C " cpu-main-thread " ] [ \-f " rt-prio " ] [ \-\-json " filename " ] \
+[ \-m " workload-mem " ] [\-t " runtime " ] [ \-T " trace-threshold " ] \
+[ \-w " workload " ]"
 .SH DESCRIPTION
 .B oslat
 is an open source userspace polling mode stress program to detect OS level
@@ -30,6 +31,9 @@ Specify which CPU the main thread runs on.  Default is cpu0.
 Using specific SCHED_FIFO priority (1-99).  Otherwise use the default
 priority, normally it will be SCHED_OTHER.
 .TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.TP
 .B \-m, \-\-workload-mem=SIZE
 Size of the memory to use for the workload (e.g., 4K, 1M).
 Total memory usage will be this value multiplies 2*N,
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 15/23] pi_stress: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (13 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 14/23] oslat: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:41   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 16/23] pmqtest: " Daniel Wagner
                   ` (7 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/pi_tests/pi_stress.8 | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/pi_tests/pi_stress.8 b/src/pi_tests/pi_stress.8
index c3d7889a5cd5..8c43a1ccf676 100644
--- a/src/pi_tests/pi_stress.8
+++ b/src/pi_tests/pi_stress.8
@@ -10,7 +10,7 @@
 pi_stress \- a stress test for POSIX Priority Inheritance mutexes
 .\"}}}
 .\"{{{ Synopsis
-.\" Usage:  pi_stress [-d] [-D TIME] [-g N] [-h] [-i N ] [-m] [-p] [-q] [-r] [-s OPTS] [-u] [-v] [-V]
+.\" Usage:  pi_stress [-d] [-D TIME] [-g N] [-h] [-i N ] [--json FILENAME ] [-m] [-p] [-q] [-r] [-s OPTS] [-u] [-v] [-V]
 .SH SYNOPSIS
 .B pi_stress
 .RB [ \-d|\-\-debug]
@@ -20,6 +20,8 @@ pi_stress \- a stress test for POSIX Priority Inheritance mutexes
 .IR N ]
 .RB [ \-i|\-\-inversions
 .IR INV ]
+.RB [ \-\-json
+.IR FILENAME ]
 .RB [ \-m|\-\-mlockall ]
 .RB [ \-p|\-\-prompt ]
 .RB [ \-q|\-\-quiet ]
@@ -58,6 +60,10 @@ Display a short help message and options.
 .I N
 number of inversion conditions. This is the total number of inversions
 for all inversion groups. Default is \-1 for infinite.
+.IP "\-\-json=FILENAME"
+Write final results into
+.I FILENAME
+, JSON formatted.
 .IP "\-m|\-\-mlockall"
 Call mlockall to lock current and future memory allocations and
 prevent being paged out
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 16/23] pmqtest: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (14 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 15/23] pi_stress: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:42   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 17/23] ptsematest: " Daniel Wagner
                   ` (6 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/pmqtest/pmqtest.8 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/pmqtest/pmqtest.8 b/src/pmqtest/pmqtest.8
index 36678d0c5026..4fbcc5c27ce2 100644
--- a/src/pmqtest/pmqtest.8
+++ b/src/pmqtest/pmqtest.8
@@ -4,7 +4,7 @@
 \fBpmqtest\fR \- Start pairs of threads and measure the latency of interprocess communication with POSIX messages queues
 .SH "SYNTAX"
 .LP
-pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-D TIME] [-f TO] [-h] [-i INTV] [-l LOOPS] [-p PRIO] [-q] [-S] [-t|-t NUM]
+pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-D TIME] [-f TO] [-h] [-i INTV] [--json FILENAME] [-l LOOPS] [-p PRIO] [-q] [-S] [-t|-t NUM]
 .br
 .SH "DESCRIPTION"
 .LP
@@ -35,6 +35,9 @@ Set an artificial delay of the send function to force timeout of the receiver, r
 .B \-i, \-\-interval=INTV
 Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d.
 .TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.TP
 .B \-l, \-\-loops=LOOPS
 Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. pmqtest is stopped once the number of timer intervals has been reached.
 .TP
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 17/23] ptsematest: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (15 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 16/23] pmqtest: " Daniel Wagner
@ 2021-05-19 17:09 ` 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
                   ` (5 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/ptsematest/ptsematest.8 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/ptsematest/ptsematest.8 b/src/ptsematest/ptsematest.8
index a435e7a6221c..57e1658612c0 100644
--- a/src/ptsematest/ptsematest.8
+++ b/src/ptsematest/ptsematest.8
@@ -4,7 +4,7 @@
 \fBptsematest\fR \- Start two threads and measure the latency of interprocess communication with POSIX mutex.
 .SH "SYNOPSIS"
 .LP
-ptsematest [-a|--affinity [PROC]] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-h|--help] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]]
+ptsematest [-a|--affinity [PROC]] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-h|--help] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]]
 .br
 .SH "DESCRIPTION"
 .LP
@@ -32,6 +32,9 @@ Print help message.
 .B \-i, \-\-interval=INTV
 Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d.
 .TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.TP
 .B \-l, \-\-loops=LOOPS
 Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. ptsematest is stopped once the number of timer intervals has been reached.
 .TP
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 18/23] rt-migrate-test: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (16 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 17/23] ptsematest: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:45   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 19/23] cyclicdeadline: " Daniel Wagner
                   ` (4 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/rt-migrate-test/rt-migrate-test.8 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/rt-migrate-test/rt-migrate-test.8 b/src/rt-migrate-test/rt-migrate-test.8
index 5bbacb5333b8..53670e3757fa 100644
--- a/src/rt-migrate-test/rt-migrate-test.8
+++ b/src/rt-migrate-test/rt-migrate-test.8
@@ -5,7 +5,7 @@
 rt-migrate-test \- real-time task migration program
 .SH SYNOPSIS
 .LP
-rt-migrate-test [-c|--check] [-D|--duration TIME] [-e|--equal] [-h|--help] [-l|--loops LOOPS] [-m|--maxerr TIME] [-p|--prio PRIO] [-r|--run-time TIME] [-s|--sleep-time TIME] [NR_TASKS]
+rt-migrate-test [-c|--check] [-D|--duration TIME] [-e|--equal] [-h|--help] [--json FILENAME] [-l|--loops LOOPS] [-m|--maxerr TIME] [-p|--prio PRIO] [-r|--run-time TIME] [-s|--sleep-time TIME] [NR_TASKS]
 .SH DESCRIPTION
 Test real-time multiprocessor scheduling of tasks to ensure the highest priority tasks are running on all available CPUs
 .SH OPTIONS
@@ -31,6 +31,10 @@ Use equal prio for #CPU-1 tasks (requires > 2 CPUS)
 Display usage
 .br
 .TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.br
+.TP
 .B \-l \-\-loops=LOOPS
 Number of iterations to run (50)
 .br
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 19/23] cyclicdeadline: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (17 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 18/23] rt-migrate-test: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:46   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 20/23] signaltest: " Daniel Wagner
                   ` (3 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/sched_deadline/cyclicdeadline.8 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/sched_deadline/cyclicdeadline.8 b/src/sched_deadline/cyclicdeadline.8
index 59b60ca7bd31..1a56ed028d81 100644
--- a/src/sched_deadline/cyclicdeadline.8
+++ b/src/sched_deadline/cyclicdeadline.8
@@ -17,7 +17,7 @@ cyclicdeadline \- This program is used to test the deadline scheduler (SCHED_DEA
 .PP
 .SH SYNOPSIS
 .B cyclicdeadline
-.RI "[-a [CPUSET]] [-D TIME] [-h]  [-i INTV] [-s STEP] [-t NUM] [-q]"
+.RI "[-a [CPUSET]] [-D TIME] [-h]  [-i INTV] [--json FILENAME] [-s STEP] [-t NUM] [-q]"
 .PP
 .SH DESCRIPTION
 .B cyclicdeadline
@@ -38,6 +38,9 @@ Show this help menu
 .B \-i \-\-interval INTV
 The shortest deadline for the tasks in us. (default 1000us)
 .TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.TP
 .B \-s \-\-step STEP
 The amount to increase the deadline for each task in us. (default 500us)
 .TP
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 20/23] signaltest: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (18 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 19/23] cyclicdeadline: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:48   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 21/23] sigwaittest: " Daniel Wagner
                   ` (2 subsequent siblings)
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/signaltest/signaltest.8 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/signaltest/signaltest.8 b/src/signaltest/signaltest.8
index 5ce119b54461..da818ecdef67 100644
--- a/src/signaltest/signaltest.8
+++ b/src/signaltest/signaltest.8
@@ -5,7 +5,7 @@
 signaltest \- signal roundtrip test software
 .SH SYNOPSIS
 .LP
-signaltest [ -a|--affinity NUM] [ -b|--backtrace USEC ] [-D|--duration TIME] [-h|--help] [-l|--loops LOOPS ] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads NUM] [-m|--mlockall ] [-v|--verbose ]
+signaltest [ -a|--affinity NUM] [ -b|--backtrace USEC ] [-D|--duration TIME] [-h|--help] [--json FILENAME] [-l|--loops LOOPS ] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads NUM] [-m|--mlockall ] [-v|--verbose ]
 .SH OPTIONS
 These programs follow the usual GNU command line syntax, with long options
 starting with two dashes ('\-\-').
@@ -35,6 +35,9 @@ Append 'm', 'h', or 'd' to specify minutes, hours or days.
 .br
 display usage information
 .TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.TP
 .B \-l, \-\-loops=LOOPS
 Number of loops: default=0 (endless)
 .TP
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 21/23] sigwaittest: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (19 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 20/23] signaltest: " Daniel Wagner
@ 2021-05-19 17:09 ` 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-19 17:09 ` [PATCH rt-tests v1 23/23] svematest: " Daniel Wagner
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/sigwaittest/sigwaittest.8 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/sigwaittest/sigwaittest.8 b/src/sigwaittest/sigwaittest.8
index a2dc1bc080a3..26ad333e2841 100644
--- a/src/sigwaittest/sigwaittest.8
+++ b/src/sigwaittest/sigwaittest.8
@@ -4,7 +4,7 @@
 \fBsigwaittest\fR \- Start two threads or fork two processes and measure the latency between sending and receiving a signal
 .SH "SYNTAX"
 .LP
-sigwaittest [-a|--affinity PROC] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-t|--threads [NUM]]
+sigwaittest [-a|--affinity PROC] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-t|--threads [NUM]]
 .br
 .SH "DESCRIPTION"
 .LP
@@ -32,6 +32,9 @@ Instead of creating threads (which is the default), fork new processes
 .B \-i, \-\-interval=INTV
 Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d.
 .TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.TP
 .B \-l, \-\-loops=LOOPS
 Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. sigwaittest is stopped once the number of timer intervals has been reached.
 .TP
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 22/23] ssdd: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (20 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 21/23] sigwaittest: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:52   ` John Kacur
  2021-05-19 17:09 ` [PATCH rt-tests v1 23/23] svematest: " Daniel Wagner
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/ssdd/ssdd.8 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/ssdd/ssdd.8 b/src/ssdd/ssdd.8
index 5c29d0abb732..a3b9d790dec4 100644
--- a/src/ssdd/ssdd.8
+++ b/src/ssdd/ssdd.8
@@ -3,7 +3,7 @@
 ssdd \- have a tracer do a bunch of PTRACE_SINGLESTEPs
 .SH SYNOPSIS
 .LP
-ssdd [-f|--forks NUM] [-h|--help] [-i|--iters NUM]
+ssdd [-f|--forks NUM] [-h|--help] [-i|--iters NUM] [--json FILENAME]
 .SH DESCRIPTION
 Have a tracer do a bunch of PTRACE_SINGLESTEPs against a tracee as
 fast as possible. Create several of these tracer/tracee pairs and
@@ -25,6 +25,9 @@ number of PTRACE_SINGLESTEP iterations to do before declaring
 success, for each tracer tracee pair set up.
 .br
 Default is 10,000.
+.TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
 .SH AUTHOR
 ssdd was written by Joe Korty <joe.korty@concurrent-rt.com>
 .PP
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* [PATCH rt-tests v1 23/23] svematest: Add --json to man page
  2021-05-19 17:09 [PATCH rt-tests v1 00/23] Rename --output to --json Daniel Wagner
                   ` (21 preceding siblings ...)
  2021-05-19 17:09 ` [PATCH rt-tests v1 22/23] ssdd: " Daniel Wagner
@ 2021-05-19 17:09 ` Daniel Wagner
  2021-05-22  3:54   ` John Kacur
  22 siblings, 1 reply; 47+ messages in thread
From: Daniel Wagner @ 2021-05-19 17:09 UTC (permalink / raw)
  To: Clark Williams, John Kacur; +Cc: linux-rt-users, Daniel Wagner

Add the newly introduced --json command line to the man page.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
---
 src/svsematest/svsematest.8 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/svsematest/svsematest.8 b/src/svsematest/svsematest.8
index 828f9154e974..93abf55f3d4d 100644
--- a/src/svsematest/svsematest.8
+++ b/src/svsematest/svsematest.8
@@ -4,7 +4,7 @@
 \fBsvsematest\fR \- Start two threads or fork two processes and measure the latency of SYSV semaphores
 .SH "SYNTAX"
 .LP
-svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]]
+svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]]
 .br
 .SH "DESCRIPTION"
 .LP
@@ -32,6 +32,9 @@ Instead of creating threads (which is the default), fork new processes
 .B \-i, \-\-interval=INTV
 Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d.
 .TP
+.B \-\-json=FILENAME
+Write final results into FILENAME, JSON formatted.
+.TP
 .B \-l, \-\-loops=LOOPS
 Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. svsematest is stopped once the number of timer intervals has been reached.
 .TP
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 01/23] cyclicdeadline: Fix JSON output format
  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
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-21 21:30 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add missing comma after the max entry.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/sched_deadline/cyclicdeadline.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
> index 8d801b4c154a..b81fb3a2091d 100644
> --- a/src/sched_deadline/cyclicdeadline.c
> +++ b/src/sched_deadline/cyclicdeadline.c
> @@ -977,7 +977,7 @@ static void write_stats(FILE *f, void *data)
>  		fprintf(f, "    \"%u\": {\n", i);
>  		fprintf(f, "	 \"cycles\": %ld,\n", s->cycles);
>  		fprintf(f, "	 \"min\": %ld,\n", s->min);
> -		fprintf(f, "	 \"max\": %ld\n", s->max);
> +		fprintf(f, "	 \"max\": %ld,\n", s->max);
>  		fprintf(f, "	 \"avg\": %.2f\n", s->avg/s->cycles);
>  		fprintf(f, "    }%s\n", i == nr_threads - 1 ? "" : ",");
>  	}
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 02/23] cyclictest: Rename command line option --output to --json
  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
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-21 21:32 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/cyclictest/cyclictest.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
> index 59dda1973b1a..a561443fa67b 100644
> --- a/src/cyclictest/cyclictest.c
> +++ b/src/cyclictest/cyclictest.c
> @@ -218,7 +218,7 @@ static struct timespec globalt;
>  
>  static char fifopath[MAX_PATH];
>  static char histfile[MAX_PATH];
> -static char outfile[MAX_PATH];
> +static char jsonfile[MAX_PATH];
>  
>  static struct thread_param **parameters;
>  static struct thread_stat **statistics;
> @@ -832,6 +832,7 @@ static void display_help(int error)
>  	       "-H       --histofall=US    same as -h except with an additional summary column\n"
>  	       "	 --histfile=<path> dump the latency histogram to <path> instead of stdout\n"
>  	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
> +	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
>  	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
>  	       "	 --laptop	   Save battery when running cyclictest\n"
>  	       "			   This will give you poorer realtime results\n"
> @@ -841,7 +842,6 @@ static void display_help(int error)
>  	       "			   latency is hit. Useful for low bandwidth.\n"
>  	       "-N       --nsecs           print results in ns instead of us (default us)\n"
>  	       "-o RED   --oscope=RED      oscilloscope mode, reduce verbose output by RED\n"
> -	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
>  	       "-p PRIO  --priority=PRIO   priority of highest prio thread\n"
>  	       "	 --policy=NAME     policy of measurement thread, where NAME may be one\n"
>  	       "                           of: other, normal, batch, idle, fifo or rr.\n"
> @@ -944,14 +944,14 @@ enum option_values {
>  	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_CLOCK,
>  	OPT_DISTANCE, OPT_DURATION, OPT_LATENCY,
>  	OPT_FIFO, OPT_HISTOGRAM, OPT_HISTOFALL, OPT_HISTFILE,
> -	OPT_INTERVAL, OPT_LOOPS, OPT_MLOCKALL, OPT_REFRESH,
> +	OPT_INTERVAL, OPT_JSON, OPT_LOOPS, OPT_MLOCKALL, OPT_REFRESH,
>  	OPT_NANOSLEEP, OPT_NSECS, OPT_OSCOPE, OPT_PRIORITY,
>  	OPT_QUIET, OPT_PRIOSPREAD, OPT_RELATIVE, OPT_RESOLUTION,
>  	OPT_SYSTEM, OPT_SMP, OPT_THREADS, OPT_TRIGGER,
>  	OPT_TRIGGER_NODES, OPT_UNBUFFERED, OPT_NUMA, OPT_VERBOSE,
>  	OPT_DBGCYCLIC, OPT_POLICY, OPT_HELP, OPT_NUMOPTS,
>  	OPT_ALIGNED, OPT_SECALIGNED, OPT_LAPTOP, OPT_SMI,
> -	OPT_TRACEMARK, OPT_POSIX_TIMERS, OPT_OUTPUT
> +	OPT_TRACEMARK, OPT_POSIX_TIMERS,
>  };
>  
>  /* Process commandline options */
> @@ -979,13 +979,13 @@ static void process_options(int argc, char *argv[], int max_cpus)
>  			{"histofall",        required_argument, NULL, OPT_HISTOFALL },
>  			{"histfile",	     required_argument, NULL, OPT_HISTFILE },
>  			{"interval",         required_argument, NULL, OPT_INTERVAL },
> +			{"json",             required_argument, NULL, OPT_JSON },
>  			{"laptop",	     no_argument,	NULL, OPT_LAPTOP },
>  			{"loops",            required_argument, NULL, OPT_LOOPS },
>  			{"mlockall",         no_argument,       NULL, OPT_MLOCKALL },
>  			{"refresh_on_max",   no_argument,       NULL, OPT_REFRESH },
>  			{"nsecs",            no_argument,       NULL, OPT_NSECS },
>  			{"oscope",           required_argument, NULL, OPT_OSCOPE },
> -			{"output",           required_argument, NULL, OPT_OUTPUT },
>  			{"priority",         required_argument, NULL, OPT_PRIORITY },
>  			{"quiet",            no_argument,       NULL, OPT_QUIET },
>  			{"priospread",       no_argument,       NULL, OPT_PRIOSPREAD },
> @@ -1080,6 +1080,9 @@ static void process_options(int argc, char *argv[], int max_cpus)
>  		case 'i':
>  		case OPT_INTERVAL:
>  			interval = atoi(optarg); break;
> +		case OPT_JSON:
> +			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
> +			break;
>  		case 'l':
>  		case OPT_LOOPS:
>  			max_cycles = atoi(optarg); break;
> @@ -1095,9 +1098,6 @@ static void process_options(int argc, char *argv[], int max_cpus)
>  		case 'o':
>  		case OPT_OSCOPE:
>  			oscope_reduction = atoi(optarg); break;
> -		case OPT_OUTPUT:
> -			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
> -			break;
>  		case 'p':
>  		case OPT_PRIORITY:
>  			priority = atoi(optarg);
> @@ -2134,8 +2134,8 @@ int main(int argc, char **argv)
>  	if (!verbose && !quiet && refresh_on_max)
>  		printf("\033[%dB", num_threads + 2);
>  
> -	if (strlen(outfile) != 0)
> -		rt_write_json(outfile, ret, write_stats, NULL);
> +	if (strlen(jsonfile) != 0)
> +		rt_write_json(jsonfile, ret, write_stats, NULL);
>  
>  	if (quiet)
>  		quiet = 2;
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 03/23] oslat: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 03/23] oslat: " Daniel Wagner
@ 2021-05-21 21:35   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-21 21:35 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/oslat/oslat.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
> index 37d528f0f7ff..32de951f27c0 100644
> --- a/src/oslat/oslat.c
> +++ b/src/oslat/oslat.c
> @@ -174,7 +174,7 @@ struct global {
>  	int                   quiet;
>  	int                   single_preheat_thread;
>  	int                   output_omit_zero_buckets;
> -	char                  outfile[MAX_PATH];
> +	char                  jsonfile[MAX_PATH];
>  
>  	/* Mutable state. */
>  	volatile enum command cmd;
> @@ -560,6 +560,7 @@ static void usage(int error)
>  	       "-C, --cpu-main-thread  Specify which CPU the main thread runs on.  Default is cpu0.\n"
>  	       "-D, --duration         Specify test duration, e.g., 60, 20m, 2H\n"
>  	       "                       (m/M: minutes, h/H: hours, d/D: days)\n"
> +	       "    --json=FILENAME    write final results into FILENAME, JSON formatted\n"
>  	       "-f, --rtprio           Using SCHED_FIFO priority (1-99)\n"
>  	       "-m, --workload-mem     Size of the memory to use for the workload (e.g., 4K, 1M).\n"
>  	       "                       Total memory usage will be this value multiplies 2*N,\n"
> @@ -570,7 +571,6 @@ static void usage(int error)
>  	       "                       NOTE: please make sure the CPU frequency on all testing cores\n"
>  	       "                       are locked before using this parmater.  If you don't know how\n"
>  	       "                       to lock the freq then please don't use this parameter.\n"
> -	       "    --output=FILENAME  write final results into FILENAME, JSON formatted\n"
>  	       "-T, --trace-threshold  Stop the test when threshold triggered (in us),\n"
>  	       "                       print a marker in ftrace and stop ftrace too.\n"
>  	       "-v, --version          Display the version of the software.\n"
> @@ -597,8 +597,8 @@ static int workload_select(char *name)
>  
>  enum option_value {
>  	OPT_BUCKETSIZE=1, OPT_CPU_LIST, OPT_CPU_MAIN_THREAD,
> -	OPT_DURATION, OPT_RT_PRIO, OPT_HELP, OPT_TRACE_TH,
> -	OPT_WORKLOAD, OPT_WORKLOAD_MEM, OPT_BIAS, OPT_OUTPUT,
> +	OPT_DURATION, OPT_JSON, OPT_RT_PRIO, OPT_HELP, OPT_TRACE_TH,
> +	OPT_WORKLOAD, OPT_WORKLOAD_MEM, OPT_BIAS,
>  	OPT_QUIET, OPT_SINGLE_PREHEAT, OPT_ZERO_OMIT,
>  	OPT_VERSION
>  };
> @@ -613,6 +613,7 @@ static void parse_options(int argc, char *argv[])
>  			{ "cpu-list",	required_argument,	NULL, OPT_CPU_LIST },
>  			{ "cpu-main-thread", required_argument, NULL, OPT_CPU_MAIN_THREAD},
>  			{ "duration",	required_argument,	NULL, OPT_DURATION },
> +			{ "json",	required_argument,      NULL, OPT_JSON },
>  			{ "rtprio",	required_argument,	NULL, OPT_RT_PRIO },
>  			{ "help",	no_argument,		NULL, OPT_HELP },
>  			{ "trace-threshold", required_argument,	NULL, OPT_TRACE_TH },
> @@ -621,7 +622,6 @@ static void parse_options(int argc, char *argv[])
>  			{ "bias",	no_argument,		NULL, OPT_BIAS },
>  			{ "quiet",	no_argument,		NULL, OPT_QUIET },
>  			{ "single-preheat", no_argument,	NULL, OPT_SINGLE_PREHEAT },
> -			{ "output",	required_argument,      NULL, OPT_OUTPUT },
>  			{ "zero-omit",	no_argument,		NULL, OPT_ZERO_OMIT },
>  			{ "version",	no_argument,		NULL, OPT_VERSION },
>  			{ NULL, 0, NULL, 0 },
> @@ -677,8 +677,8 @@ static void parse_options(int argc, char *argv[])
>  				exit(1);
>  			}
>  			break;
> -		case OPT_OUTPUT:
> -			strncpy(g.outfile, optarg, strnlen(optarg, MAX_PATH-1));
> +		case OPT_JSON:
> +			strncpy(g.jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
>  			break;
>  		case OPT_TRACE_TH:
>  		case 'T':
> @@ -862,8 +862,8 @@ int main(int argc, char *argv[])
>  
>  	write_summary(threads);
>  
> -	if (strlen(g.outfile) != 0)
> -		rt_write_json(g.outfile, 0, write_summary_json, threads);
> +	if (strlen(g.jsonfile) != 0)
> +		rt_write_json(g.jsonfile, 0, write_summary_json, threads);
>  
>  	if (g.cpu_list) {
>  		free(g.cpu_list);
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 04/23] pi_stress: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 04/23] pi_stress: " Daniel Wagner
@ 2021-05-21 21:39   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-21 21:39 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 05/23] pmqtest: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 05/23] pmqtest: " Daniel Wagner
@ 2021-05-21 21:41   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-21 21:41 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/pmqtest/pmqtest.c | 21 ++++++++++-----------
>  1 file changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/src/pmqtest/pmqtest.c b/src/pmqtest/pmqtest.c
> index af10b416600c..edda7c69652e 100644
> --- a/src/pmqtest/pmqtest.c
> +++ b/src/pmqtest/pmqtest.c
> @@ -231,8 +231,8 @@ static void display_help(int error)
>  	       "-f TO    --forcetimeout=TO force timeout of mq_timedreceive(), requires -T\n"
>  	       "-h       --help            print this help message\n"
>  	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
> +	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
>  	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
> -	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
>  	       "-p PRIO  --prio=PRIO       priority\n"
>  	       "-q       --quiet           print a summary only on exit\n"
>  	       "-S       --smp             SMP testing: options -a -t and same priority\n"
> @@ -260,13 +260,12 @@ static int sameprio;
>  static int timeout;
>  static int forcetimeout;
>  static int quiet;
> -static char outfile[MAX_PATH];
> +static char jsonfile[MAX_PATH];
>  
>  enum option_value {
>  	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_DISTANCE, OPT_DURATION,
> -	OPT_FORCETIMEOUT, OPT_HELP, OPT_INTERVAL, OPT_LOOPS,
> -	OPT_OUTPUT, OPT_PRIORITY, OPT_QUIET, OPT_SMP, OPT_THREADS,
> -	OPT_TIMEOUT
> +	OPT_FORCETIMEOUT, OPT_HELP, OPT_INTERVAL, OPT_JSON, OPT_LOOPS,
> +	OPT_PRIORITY, OPT_QUIET, OPT_SMP, OPT_THREADS, OPT_TIMEOUT
>  };
>  
>  static void process_options(int argc, char *argv[])
> @@ -285,8 +284,8 @@ static void process_options(int argc, char *argv[])
>  			{"forcetimeout",required_argument,	NULL, OPT_FORCETIMEOUT},
>  			{"help",	no_argument,		NULL, OPT_HELP},
>  			{"interval",	required_argument,	NULL, OPT_INTERVAL},
> +			{"json",	required_argument,      NULL, OPT_JSON },
>  			{"loops",	required_argument,	NULL, OPT_LOOPS},
> -			{"output",	required_argument,      NULL, OPT_OUTPUT },
>  			{"priority",	required_argument,	NULL, OPT_PRIORITY},
>  			{"quiet",	no_argument,		NULL, OPT_QUIET},
>  			{"smp",		no_argument,		NULL, OPT_SMP},
> @@ -340,13 +339,13 @@ static void process_options(int argc, char *argv[])
>  		case 'i':
>  			interval = atoi(optarg);
>  			break;
> +		case OPT_JSON:
> +			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
> +			break;
>  		case OPT_LOOPS:
>  		case 'l':
>  			max_cycles = atoi(optarg);
>  			break;
> -		case OPT_OUTPUT:
> -			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
> -			break;
>  		case OPT_PRIORITY:
>  		case 'p':
>  			priority = atoi(optarg);
> @@ -647,12 +646,12 @@ int main(int argc, char *argv[])
>  		mq_unlink(mqname);
>  	}
>  
> -	if (strlen(outfile) != 0) {
> +	if (strlen(jsonfile) != 0) {
>  		struct params_stats ps = {
>  			.receiver = receiver,
>  			.sender = sender,
>  		};
> -		rt_write_json(outfile, 0, write_stats, &ps);
> +		rt_write_json(jsonfile, 0, write_stats, &ps);
>  	}
>  
>  nomem:
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 06/23] ptsematest: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 06/23] ptsematest: " Daniel Wagner
@ 2021-05-21 21:45   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-21 21:45 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/ptsematest/ptsematest.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/src/ptsematest/ptsematest.c b/src/ptsematest/ptsematest.c
> index 70eb79e89635..5822164386de 100644
> --- a/src/ptsematest/ptsematest.c
> +++ b/src/ptsematest/ptsematest.c
> @@ -155,8 +155,8 @@ static void display_help(int error)
>  	       "                           Append 'm', 'h', or 'd' to specify minutes, hours or\n"
>  	       "                           days.\n"
>  	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
> +	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
>  	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
> -	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
>  	       "-p PRIO  --prio=PRIO       priority\n"
>  	       "-q       --quiet           print a summary only on exit\n"
>  	       "-S       --smp             SMP testing: options -a -t and same priority\n"
> @@ -182,11 +182,11 @@ static int distance = 500;
>  static int smp;
>  static int sameprio;
>  static int quiet;
> -static char outfile[MAX_PATH];
> +static char jsonfile[MAX_PATH];
>  
>  enum option_value {
>  	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_DISTANCE, OPT_DURATION,
> -	OPT_HELP, OPT_INTERVAL, OPT_LOOPS, OPT_OUTPUT, OPT_PRIORITY,
> +	OPT_HELP, OPT_INTERVAL, OPT_JSON, OPT_LOOPS, OPT_PRIORITY,
>  	OPT_QUIET, OPT_SMP, OPT_THREADS
>  };
>  
> @@ -205,8 +205,8 @@ static void process_options(int argc, char *argv[])
>  			{"duration",	required_argument,	NULL, OPT_DURATION},
>  			{"help",	no_argument,		NULL, OPT_HELP},
>  			{"interval",	required_argument,	NULL, OPT_INTERVAL},
> +			{"json",	required_argument,      NULL, OPT_JSON },
>  			{"loops",	required_argument,	NULL, OPT_LOOPS},
> -			{"output",	required_argument,      NULL, OPT_OUTPUT },
>  			{"priority",	required_argument,	NULL, OPT_PRIORITY},
>  			{"quiet",	no_argument	,	NULL, OPT_QUIET},
>  			{"smp",		no_argument,		NULL, OPT_SMP},
> @@ -250,6 +250,9 @@ static void process_options(int argc, char *argv[])
>  		case 'i':
>  			interval = atoi(optarg);
>  			break;
> +		case OPT_JSON:
> +			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
> +			break;
>  		case OPT_HELP:
>  		case '?':
>  		case 'h':
> @@ -259,9 +262,6 @@ static void process_options(int argc, char *argv[])
>  		case 'l':
>  			max_cycles = atoi(optarg);
>  			break;
> -		case OPT_OUTPUT:
> -			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
> -			break;
>  		case OPT_PRIORITY:
>  		case 'p':
>  			priority = atoi(optarg);
> @@ -515,12 +515,12 @@ int main(int argc, char *argv[])
>  		pthread_mutex_destroy(&syncmutex[i]);
>  	}
>  
> -	if (strlen(outfile) != 0) {
> +	if (strlen(jsonfile) != 0) {
>  		struct params_stats ps = {
>  			.receiver = receiver,
>  			.sender = sender,
>  		};
> -		rt_write_json(outfile, 0, write_stats, &ps);
> +		rt_write_json(jsonfile, 0, write_stats, &ps);
>  	}
>  
>  nomem:
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 07/23] rt-migrate-test: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 07/23] rt-migrate-test: " Daniel Wagner
@ 2021-05-21 21:47   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-21 21:47 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/rt-migrate-test/rt-migrate-test.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c
> index 1e0abdd6c0fa..0c4dabeee249 100644
> --- a/src/rt-migrate-test/rt-migrate-test.c
> +++ b/src/rt-migrate-test/rt-migrate-test.c
> @@ -102,7 +102,7 @@ static int done;
>  static int loop;
>  static int duration;
>  static int quiet;
> -static char outfile[MAX_PATH];
> +static char jsonfile[MAX_PATH];
>  
>  static pthread_barrier_t start_barrier;
>  static pthread_barrier_t end_barrier;
> @@ -162,9 +162,9 @@ static void usage(int error)
>  	       "                           days.\n"
>  	       "-e       --equal           Use equal prio for #CPU-1 tasks (requires > 2 CPUS)\n"
>  	       "-h       --help            Print this help message\n"
> +	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
>  	       "-l LOOPS --loops=LOOPS     Number of iterations to run (50)\n"
>  	       "-m TIME  --maxerr=TIME     Max allowed error (microsecs)\n"
> -	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
>  	       "-p PRIO  --prio=PRIO       base priority to start RT tasks with (2)\n"
>  	       "-q       --quiet           print a summary only on exit\n"
>  	       "-r TIME  --run-time=TIME   Run time (ms) to busy loop the threads (20)\n"
> @@ -175,8 +175,8 @@ static void usage(int error)
>  }
>  
>  enum option_value {
> -	OPT_CHECK=1, OPT_DURATION, OPT_EQUAL, OPT_HELP, OPT_LOOPS,
> -	OPT_MAXERR, OPT_OUTPUT, OPT_PRIO, OPT_QUIET, OPT_RUN_TIME,
> +	OPT_CHECK=1, OPT_DURATION, OPT_EQUAL, OPT_HELP, OPT_JSON,
> +	OPT_LOOPS, OPT_MAXERR, OPT_PRIO, OPT_QUIET, OPT_RUN_TIME,
>  	OPT_SLEEP_TIME
>  };
>  
> @@ -190,9 +190,9 @@ static void parse_options(int argc, char *argv[])
>  			{"duration",	required_argument,	NULL, OPT_DURATION},
>  			{"equal",	no_argument,		NULL, OPT_EQUAL},
>  			{"help",	no_argument,		NULL, OPT_HELP},
> +			{"json",	required_argument,      NULL, OPT_JSON},
>  			{"loops",	required_argument,	NULL, OPT_LOOPS},
>  			{"maxerr",	required_argument,	NULL, OPT_MAXERR},
> -			{"output",	required_argument,      NULL, OPT_OUTPUT },
>  			{"prio",	required_argument,	NULL, OPT_PRIO},
>  			{"quiet",	no_argument,		NULL, OPT_QUIET},
>  			{"run-time",	required_argument,	NULL, OPT_RUN_TIME},
> @@ -221,6 +221,9 @@ static void parse_options(int argc, char *argv[])
>  		case 'h':
>  			usage(0);
>  			break;
> +		case OPT_JSON:
> +			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
> +			break;
>  		case OPT_LOOPS:
>  		case 'l':
>  			nr_runs = atoi(optarg);
> @@ -229,9 +232,6 @@ static void parse_options(int argc, char *argv[])
>  		case 'm':
>  			max_err = usec2nano(atoi(optarg));
>  			break;
> -		case OPT_OUTPUT:
> -			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
> -			break;
>  		case OPT_PRIO:
>  		case 'p':
>  			prio_start = atoi(optarg);
> @@ -663,8 +663,8 @@ int main (int argc, char **argv)
>  
>  	print_results();
>  
> -	if (strlen(outfile) != 0)
> -		rt_write_json(outfile, check < 0, write_stats, NULL);
> +	if (strlen(jsonfile) != 0)
> +		rt_write_json(jsonfile, check < 0, write_stats, NULL);
>  
>  	if (stop) {
>  		/*
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 08/23] cyclicdeadline: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 08/23] cyclicdeadline: " Daniel Wagner
@ 2021-05-21 21:49   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-21 21:49 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/sched_deadline/cyclicdeadline.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/src/sched_deadline/cyclicdeadline.c b/src/sched_deadline/cyclicdeadline.c
> index b81fb3a2091d..4c81891bbe63 100644
> --- a/src/sched_deadline/cyclicdeadline.c
> +++ b/src/sched_deadline/cyclicdeadline.c
> @@ -89,7 +89,7 @@ static int nr_threads;
>  static int use_nsecs;
>  static int mark_fd;
>  static int quiet;
> -static char outfile[MAX_PATH];
> +static char jsonfile[MAX_PATH];
>  
>  static int find_mount(const char *mount, char *debugfs)
>  {
> @@ -605,7 +605,7 @@ static void usage(int error)
>  	       "-h       --help            Show this help menu.\n"
>  	       "-i INTV  --interval        The shortest deadline for the tasks in us\n"
>  	       "                           (default 1000us).\n"
> -	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
> +	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
>  	       "-s STEP  --step            The amount to increase the deadline for each task in us\n"
>  	       "                           (default 500us).\n"
>  	       "-t NUM   --threads         The number of threads to run as deadline (default 1).\n"
> @@ -986,7 +986,7 @@ static void write_stats(FILE *f, void *data)
>  
>  enum options_valud {
>  	OPT_AFFINITY=1, OPT_DURATION, OPT_HELP, OPT_INTERVAL,
> -	OPT_OUTPUT, OPT_STEP, OPT_THREADS, OPT_QUIET
> +	OPT_JSON, OPT_STEP, OPT_THREADS, OPT_QUIET
>  };
>  
>  int main(int argc, char **argv)
> @@ -1021,7 +1021,7 @@ int main(int argc, char **argv)
>  			{ "duration",	required_argument,	NULL,	OPT_DURATION },
>  			{ "help",	no_argument,		NULL,	OPT_HELP },
>  			{ "interval",	required_argument,	NULL,	OPT_INTERVAL },
> -			{ "output",	required_argument,	NULL,	OPT_OUTPUT },
> +			{ "json",	required_argument,	NULL,	OPT_JSON },
>  			{ "step",	required_argument,	NULL,	OPT_STEP },
>  			{ "threads",	required_argument,	NULL,	OPT_THREADS },
>  			{ "quiet",	no_argument,		NULL,	OPT_QUIET },
> @@ -1047,8 +1047,8 @@ int main(int argc, char **argv)
>  		case 'i':
>  			interval = atoi(optarg);
>  			break;
> -		case OPT_OUTPUT:
> -			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
> +		case OPT_JSON:
> +			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
>  			break;
>  		case OPT_STEP:
>  		case 's':
> @@ -1227,8 +1227,8 @@ int main(int argc, char **argv)
>  		}
>  	}
>  
> -	if (strlen(outfile) != 0)
> -		rt_write_json(outfile, 0, write_stats, sched_data);
> +	if (strlen(jsonfile) != 0)
> +		rt_write_json(jsonfile, 0, write_stats, sched_data);
>  
>  	if (setcpu_buf)
>  		free(setcpu_buf);
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 09/23] signaltest: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 09/23] signaltest: " Daniel Wagner
@ 2021-05-21 21:51   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-21 21:51 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/signaltest/signaltest.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/src/signaltest/signaltest.c b/src/signaltest/signaltest.c
> index f43920e1a853..2dd22070cb5d 100644
> --- a/src/signaltest/signaltest.c
> +++ b/src/signaltest/signaltest.c
> @@ -187,9 +187,9 @@ static void display_help(int error)
>  		"                           Append 'm', 'h', or 'd' to specify minutes, hours or\n"
>  		"                           days.\n"
>  		"-h       --help            display usage information\n"
> +		"         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
>  		"-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
>  		"-m       --mlockall        lock current and future memory allocations\n"
> -		"         --output=FILENAME write final results into FILENAME, JSON formatted\n"
>  		"-p PRIO  --prio=PRIO       priority of highest prio thread\n"
>  		"-q       --quiet           print a summary only on exit\n"
>  		"-t NUM   --threads=NUM     number of threads: default=2\n"
> @@ -210,12 +210,12 @@ static struct bitmask *affinity_mask = NULL;
>  static int smp = 0;
>  static int numa = 0;
>  static int setaffinity = AFFINITY_UNSPECIFIED;
> -static char outfile[MAX_PATH];
> +static char jsonfile[MAX_PATH];
>  
>  enum option_values {
>  	OPT_AFFINITY=1, OPT_BREAKTRACE,
> -	OPT_DURATION, OPT_HELP, OPT_LOOPS,
> -	OPT_MLOCKALL, OPT_OUTPUT, OPT_PRIORITY,
> +	OPT_DURATION, OPT_HELP, OPT_JSON,
> +	OPT_LOOPS, OPT_MLOCKALL, OPT_PRIORITY,
>  	OPT_QUIET, OPT_SMP, OPT_THREADS, OPT_VERBOSE
>  };
>  
> @@ -233,9 +233,9 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)
>  			{"breaktrace",	required_argument,	NULL, OPT_BREAKTRACE},
>  			{"duration",	required_argument,	NULL, OPT_DURATION},
>  			{"help",	no_argument,		NULL, OPT_HELP},
> +			{"json",	required_argument,	NULL, OPT_JSON},
>  			{"loops",	required_argument,	NULL, OPT_LOOPS},
>  			{"mlockall",	no_argument,		NULL, OPT_MLOCKALL},
> -			{"output",	required_argument,	NULL, OPT_OUTPUT},
>  			{"priority",	required_argument,	NULL, OPT_PRIORITY},
>  			{"quiet",	no_argument,		NULL, OPT_QUIET},
>  			{"smp",		no_argument,		NULL, OPT_SMP},
> @@ -287,6 +287,9 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)
>  		case 'h':
>  			display_help(0);
>  			break;
> +		case OPT_JSON:
> +			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
> +			break;
>  		case OPT_LOOPS:
>  		case 'l':
>  			max_cycles = atoi(optarg);
> @@ -295,9 +298,6 @@ static void process_options(int argc, char *argv[], unsigned int max_cpus)
>  		case 'm':
>  			lockall = 1;
>  			break;
> -		case OPT_OUTPUT:
> -			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
> -			break;
>  		case OPT_PRIORITY:
>  		case 'p':
>  			priority = atoi(optarg);
> @@ -558,8 +558,8 @@ int main(int argc, char **argv)
>  		if (stat[i].values)
>  			free(stat[i].values);
>  	}
> -	if (strlen(outfile) != 0)
> -		rt_write_json(outfile, ret, write_stats, par);
> +	if (strlen(jsonfile) != 0)
> +		rt_write_json(jsonfile, ret, write_stats, par);
>  
>  	free(stat);
>   outpar:
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 10/23] sigwaittest: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 10/23] sigwaittest: " Daniel Wagner
@ 2021-05-22  3:33   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:33 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/sigwaittest/sigwaittest.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/src/sigwaittest/sigwaittest.c b/src/sigwaittest/sigwaittest.c
> index fda44724dd62..98a740d2cce2 100644
> --- a/src/sigwaittest/sigwaittest.c
> +++ b/src/sigwaittest/sigwaittest.c
> @@ -220,8 +220,8 @@ static void display_help(int error)
>  	       "                           days.\n"
>  	       "-f [OPT] --fork[=OPT]      fork new processes instead of creating threads\n"
>  	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
> +	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
>  	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
> -	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
>  	       "-p PRIO  --prio=PRIO       priority\n"
>  	       "-q       --quiet           print a summary only on exit\n"
>  	       "-t       --threads         one thread per available processor\n"
> @@ -242,11 +242,11 @@ static int duration;
>  static int interval = 1000;
>  static int distance = 500;
>  static int quiet;
> -static char outfile[MAX_PATH];
> +static char jsonfile[MAX_PATH];
>  
>  enum option_value {
>  	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_DISTANCE, OPT_DURATION,
> -	OPT_FORK, OPT_HELP, OPT_INTERVAL, OPT_LOOPS, OPT_OUTPUT,
> +	OPT_FORK, OPT_HELP, OPT_INTERVAL, OPT_JSON, OPT_LOOPS,
>  	OPT_PRIORITY, OPT_QUIET, OPT_THREADS
>  };
>  
> @@ -267,8 +267,8 @@ static void process_options(int argc, char *argv[])
>  			{"fork",	optional_argument,	NULL, OPT_FORK},
>  			{"help",	no_argument,		NULL, OPT_HELP},
>  			{"interval",	required_argument,	NULL, OPT_INTERVAL},
> +			{"json",	required_argument,      NULL, OPT_JSON},
>  			{"loops",	required_argument,	NULL, OPT_LOOPS},
> -			{"output",	required_argument,      NULL, OPT_OUTPUT },
>  			{"priority",	required_argument,	NULL, OPT_PRIORITY},
>  			{"quiet",	no_argument,		NULL, OPT_QUIET},
>  			{"threads",	optional_argument,	NULL, OPT_THREADS},
> @@ -324,13 +324,13 @@ static void process_options(int argc, char *argv[])
>  		case 'i':
>  			interval = atoi(optarg);
>  			break;
> +		case OPT_JSON:
> +			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
> +			break;
>  		case OPT_LOOPS:
>  		case 'l':
>  			max_cycles = atoi(optarg);
>  			break;
> -		case OPT_OUTPUT:
> -			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
> -			break;
>  		case OPT_PRIORITY:
>  		case 'p':
>  			priority = atoi(optarg);
> @@ -702,12 +702,12 @@ int main(int argc, char *argv[])
>  		}
>  	}
>  
> -	if (strlen(outfile) != 0) {
> +	if (strlen(jsonfile) != 0) {
>  		struct params_stats ps = {
>  			.receiver = receiver,
>  			.sender = sender,
>  		};
> -		rt_write_json(outfile, 0, write_stats, &ps);
> +		rt_write_json(jsonfile, 0, write_stats, &ps);
>  	}
>  
>  nomem:
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 11/23] ssdd: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 11/23] ssdd: " Daniel Wagner
@ 2021-05-22  3:34   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:34 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/ssdd/ssdd.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
> index 3ead14d0127e..421688c7f47c 100644
> --- a/src/ssdd/ssdd.c
> +++ b/src/ssdd/ssdd.c
> @@ -67,11 +67,11 @@ static const char *get_state_name(int state)
>  #define unused __attribute__((unused))
>  
>  static int quiet;
> -static char outfile[MAX_PATH];
> +static char jsonfile[MAX_PATH];
>  
>  static int got_sigchld;
>  
> -enum option_value { OPT_NFORKS=1, OPT_NITERS, OPT_HELP, OPT_OUTPUT, OPT_QUIET };
> +enum option_value { OPT_NFORKS=1, OPT_NITERS, OPT_HELP, OPT_JSON, OPT_QUIET };
>  
>  static void usage(int error)
>  {
> @@ -80,7 +80,7 @@ static void usage(int error)
>  	       "ssdd <options>\n\n"
>  	       "-f       --forks=NUM       number of forks\n"
>  	       "-h       --help            print this message\n"
> -	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
> +	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
>  	       "-q       --quiet           suppress running output\n"
>  	       "-i       --iters=NUM       number of iterations\n"
>  	       );
> @@ -306,7 +306,7 @@ int main(int argc, char **argv)
>  		static struct option long_options[] = {
>  			{"forks",		required_argument,	NULL, OPT_NFORKS},
>  			{"help",		no_argument,		NULL, OPT_HELP},
> -			{"output",		required_argument,	NULL, OPT_OUTPUT},
> +			{"json",		required_argument,	NULL, OPT_JSON},
>  			{"quiet",		no_argument,		NULL, OPT_QUIET},
>  			{"iters",		required_argument,	NULL, OPT_NITERS},
>  			{NULL, 0, NULL, 0},
> @@ -323,8 +323,8 @@ int main(int argc, char **argv)
>  		case OPT_HELP:
>  			usage(0);
>  			break;
> -		case OPT_OUTPUT:
> -			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
> +		case OPT_JSON:
> +			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
>  			break;
>  		case OPT_QUIET:
>  		case 'q':
> @@ -374,8 +374,8 @@ int main(int argc, char **argv)
>  		"One or more tests FAILED" :
>  		"All tests PASSED");
>  
> -	if (strlen(outfile) != 0)
> -		rt_write_json(outfile, error, NULL, NULL);
> +	if (strlen(jsonfile) != 0)
> +		rt_write_json(jsonfile, error, NULL, NULL);
>  
>  	exit(error);
>  }
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 13/23] cyclictest: Add --json to man page
  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
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:38 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/cyclictest/cyclictest.8 | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/src/cyclictest/cyclictest.8 b/src/cyclictest/cyclictest.8
> index 44b5d0dbcc4a..4fe42e502535 100644
> --- a/src/cyclictest/cyclictest.8
> +++ b/src/cyclictest/cyclictest.8
> @@ -17,8 +17,8 @@ cyclictest \- High resolution test program
>  .SH SYNOPSIS
>  .SY cyclictest
>  .RI "[ \-hfmnqrsvMS ] [\-a " proc " ] [\-A " align " ] [\-b " usec " ] [\-c " clock " ] [\-d " dist " ] \
> -[\-h " histogram " ] [\-i " intv " ] [\-l " loop " ] [\-o " red " ] [\-p " prio " ] \
> -[\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ \-S | \-U ]"
> +[\-h " histogram " ] [\-i " intv " ] [\-\-json " filename " ] [\-l " loop " ] [\-o " red " ] \
> +[\-p " prio " ] [\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ \-S | \-U ]"
>  
>  .\" .SH DESCRIPTION
>  .\" This manual page documents briefly the
> @@ -85,6 +85,9 @@ Dump the latency histogram to <path> instead of stdout.
>  .B \-i, \-\-interval=INTV
>  Set the base interval of the thread(s) in microseconds (default is 1000us). This sets the interval of the first thread. See also \-d.
>  .TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
> +.TP
>  .B \-l, \-\-loops=LOOPS
>  Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. Cyclictest is stopped once the number of timer intervals has been reached.
>  .TP
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 14/23] oslat: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 14/23] oslat: " Daniel Wagner
@ 2021-05-22  3:39   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:39 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/oslat/oslat.8 | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/oslat/oslat.8 b/src/oslat/oslat.8
> index b481d8d82783..4b28abd24425 100644
> --- a/src/oslat/oslat.8
> +++ b/src/oslat/oslat.8
> @@ -5,8 +5,9 @@ oslat \- OS Latency Detector
>  .SH SYNOPSIS
>  .SY oslat
>  .RI "[ \-shvz ] [ \-b " bucket-size " ] [ \-B " bias " ] [ \-c " cpu-list " ] \
> -[ \-C " cpu-main-thread " ] [ \-f " rt-prio " ] [ \-m " workload-mem " ] \
> -[\-t " runtime " ] [ \-T " trace-threshold " ] [ \-w " workload " ]"
> +[ \-C " cpu-main-thread " ] [ \-f " rt-prio " ] [ \-\-json " filename " ] \
> +[ \-m " workload-mem " ] [\-t " runtime " ] [ \-T " trace-threshold " ] \
> +[ \-w " workload " ]"
>  .SH DESCRIPTION
>  .B oslat
>  is an open source userspace polling mode stress program to detect OS level
> @@ -30,6 +31,9 @@ Specify which CPU the main thread runs on.  Default is cpu0.
>  Using specific SCHED_FIFO priority (1-99).  Otherwise use the default
>  priority, normally it will be SCHED_OTHER.
>  .TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
> +.TP
>  .B \-m, \-\-workload-mem=SIZE
>  Size of the memory to use for the workload (e.g., 4K, 1M).
>  Total memory usage will be this value multiplies 2*N,
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 15/23] pi_stress: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 15/23] pi_stress: " Daniel Wagner
@ 2021-05-22  3:41   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:41 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/pi_tests/pi_stress.8 | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/src/pi_tests/pi_stress.8 b/src/pi_tests/pi_stress.8
> index c3d7889a5cd5..8c43a1ccf676 100644
> --- a/src/pi_tests/pi_stress.8
> +++ b/src/pi_tests/pi_stress.8
> @@ -10,7 +10,7 @@
>  pi_stress \- a stress test for POSIX Priority Inheritance mutexes
>  .\"}}}
>  .\"{{{ Synopsis
> -.\" Usage:  pi_stress [-d] [-D TIME] [-g N] [-h] [-i N ] [-m] [-p] [-q] [-r] [-s OPTS] [-u] [-v] [-V]
> +.\" Usage:  pi_stress [-d] [-D TIME] [-g N] [-h] [-i N ] [--json FILENAME ] [-m] [-p] [-q] [-r] [-s OPTS] [-u] [-v] [-V]
>  .SH SYNOPSIS
>  .B pi_stress
>  .RB [ \-d|\-\-debug]
> @@ -20,6 +20,8 @@ pi_stress \- a stress test for POSIX Priority Inheritance mutexes
>  .IR N ]
>  .RB [ \-i|\-\-inversions
>  .IR INV ]
> +.RB [ \-\-json
> +.IR FILENAME ]
>  .RB [ \-m|\-\-mlockall ]
>  .RB [ \-p|\-\-prompt ]
>  .RB [ \-q|\-\-quiet ]
> @@ -58,6 +60,10 @@ Display a short help message and options.
>  .I N
>  number of inversion conditions. This is the total number of inversions
>  for all inversion groups. Default is \-1 for infinite.
> +.IP "\-\-json=FILENAME"
> +Write final results into
> +.I FILENAME
> +, JSON formatted.
>  .IP "\-m|\-\-mlockall"
>  Call mlockall to lock current and future memory allocations and
>  prevent being paged out
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 16/23] pmqtest: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 16/23] pmqtest: " Daniel Wagner
@ 2021-05-22  3:42   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:42 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/pmqtest/pmqtest.8 | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/pmqtest/pmqtest.8 b/src/pmqtest/pmqtest.8
> index 36678d0c5026..4fbcc5c27ce2 100644
> --- a/src/pmqtest/pmqtest.8
> +++ b/src/pmqtest/pmqtest.8
> @@ -4,7 +4,7 @@
>  \fBpmqtest\fR \- Start pairs of threads and measure the latency of interprocess communication with POSIX messages queues
>  .SH "SYNTAX"
>  .LP
> -pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-D TIME] [-f TO] [-h] [-i INTV] [-l LOOPS] [-p PRIO] [-q] [-S] [-t|-t NUM]
> +pmqtest [-a|-a PROC] [-b USEC] [-d DIST] [-D TIME] [-f TO] [-h] [-i INTV] [--json FILENAME] [-l LOOPS] [-p PRIO] [-q] [-S] [-t|-t NUM]
>  .br
>  .SH "DESCRIPTION"
>  .LP
> @@ -35,6 +35,9 @@ Set an artificial delay of the send function to force timeout of the receiver, r
>  .B \-i, \-\-interval=INTV
>  Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d.
>  .TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
> +.TP
>  .B \-l, \-\-loops=LOOPS
>  Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. pmqtest is stopped once the number of timer intervals has been reached.
>  .TP
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 17/23] ptsematest: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 17/23] ptsematest: " Daniel Wagner
@ 2021-05-22  3:44   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:44 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/ptsematest/ptsematest.8 | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ptsematest/ptsematest.8 b/src/ptsematest/ptsematest.8
> index a435e7a6221c..57e1658612c0 100644
> --- a/src/ptsematest/ptsematest.8
> +++ b/src/ptsematest/ptsematest.8
> @@ -4,7 +4,7 @@
>  \fBptsematest\fR \- Start two threads and measure the latency of interprocess communication with POSIX mutex.
>  .SH "SYNOPSIS"
>  .LP
> -ptsematest [-a|--affinity [PROC]] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-h|--help] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]]
> +ptsematest [-a|--affinity [PROC]] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-h|--help] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]]
>  .br
>  .SH "DESCRIPTION"
>  .LP
> @@ -32,6 +32,9 @@ Print help message.
>  .B \-i, \-\-interval=INTV
>  Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d.
>  .TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
> +.TP
>  .B \-l, \-\-loops=LOOPS
>  Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. ptsematest is stopped once the number of timer intervals has been reached.
>  .TP
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 18/23] rt-migrate-test: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 18/23] rt-migrate-test: " Daniel Wagner
@ 2021-05-22  3:45   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:45 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/rt-migrate-test/rt-migrate-test.8 | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/src/rt-migrate-test/rt-migrate-test.8 b/src/rt-migrate-test/rt-migrate-test.8
> index 5bbacb5333b8..53670e3757fa 100644
> --- a/src/rt-migrate-test/rt-migrate-test.8
> +++ b/src/rt-migrate-test/rt-migrate-test.8
> @@ -5,7 +5,7 @@
>  rt-migrate-test \- real-time task migration program
>  .SH SYNOPSIS
>  .LP
> -rt-migrate-test [-c|--check] [-D|--duration TIME] [-e|--equal] [-h|--help] [-l|--loops LOOPS] [-m|--maxerr TIME] [-p|--prio PRIO] [-r|--run-time TIME] [-s|--sleep-time TIME] [NR_TASKS]
> +rt-migrate-test [-c|--check] [-D|--duration TIME] [-e|--equal] [-h|--help] [--json FILENAME] [-l|--loops LOOPS] [-m|--maxerr TIME] [-p|--prio PRIO] [-r|--run-time TIME] [-s|--sleep-time TIME] [NR_TASKS]
>  .SH DESCRIPTION
>  Test real-time multiprocessor scheduling of tasks to ensure the highest priority tasks are running on all available CPUs
>  .SH OPTIONS
> @@ -31,6 +31,10 @@ Use equal prio for #CPU-1 tasks (requires > 2 CPUS)
>  Display usage
>  .br
>  .TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
> +.br
> +.TP
>  .B \-l \-\-loops=LOOPS
>  Number of iterations to run (50)
>  .br
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 19/23] cyclicdeadline: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 19/23] cyclicdeadline: " Daniel Wagner
@ 2021-05-22  3:46   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:46 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/sched_deadline/cyclicdeadline.8 | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/sched_deadline/cyclicdeadline.8 b/src/sched_deadline/cyclicdeadline.8
> index 59b60ca7bd31..1a56ed028d81 100644
> --- a/src/sched_deadline/cyclicdeadline.8
> +++ b/src/sched_deadline/cyclicdeadline.8
> @@ -17,7 +17,7 @@ cyclicdeadline \- This program is used to test the deadline scheduler (SCHED_DEA
>  .PP
>  .SH SYNOPSIS
>  .B cyclicdeadline
> -.RI "[-a [CPUSET]] [-D TIME] [-h]  [-i INTV] [-s STEP] [-t NUM] [-q]"
> +.RI "[-a [CPUSET]] [-D TIME] [-h]  [-i INTV] [--json FILENAME] [-s STEP] [-t NUM] [-q]"
>  .PP
>  .SH DESCRIPTION
>  .B cyclicdeadline
> @@ -38,6 +38,9 @@ Show this help menu
>  .B \-i \-\-interval INTV
>  The shortest deadline for the tasks in us. (default 1000us)
>  .TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
> +.TP
>  .B \-s \-\-step STEP
>  The amount to increase the deadline for each task in us. (default 500us)
>  .TP
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 20/23] signaltest: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 20/23] signaltest: " Daniel Wagner
@ 2021-05-22  3:48   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:48 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/signaltest/signaltest.8 | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/signaltest/signaltest.8 b/src/signaltest/signaltest.8
> index 5ce119b54461..da818ecdef67 100644
> --- a/src/signaltest/signaltest.8
> +++ b/src/signaltest/signaltest.8
> @@ -5,7 +5,7 @@
>  signaltest \- signal roundtrip test software
>  .SH SYNOPSIS
>  .LP
> -signaltest [ -a|--affinity NUM] [ -b|--backtrace USEC ] [-D|--duration TIME] [-h|--help] [-l|--loops LOOPS ] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads NUM] [-m|--mlockall ] [-v|--verbose ]
> +signaltest [ -a|--affinity NUM] [ -b|--backtrace USEC ] [-D|--duration TIME] [-h|--help] [--json FILENAME] [-l|--loops LOOPS ] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads NUM] [-m|--mlockall ] [-v|--verbose ]
>  .SH OPTIONS
>  These programs follow the usual GNU command line syntax, with long options
>  starting with two dashes ('\-\-').
> @@ -35,6 +35,9 @@ Append 'm', 'h', or 'd' to specify minutes, hours or days.
>  .br
>  display usage information
>  .TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
> +.TP
>  .B \-l, \-\-loops=LOOPS
>  Number of loops: default=0 (endless)
>  .TP
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 21/23] sigwaittest: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 21/23] sigwaittest: " Daniel Wagner
@ 2021-05-22  3:49   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:49 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/sigwaittest/sigwaittest.8 | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/sigwaittest/sigwaittest.8 b/src/sigwaittest/sigwaittest.8
> index a2dc1bc080a3..26ad333e2841 100644
> --- a/src/sigwaittest/sigwaittest.8
> +++ b/src/sigwaittest/sigwaittest.8
> @@ -4,7 +4,7 @@
>  \fBsigwaittest\fR \- Start two threads or fork two processes and measure the latency between sending and receiving a signal
>  .SH "SYNTAX"
>  .LP
> -sigwaittest [-a|--affinity PROC] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-t|--threads [NUM]]
> +sigwaittest [-a|--affinity PROC] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-t|--threads [NUM]]
>  .br
>  .SH "DESCRIPTION"
>  .LP
> @@ -32,6 +32,9 @@ Instead of creating threads (which is the default), fork new processes
>  .B \-i, \-\-interval=INTV
>  Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d.
>  .TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
> +.TP
>  .B \-l, \-\-loops=LOOPS
>  Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. sigwaittest is stopped once the number of timer intervals has been reached.
>  .TP
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 12/23] svsematest: Rename command line option --output to --json
  2021-05-19 17:09 ` [PATCH rt-tests v1 12/23] svsematest: " Daniel Wagner
@ 2021-05-22  3:51   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:51 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> 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/svsematest/svsematest.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c
> index 9485ab6d95c8..8c55b6b7c48d 100644
> --- a/src/svsematest/svsematest.c
> +++ b/src/svsematest/svsematest.c
> @@ -233,8 +233,8 @@ static void display_help(int error)
>  	       "                           days.\n"
>  	       "-f [OPT] --fork[=OPT]      fork new processes instead of creating threads\n"
>  	       "-i INTV  --interval=INTV   base interval of thread in us default=1000\n"
> +	       "         --json=FILENAME   write final results into FILENAME, JSON formatted\n"
>  	       "-l LOOPS --loops=LOOPS     number of loops: default=0(endless)\n"
> -	       "         --output=FILENAME write final results into FILENAME, JSON formatted\n"
>  	       "-p PRIO  --prio=PRIO       priority\n"
>  	       "-S       --smp             SMP testing: options -a -t and same priority\n"
>  	       "                           of all threads\n"
> @@ -257,11 +257,11 @@ static int distance = 500;
>  static int smp;
>  static int sameprio;
>  static int quiet;
> -static char outfile[MAX_PATH];
> +static char jsonfile[MAX_PATH];
>  
>  enum option_value {
>  	OPT_AFFINITY=1, OPT_BREAKTRACE, OPT_DISTANCE, OPT_DURATION,
> -	OPT_FORK, OPT_HELP, OPT_INTERVAL, OPT_LOOPS, OPT_OUTPUT,
> +	OPT_FORK, OPT_HELP, OPT_INTERVAL, OPT_JSON, OPT_LOOPS,
>  	OPT_PRIORITY, OPT_QUIET, OPT_SMP, OPT_THREADS
>  };
>  
> @@ -282,8 +282,8 @@ static void process_options(int argc, char *argv[])
>  			{"fork",	optional_argument,	NULL, OPT_FORK},
>  			{"help",	no_argument,		NULL, OPT_HELP},
>  			{"interval",	required_argument,	NULL, OPT_INTERVAL},
> +			{"json",	required_argument,      NULL, OPT_JSON},
>  			{"loops",	required_argument,	NULL, OPT_LOOPS},
> -			{"output",	required_argument,      NULL, OPT_OUTPUT},
>  			{"priority",	required_argument,	NULL, OPT_PRIORITY},
>  			{"quiet",	no_argument,		NULL, OPT_QUIET},
>  			{"smp",		no_argument,		NULL, OPT_SMP},
> @@ -343,13 +343,13 @@ static void process_options(int argc, char *argv[])
>  		case 'i':
>  			interval = atoi(optarg);
>  			break;
> +		case OPT_JSON:
> +			strncpy(jsonfile, optarg, strnlen(optarg, MAX_PATH-1));
> +			break;
>  		case OPT_LOOPS:
>  		case 'l':
>  			max_cycles = atoi(optarg);
>  			break;
> -		case OPT_OUTPUT:
> -			strncpy(outfile, optarg, strnlen(optarg, MAX_PATH-1));
> -			break;
>  		case OPT_PRIORITY:
>  		case 'p':
>  			priority = atoi(optarg);
> @@ -774,12 +774,12 @@ int main(int argc, char *argv[])
>  		}
>  	}
>  
> -	if (strlen(outfile) != 0) {
> +	if (strlen(jsonfile) != 0) {
>  		struct params_stats ps = {
>  			.receiver = receiver,
>  			.sender = sender,
>  		};
> -		rt_write_json(outfile, 0, write_stats, &ps);
> +		rt_write_json(jsonfile, 0, write_stats, &ps);
>  	}
>  
>  nosem:
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 22/23] ssdd: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 22/23] ssdd: " Daniel Wagner
@ 2021-05-22  3:52   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:52 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/ssdd/ssdd.8 | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/ssdd/ssdd.8 b/src/ssdd/ssdd.8
> index 5c29d0abb732..a3b9d790dec4 100644
> --- a/src/ssdd/ssdd.8
> +++ b/src/ssdd/ssdd.8
> @@ -3,7 +3,7 @@
>  ssdd \- have a tracer do a bunch of PTRACE_SINGLESTEPs
>  .SH SYNOPSIS
>  .LP
> -ssdd [-f|--forks NUM] [-h|--help] [-i|--iters NUM]
> +ssdd [-f|--forks NUM] [-h|--help] [-i|--iters NUM] [--json FILENAME]
>  .SH DESCRIPTION
>  Have a tracer do a bunch of PTRACE_SINGLESTEPs against a tracee as
>  fast as possible. Create several of these tracer/tracee pairs and
> @@ -25,6 +25,9 @@ number of PTRACE_SINGLESTEP iterations to do before declaring
>  success, for each tracer tracee pair set up.
>  .br
>  Default is 10,000.
> +.TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
>  .SH AUTHOR
>  ssdd was written by Joe Korty <joe.korty@concurrent-rt.com>
>  .PP
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: [PATCH rt-tests v1 23/23] svematest: Add --json to man page
  2021-05-19 17:09 ` [PATCH rt-tests v1 23/23] svematest: " Daniel Wagner
@ 2021-05-22  3:54   ` John Kacur
  0 siblings, 0 replies; 47+ messages in thread
From: John Kacur @ 2021-05-22  3:54 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: Clark Williams, linux-rt-users



On Wed, 19 May 2021, Daniel Wagner wrote:

> Add the newly introduced --json command line to the man page.
> 
> Signed-off-by: Daniel Wagner <dwagner@suse.de>
> ---
>  src/svsematest/svsematest.8 | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/svsematest/svsematest.8 b/src/svsematest/svsematest.8
> index 828f9154e974..93abf55f3d4d 100644
> --- a/src/svsematest/svsematest.8
> +++ b/src/svsematest/svsematest.8
> @@ -4,7 +4,7 @@
>  \fBsvsematest\fR \- Start two threads or fork two processes and measure the latency of SYSV semaphores
>  .SH "SYNTAX"
>  .LP
> -svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]]
> +svsematest [-a|--affinity NUM] [-b|--breaktrace USEC] [-d|--distance DIST] [-D|--duration TIME] [-f|--fork [OPT]] [-i|--interval INTV] [--json FILENAME] [-l|--loops LOOPS] [-p|--prio PRIO] [-q|--quiet] [-S|--smp] [-t|--threads [NUM]]
>  .br
>  .SH "DESCRIPTION"
>  .LP
> @@ -32,6 +32,9 @@ Instead of creating threads (which is the default), fork new processes
>  .B \-i, \-\-interval=INTV
>  Set the base interval of the thread(s) in microseconds (default is 1000 us). This sets the interval of the first thread. See also -d.
>  .TP
> +.B \-\-json=FILENAME
> +Write final results into FILENAME, JSON formatted.
> +.TP
>  .B \-l, \-\-loops=LOOPS
>  Set the number of loops. The default is 0 (endless). This option is useful for automated tests with a given number of test cycles. svsematest is stopped once the number of timer intervals has been reached.
>  .TP
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2021-05-22  3:54 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH rt-tests v1 04/23] pi_stress: " Daniel Wagner
2021-05-21 21:39   ` 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

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.