diff mbox series

[rt-tests,v2,v2,04/20] cyclictest: Mimik --smp behavior with --affinity

Message ID 20201218161843.1764-5-dwagner@suse.de
State Superseded
Headers show
Series [rt-tests,v2,v2,01/20] cyclictest: Always use libnuma | expand

Commit Message

Daniel Wagner Dec. 18, 2020, 4:18 p.m. UTC
Let --affinity without an argument behave in the same way as
--smp. Run a thread on each CPU. This makes cyclictest behave as the
rest of the rt-tests when --affinity is used.

Reviewed-by: Daniel Wagner <dwagner@suse.de>
---
 src/cyclictest/cyclictest.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 3dafef4e7e5a..23243ddfe9d3 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1024,6 +1024,8 @@  static void process_options(int argc, char *argv[], int max_cpus)
 				    argv[optind][0] == '0' ||
 				    argv[optind][0] == '!')) {
 				parse_cpumask(argv[optind], max_cpus, &affinity_mask);
+			} else {
+				num_threads = -1;
 			}
 
 			if (verbose)