From d98bf0ba5fb1191d48b2571a9be6c61ce214cd44 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Mon, 5 Mar 2018 14:33:19 +0100 Subject: tests: Fix reading the Xorg log The xorg log fd position will be after the written error, so re-open the log to read, and check for the expected error. --- tests/gsdtestcase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/gsdtestcase.py b/tests/gsdtestcase.py index 5c8d7350..389c53d7 100644 --- a/tests/gsdtestcase.py +++ b/tests/gsdtestcase.py @@ -208,7 +208,7 @@ class GSDTestCase(dbusmock.DBusTestCase): if klass.xorg.poll(): # ended prematurely try: - log = xorg_log_write.read() + log = open(xorg_log_write.name).read() except IOError: return -1 -- cgit v1.2.1