Thread (22 messages) 22 messages, 3 authors, 2021-02-17
STALE1928d

[PATCH rt-tests v4 02/16] cyclictest: Mimic --smp behavior with --affinity

From: Daniel Wagner <hidden>
Date: 2021-02-10 13:36:00
Subsystem: the rest · Maintainer: Linus Torvalds

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.

Signed-off-by: Daniel Wagner <redacted>
---
 src/cyclictest/cyclictest.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 6009ff2a83bc..4c02f067fbad 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -1019,6 +1019,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;
 			}
 			break;
 		case 'A':
-- 
2.30.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help