From: John Kacur <jkacur@redhat.com>
To: RT <linux-rt-users@vger.kernel.org>
Cc: Clark Williams <williams@redhat.com>, John Kacur <jkacur@redhat.com>
Subject: [PATCH 7/9] rt-tests: ptsematest: Update man page and add -h option
Date: Thu, 23 Jan 2020 21:50:27 +0100 [thread overview]
Message-ID: <20200123205029.20176-8-jkacur@redhat.com> (raw)
In-Reply-To: <20200123205029.20176-1-jkacur@redhat.com>
- Update the man page with the -s or --smp option
- Reorder the program help to match the man page
- Make the -h option work correctly
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/ptsematest/ptsematest.8 | 3 +++
src/ptsematest/ptsematest.c | 10 ++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/ptsematest/ptsematest.8 b/src/ptsematest/ptsematest.8
index 4bb1434babf4..8f76bca4b6a8 100644
--- a/src/ptsematest/ptsematest.8
+++ b/src/ptsematest/ptsematest.8
@@ -35,6 +35,9 @@ Set the number of loops. The default is 0 (endless). This option is useful for a
.B \-p, \-\-prio=PRIO
Set the priority of the process.
.TP
+.B \-s, \-\-smp
+SMP testing: options -a -t and same priority
+.TP
.B \-t, \-\-threads[=NUM]
Set the number of test threads (default is 1, if this option is not given). If NUM is specified, create NUM test threads. If NUM is not specified, NUM is set to the number of available CPUs.
.SH "EXAMPLES"
diff --git a/src/ptsematest/ptsematest.c b/src/ptsematest/ptsematest.c
index 78fa444c5578..485c991ec173 100644
--- a/src/ptsematest/ptsematest.c
+++ b/src/ptsematest/ptsematest.c
@@ -154,10 +154,10 @@ static void display_help(void)
" with NUM pin all threads to the processor NUM\n"
"-b USEC --breaktrace=USEC send break trace command when latency > USEC\n"
"-d DIST --distance=DIST distance of thread intervals in us default=500\n"
- "-i INTV --interval=INTV base interval of thread in us default=1000\n"
- "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n"
"-D --duration=TIME specify a length for the test run.\n"
" Append 'm', 'h', or 'd' to specify minutes, hours or days.\n"
+ "-i INTV --interval=INTV base interval of thread in us default=1000\n"
+ "-l LOOPS --loops=LOOPS number of loops: default=0(endless)\n"
"-p PRIO --prio=PRIO priority\n"
"-S --smp SMP testing: options -a -t and same priority\n"
" of all threads\n"
@@ -202,7 +202,7 @@ static void process_options (int argc, char *argv[])
{"help", no_argument, NULL, '?'},
{NULL, 0, NULL, 0}
};
- int c = getopt_long (argc, argv, "a::b:d:i:l:D:p:St::",
+ int c = getopt_long (argc, argv, "a::b:d:i:l:D:p:St::h",
long_options, &option_index);
if (c == -1)
break;
@@ -245,6 +245,8 @@ static void process_options (int argc, char *argv[])
else
num_threads = max_cpus;
break;
+ case 'h':
+ display_help();
case '?': error = 1; break;
}
}
@@ -275,7 +277,7 @@ static void process_options (int argc, char *argv[])
sameprio = 1;
if (error)
- display_help ();
+ display_help();
}
--
2.20.1
next prev parent reply other threads:[~2020-01-23 20:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 20:50 [PATCH 0/9] rt-tests: Miscellaneous fixes John Kacur
2020-01-23 20:50 ` [PATCH 1/9] rt-tests: queuelat: Assume queuelat is in the path John Kacur
2020-01-23 20:50 ` [PATCH 2/9] rt-tests: cyclicdeadline: Add a simple manpage for cyclicdeadline John Kacur
2020-01-27 10:44 ` Kurt Kanzenbach
2020-01-27 17:40 ` John Kacur
2020-01-28 7:13 ` Kurt Kanzenbach
2020-01-23 20:50 ` [PATCH 3/9] rt-tests: pi_stress: Add short options to usage message John Kacur
2020-01-23 20:50 ` [PATCH 4/9] rt-tests: pi_stress: Sync man page with help John Kacur
2020-01-23 20:50 ` [PATCH 5/9] rt-tests: queuelat: get_cpuinfo_mhz.sh highest value John Kacur
2020-01-23 20:50 ` [PATCH 6/9] rt-tests: determine_maximum_mpps.sh: Fix quoting and other shell issue John Kacur
2020-01-23 20:50 ` John Kacur [this message]
2020-01-23 20:50 ` [PATCH 8/9] rt-tests: queuelat: Fixes to man page and display_help John Kacur
2020-01-23 20:50 ` [PATCH 9/9] rt-tests: svsematest: Display help with an error message for -h John Kacur
2020-01-27 21:44 ` [PATCH 0/9] rt-tests: Miscellaneous fixes Clark Williams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200123205029.20176-8-jkacur@redhat.com \
--to=jkacur@redhat.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=williams@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).