[gnome-settings-daemon/benzea/tests-output-checker-testing] XXX: shouldn't os.read() wake up on close()
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/benzea/tests-output-checker-testing] XXX: shouldn't os.read() wake up on close()
- Date: Mon, 15 Feb 2021 14:01:53 +0000 (UTC)
commit e3615a3fab32c374d9986db82c7221cca4224f39
Author: Benjamin Berg <bberg redhat com>
Date: Mon Feb 15 14:56:06 2021 +0100
XXX: shouldn't os.read() wake up on close()
tests/output_checker.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/tests/output_checker.py b/tests/output_checker.py
index 46042674..54b3aa70 100644
--- a/tests/output_checker.py
+++ b/tests/output_checker.py
@@ -50,6 +50,7 @@ class OutputChecker(object):
r = os.read(self._pipe_fd_r, 1024)
if not r:
return
+ os.write(self._output.fileno(), b"read %d\n" % len(r))
except OSError:
# We get a bad file descriptor error when the outside closes the FD
return
@@ -61,7 +62,7 @@ class OutputChecker(object):
self._lines_sem.release()
- #os.write(self._output.fileno(), r)
+ os.write(self._output.fileno(), r)
def check_line_re(self, needle_re, timeout=0, failmsg=None):
deadline = time.time() + timeout
@@ -145,9 +146,9 @@ class OutputChecker(object):
def force_close(self):
os.write(1, b"force closing pipe %d" % self._pipe_fd_r);
os.close(self._pipe_fd_r)
- os.write(1, b"pipe closed, waiting");
+ os.write(1, b"pipe closed, waiting\n");
self._thread.join()
- os.write(1, b"reader thread joined");
+ os.write(1, b"reader thread joined\n");
@property
def fd(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]