Do not swallow stdout from storlet daemons
Change-Id: If93917303ca993dba6762cbe2310b09c2919da1d Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -132,10 +132,10 @@ class StorletDaemonFactory(SBusServer):
|
||||
|
||||
try:
|
||||
daemon_p = subprocess.Popen(
|
||||
pargs, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE,
|
||||
pargs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||
close_fds=True, shell=False, env=env)
|
||||
logger_p = subprocess.Popen(
|
||||
'logger', stdin=daemon_p.stderr,
|
||||
'logger', stdin=daemon_p.stdout,
|
||||
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
|
||||
close_fds=True, shell=False)
|
||||
except OSError:
|
||||
|
@@ -115,6 +115,7 @@ class TestStorletDaemonFactory(unittest.TestCase):
|
||||
def __init__(self, pid):
|
||||
self.pid = pid
|
||||
self.stderr = mock.MagicMock()
|
||||
self.stdout = mock.MagicMock()
|
||||
|
||||
with mock.patch(self.os_path_isfile_path) as isfile, \
|
||||
mock.patch(self.os_access_path) as access, \
|
||||
@@ -253,6 +254,7 @@ class TestStorletDaemonFactory(unittest.TestCase):
|
||||
def __init__(self, pid):
|
||||
self.pid = pid
|
||||
self.stderr = mock.MagicMock()
|
||||
self.stdout = mock.MagicMock()
|
||||
|
||||
with mock.patch(self.os_path_isfile_path) as isfile, \
|
||||
mock.patch(self.os_access_path) as access, \
|
||||
@@ -559,6 +561,7 @@ class TestStorletDaemonFactory(unittest.TestCase):
|
||||
def __init__(self, pid):
|
||||
self.pid = pid
|
||||
self.stderr = mock.MagicMock()
|
||||
self.stdout = mock.MagicMock()
|
||||
|
||||
with mock.patch(self.os_path_isfile_path) as isfile, \
|
||||
mock.patch(self.os_access_path) as access, \
|
||||
|
Reference in New Issue
Block a user