diff mbox series

[rteval] rteval: stressng.py: Fix argument passing to Popen

Message ID 20210728.201927.2141210326291227293.atsushi.nemoto@sord.co.jp
State New
Headers show
Series [rteval] rteval: stressng.py: Fix argument passing to Popen | expand

Commit Message

Atsushi Nemoto July 28, 2021, 11:19 a.m. UTC
The self.args is a list of strings which may contains spaces.
Use shell style and pass self.args as a joined string.

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

Patch

diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
index 926de38..927bee5 100644
--- a/rteval/modules/loads/stressng.py
+++ b/rteval/modules/loads/stressng.py
@@ -84,7 +84,7 @@  class Stressng(CommandLineLoad):
 
         self._log(Log.DEBUG, "starting with %s" % " ".join(self.args))
         try:
-            self.process = subprocess.Popen(self.args,
+            self.process = subprocess.Popen(" ".join(self.args), shell=True,
                                             stdout=self.__out,
                                             stderr=self.__err,
                                             stdin=self.__in)