diff mbox series

[rteval] rteval: stressng.py: Fix --taskset argument on multi node systems

Message ID 20210914.224434.2229368055920483816.atsushi.nemoto@sord.co.jp
State New
Headers show
Series [rteval] rteval: stressng.py: Fix --taskset argument on multi node systems | expand

Commit Message

Atsushi Nemoto Sept. 14, 2021, 1:44 p.m. UTC
Without this fix, multiple '--taskset xxx' options are passed to
the stress-ng.

Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
---
 rteval/modules/loads/stressng.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
index 926de38..f677956 100644
--- a/rteval/modules/loads/stressng.py
+++ b/rteval/modules/loads/stressng.py
@@ -72,9 +72,8 @@  class Stressng(CommandLineLoad):
                 nodes.remove(node)
                 self._log(Log.DEBUG, "node %s has no available cpus, removing" % node)
         if self.cpulist:
-            for node in nodes:
-                cpulist = ",".join([str(n) for n in cpus[node]])
-                self.args.append('--taskset %s' % cpulist)
+            cpulist = ",".join([str(n) for node in nodes for n in cpus[node]])
+            self.args.extend(['--taskset', cpulist])
 
     def _WorkloadTask(self):
         """ Kick of the workload here """