These are changes to improve affinity on cyclictest There are some fixes to the parsing of -a CPUSET that occurred in a few exceptional instances. Also, cyclictest was written as if it owned the whole machine. So before these changes we would run on all cpus or on the CPUSET that the user passed with the command line option even if those cpus were not in the CPUSET from the affinity in the runtime environment. These changes here fix that. For example, Before the changes taskset 4-7 cyclictest -t -a 1-6 the taskset 4-7 would only apply to the main cyclictest thread, and then the 1-6 would only apply to every newly created thread. After the changes taskset 4-7 cyclictest -t -a 1-6 Now, 4-7 still applies to the main thread, but all newly created threads run on the interesection of the cpus 4-7 and 1-6, in other words on 4,5 and 6 In addition if the user doesn't pass and affinity with the command line option, the runtime environment is respected. For example Before taskset 0-4 cyclictest -t Only the main cyclictest thread would run on cpus 0-4 and the other threads could run on any cpu After taskset 0-4 cyclictest -t All cyclictest threads run on 0-4 John Kacur (6): rt-tests: cyclictest: Set errno to 0 before call to mlock rt-tests: cyclictest: Report all errors from pthread_setaffinity_np rt-tests: cyclictest: Fix parsing affinity with a space and a leading zero rt-tests: cyclictest: Fix parsing affinity with leading exclamation mark rt-tests: cyclictest: Only run on available cpus according to the affinity rt-tests: cyclictest: Only run on runtime affinity and user supplied affinity src/cyclictest/cyclictest.c | 78 +++++++++++++++++++++++++++++++++---- 1 file changed, 71 insertions(+), 7 deletions(-) -- 2.20.1