Title: [255075] trunk/Tools
Revision
255075
Author
[email protected]
Date
2020-01-24 09:18:30 -0800 (Fri, 24 Jan 2020)

Log Message

run-webkit-tests: Handle case where device socket make handle invalid
https://bugs.webkit.org/show_bug.cgi?id=206707

Reviewed by Stephanie Lewis.

* Scripts/webkitpy/port/simulator_process.py:
(SimulatorProcess.NonBlockingFileFromSocket.close): Catch IOError when closing file.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (255074 => 255075)


--- trunk/Tools/ChangeLog	2020-01-24 16:42:26 UTC (rev 255074)
+++ trunk/Tools/ChangeLog	2020-01-24 17:18:30 UTC (rev 255075)
@@ -1,3 +1,13 @@
+2020-01-24  Jonathan Bedard  <[email protected]>
+
+        run-webkit-tests: Handle case where device socket make handle invalid
+        https://bugs.webkit.org/show_bug.cgi?id=206707
+
+        Reviewed by Stephanie Lewis.
+
+        * Scripts/webkitpy/port/simulator_process.py:
+        (SimulatorProcess.NonBlockingFileFromSocket.close): Catch IOError when closing file.
+
 2020-01-24  Carlos Alberto Lopez Perez  <[email protected]>
 
         [GTK] API test runner fails with error: too many open files.

Modified: trunk/Tools/Scripts/webkitpy/port/simulator_process.py (255074 => 255075)


--- trunk/Tools/Scripts/webkitpy/port/simulator_process.py	2020-01-24 16:42:26 UTC (rev 255074)
+++ trunk/Tools/Scripts/webkitpy/port/simulator_process.py	2020-01-24 17:18:30 UTC (rev 255075)
@@ -67,11 +67,15 @@
             return getattr(self._file, name)
 
         def close(self):
-            result = self._file.close()
-            # Closing the file implicitly closes the socket in Python 3
-            if sys.version_info < (3, 0):
-                self.socket.close()
-            return result
+            try:
+                result = self._file.close()
+                # Closing the file implicitly closes the socket in Python 3
+                if sys.version_info < (3, 0):
+                    self.socket.close()
+                return result
+            except IOError:
+                # If the file descriptor is bad, we don't have to worry about closing it
+                pass
 
     def __init__(self, port_obj, name, cmd, env=None, universal_newlines=False, treat_no_data_as_crash=False, target_host=None, crash_message=None):
         env['PORT'] = str(target_host.listening_port())  # The target_host should be a device.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to