linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [rteval PATCH] rteval: stressng.py: Fix arguments for Popen
@ 2021-08-06  8:46 Atsushi Nemoto
  2021-09-14  4:45 ` Atsushi Nemoto
  0 siblings, 1 reply; 5+ messages in thread
From: Atsushi Nemoto @ 2021-08-06  8:46 UTC (permalink / raw)
  To: linux-rt-users, John Kacur

Make each element of self.args contains only one argument.

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

diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
index 926de38..c259554 100644
--- a/rteval/modules/loads/stressng.py
+++ b/rteval/modules/loads/stressng.py
@@ -50,9 +50,9 @@ class Stressng(CommandLineLoad):
         self.args = ['stress-ng']
         self.args.append('--%s' % str(self.cfg.option))
         if self.cfg.arg is not None:
-            self.args.append(self.cfg.arg)
+            self.args.extend(self.cfg.arg.split())
         if self.cfg.timeout is not None:
-            self.args.append('--timeout %s' % str(self.cfg.timeout))
+            self.args.extend(['--timeout', str(self.cfg.timeout)])
 
         systop = SysTopology()
         # get the number of nodes
@@ -74,7 +74,7 @@ class Stressng(CommandLineLoad):
         if self.cpulist:
             for node in nodes:
                 cpulist = ",".join([str(n) for n in cpus[node]])
-                self.args.append('--taskset %s' % cpulist)
+                self.args.extend(['--taskset', cpulist])
 
     def _WorkloadTask(self):
         """ Kick of the workload here """
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [rteval PATCH] rteval: stressng.py: Fix arguments for Popen
  2021-08-06  8:46 [rteval PATCH] rteval: stressng.py: Fix arguments for Popen Atsushi Nemoto
@ 2021-09-14  4:45 ` Atsushi Nemoto
  2021-09-14 12:51   ` John Kacur
  0 siblings, 1 reply; 5+ messages in thread
From: Atsushi Nemoto @ 2021-09-14  4:45 UTC (permalink / raw)
  To: linux-rt-users, jkacur

On Fri, 06 Aug 2021 17:46:41 +0900 (JST), Atsushi Nemoto <atsushi.nemoto@sord.co.jp> wrote:
> Make each element of self.args contains only one argument.
> 
> Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
> ---
>  rteval/modules/loads/stressng.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
> index 926de38..c259554 100644
> --- a/rteval/modules/loads/stressng.py
> +++ b/rteval/modules/loads/stressng.py
> @@ -50,9 +50,9 @@ class Stressng(CommandLineLoad):
>          self.args = ['stress-ng']
>          self.args.append('--%s' % str(self.cfg.option))
>          if self.cfg.arg is not None:
> -            self.args.append(self.cfg.arg)
> +            self.args.extend(self.cfg.arg.split())
>          if self.cfg.timeout is not None:
> -            self.args.append('--timeout %s' % str(self.cfg.timeout))
> +            self.args.extend(['--timeout', str(self.cfg.timeout)])
>  
>          systop = SysTopology()
>          # get the number of nodes
> @@ -74,7 +74,7 @@ class Stressng(CommandLineLoad):
>          if self.cpulist:
>              for node in nodes:
>                  cpulist = ",".join([str(n) for n in cpus[node]])
> -                self.args.append('--taskset %s' % cpulist)
> +                self.args.extend(['--taskset', cpulist])
>  
>      def _WorkloadTask(self):
>          """ Kick of the workload here """
> -- 
> 2.11.0

Any comments?

There is an another problem in '--taskset' handling (do not work as
expected on multi-node system) so I want to create a patch on top of
this fix.

---
Atsushi Nemoto

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rteval PATCH] rteval: stressng.py: Fix arguments for Popen
  2021-09-14  4:45 ` Atsushi Nemoto
@ 2021-09-14 12:51   ` John Kacur
  2021-09-14 13:42     ` Atsushi Nemoto
  0 siblings, 1 reply; 5+ messages in thread
From: John Kacur @ 2021-09-14 12:51 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-rt-users



On Tue, 14 Sep 2021, Atsushi Nemoto wrote:

> On Fri, 06 Aug 2021 17:46:41 +0900 (JST), Atsushi Nemoto <atsushi.nemoto@sord.co.jp> wrote:
> > Make each element of self.args contains only one argument.
> > 
> > Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
> > ---
> >  rteval/modules/loads/stressng.py | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
> > index 926de38..c259554 100644
> > --- a/rteval/modules/loads/stressng.py
> > +++ b/rteval/modules/loads/stressng.py
> > @@ -50,9 +50,9 @@ class Stressng(CommandLineLoad):
> >          self.args = ['stress-ng']
> >          self.args.append('--%s' % str(self.cfg.option))
> >          if self.cfg.arg is not None:
> > -            self.args.append(self.cfg.arg)
> > +            self.args.extend(self.cfg.arg.split())
> >          if self.cfg.timeout is not None:
> > -            self.args.append('--timeout %s' % str(self.cfg.timeout))
> > +            self.args.extend(['--timeout', str(self.cfg.timeout)])
> >  
> >          systop = SysTopology()
> >          # get the number of nodes
> > @@ -74,7 +74,7 @@ class Stressng(CommandLineLoad):
> >          if self.cpulist:
> >              for node in nodes:
> >                  cpulist = ",".join([str(n) for n in cpus[node]])
> > -                self.args.append('--taskset %s' % cpulist)
> > +                self.args.extend(['--taskset', cpulist])
> >  
> >      def _WorkloadTask(self):
> >          """ Kick of the workload here """
> > -- 
> > 2.11.0
> 
> Any comments?
> 
> There is an another problem in '--taskset' handling (do not work as
> expected on multi-node system) so I want to create a patch on top of
> this fix.
> 
> ---
> Atsushi Nemoto
> 

You haven't convinced me to apply the first patch - yet anyway, so you can 
decide yourself whether to create a version 2 that incorporates your new 
idea or whether they belong in to separate commits.

Thanks

John


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rteval PATCH] rteval: stressng.py: Fix arguments for Popen
  2021-09-14 12:51   ` John Kacur
@ 2021-09-14 13:42     ` Atsushi Nemoto
  0 siblings, 0 replies; 5+ messages in thread
From: Atsushi Nemoto @ 2021-09-14 13:42 UTC (permalink / raw)
  To: jkacur; +Cc: linux-rt-users

On Tue, 14 Sep 2021 08:51:02 -0400 (EDT), John Kacur <jkacur@redhat.com> wrote:
> 
> 
> On Tue, 14 Sep 2021, Atsushi Nemoto wrote:
> 
>> On Fri, 06 Aug 2021 17:46:41 +0900 (JST), Atsushi Nemoto <atsushi.nemoto@sord.co.jp> wrote:
>> > Make each element of self.args contains only one argument.
>> > 
>> > Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
>> > ---
>> >  rteval/modules/loads/stressng.py | 6 +++---
>> >  1 file changed, 3 insertions(+), 3 deletions(-)
>> > 
>> > diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
>> > index 926de38..c259554 100644
>> > --- a/rteval/modules/loads/stressng.py
>> > +++ b/rteval/modules/loads/stressng.py
>> > @@ -50,9 +50,9 @@ class Stressng(CommandLineLoad):
>> >          self.args = ['stress-ng']
>> >          self.args.append('--%s' % str(self.cfg.option))
>> >          if self.cfg.arg is not None:
>> > -            self.args.append(self.cfg.arg)
>> > +            self.args.extend(self.cfg.arg.split())
>> >          if self.cfg.timeout is not None:
>> > -            self.args.append('--timeout %s' % str(self.cfg.timeout))
>> > +            self.args.extend(['--timeout', str(self.cfg.timeout)])
>> >  
>> >          systop = SysTopology()
>> >          # get the number of nodes
>> > @@ -74,7 +74,7 @@ class Stressng(CommandLineLoad):
>> >          if self.cpulist:
>> >              for node in nodes:
>> >                  cpulist = ",".join([str(n) for n in cpus[node]])
>> > -                self.args.append('--taskset %s' % cpulist)
>> > +                self.args.extend(['--taskset', cpulist])
>> >  
>> >      def _WorkloadTask(self):
>> >          """ Kick of the workload here """
>> > -- 
>> > 2.11.0
>> 
>> Any comments?
>> 
>> There is an another problem in '--taskset' handling (do not work as
>> expected on multi-node system) so I want to create a patch on top of
>> this fix.
>> 
>> ---
>> Atsushi Nemoto
>> 
> 
> You haven't convinced me to apply the first patch - yet anyway, so you can 
> decide yourself whether to create a version 2 that incorporates your new 
> idea or whether they belong in to separate commits.
> 
> Thanks
> 
> John

Thank you, I will send revised patches with a bit more detailed description.

---
Atsushi Nemoto

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [rteval PATCH] rteval: stressng.py: Fix arguments for Popen
@ 2021-09-14 13:45 Atsushi Nemoto
  0 siblings, 0 replies; 5+ messages in thread
From: Atsushi Nemoto @ 2021-09-14 13:45 UTC (permalink / raw)
  To: linux-rt-users, John Kacur

Make each element of self.args contains only one argument.
This makes '--stressng-timeout' option work as expected,
and makes '--stressng-arg' usable for multiple options:
i.e. '--stressng-arg="8 --memcpy-method=libc"'

Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
---
change from previous version: split out fix for --taskset, update commit log.
---
 rteval/modules/loads/stressng.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
index f677956..3edfed7 100644
--- a/rteval/modules/loads/stressng.py
+++ b/rteval/modules/loads/stressng.py
@@ -50,9 +50,9 @@ class Stressng(CommandLineLoad):
         self.args = ['stress-ng']
         self.args.append('--%s' % str(self.cfg.option))
         if self.cfg.arg is not None:
-            self.args.append(self.cfg.arg)
+            self.args.extend(self.cfg.arg.split())
         if self.cfg.timeout is not None:
-            self.args.append('--timeout %s' % str(self.cfg.timeout))
+            self.args.extend(['--timeout', str(self.cfg.timeout)])
 
         systop = SysTopology()
         # get the number of nodes
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-09-14 13:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-06  8:46 [rteval PATCH] rteval: stressng.py: Fix arguments for Popen Atsushi Nemoto
2021-09-14  4:45 ` Atsushi Nemoto
2021-09-14 12:51   ` John Kacur
2021-09-14 13:42     ` Atsushi Nemoto
2021-09-14 13:45 Atsushi Nemoto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).