From: John Kacur <jkacur@redhat.com>
To: rt-users <linux-rt-users@vger.kernel.org>
Cc: Clark Williams <williams@redhat.com>, John Kacur <jkacur@redhat.com>
Subject: [PATCH 4/6] rt-tests: cyclictest: Fix parsing affinity with leading exclamation mark
Date: Mon, 2 Mar 2020 16:44:28 -0500 [thread overview]
Message-ID: <20200302214430.15825-5-jkacur@redhat.com> (raw)
In-Reply-To: <20200302214430.15825-1-jkacur@redhat.com>
The case in which the user specifies the affinity with a space and a
leading exclamation mark was not working. For example
./cyclictest -t -a'!4-5'
was working correctly, but the following was not.
./cyclictest -t -a '!4-5'
Fix this by recognizing this input as a non-error case.
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/cyclictest/cyclictest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 1d2962fda777..18c383689dc2 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1199,7 +1199,7 @@ static void process_options (int argc, char *argv[], int max_cpus)
if (optarg != NULL) {
parse_cpumask(optarg, max_cpus);
setaffinity = AFFINITY_SPECIFIED;
- } else if (optind<argc && (atoi(argv[optind]) || argv[optind][0] == '0')) {
+ } else if (optind<argc && (atoi(argv[optind]) || argv[optind][0] == '0' || argv[optind][0] == '!')) {
parse_cpumask(argv[optind], max_cpus);
setaffinity = AFFINITY_SPECIFIED;
} else {
--
2.20.1
next prev parent reply other threads:[~2020-03-02 21:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-02 21:44 [PATCH 0/6] Affinity devel and fixes John Kacur
2020-03-02 21:44 ` [PATCH 1/6] rt-tests: cyclictest: Set errno to 0 before call to mlock John Kacur
2020-03-02 21:44 ` [PATCH 2/6] rt-tests: cyclictest: Report all errors from pthread_setaffinity_np John Kacur
2020-03-02 21:44 ` [PATCH 3/6] rt-tests: cyclictest: Fix parsing affinity with a space and a leading zero John Kacur
2020-03-02 21:44 ` John Kacur [this message]
2020-03-02 21:44 ` [PATCH 5/6] rt-tests: cyclictest: Only run on available cpus according to the affinity John Kacur
2020-03-02 21:44 ` [PATCH 6/6] rt-tests: cyclictest: Only run on runtime affinity and user supplied affinity John Kacur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200302214430.15825-5-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).