Message ID | 20200302214430.15825-5-jkacur@redhat.com |
---|---|
State | New |
Headers | show |
Series | Affinity devel and fixes | expand |
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 {
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(-)