diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py index d012113cda6..d634acab236 100644 --- a/python/samba/tests/__init__.py +++ b/python/samba/tests/__init__.py @@ -326,20 +326,22 @@ class BlackboxTestCase(TestCaseInTempDir): stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) - retcode = p.wait() + stdoutdata, stderrdata = p.communicate() + retcode = p.returncode if retcode != expected: raise BlackboxProcessError(retcode, line, - p.stdout.read(), - p.stderr.read()) + stdoutdata, + stderrdata) def check_output(self, line): line = self._make_cmdline(line) p = subprocess.Popen(line, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, close_fds=True) - retcode = p.wait() + stdoutdata, stderrdata = p.communicate() + retcode = p.returncode if retcode: - raise BlackboxProcessError(retcode, line, p.stdout.read(), p.stderr.read()) - return p.stdout.read() + raise BlackboxProcessError(retcode, line, stdoutdata, stderrdata) + return stdoutdata def connect_samdb(samdb_url, lp=None, session_info=None, credentials=None, diff --git a/selftest/knownfail.d/python-tests b/selftest/knownfail.d/python-tests deleted file mode 100644 index 754fed5e41f..00000000000 --- a/selftest/knownfail.d/python-tests +++ /dev/null @@ -1 +0,0 @@ -^samba.tests.blackbox.check_output