[lldb] [test] Fix TestGdbRemotePlatformFile with non-022 umask
authorMichał Górny <mgorny@moritz.systems>
Mon, 9 Aug 2021 12:11:32 +0000 (14:11 +0200)
committerMichał Górny <mgorny@moritz.systems>
Mon, 9 Aug 2021 12:12:06 +0000 (14:12 +0200)
lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py

index 5c8f5ba..8b6bb11 100644 (file)
@@ -102,7 +102,11 @@ class TestGdbRemotePlatformFile(GdbRemoteTestCaseBase):
         if excl:
             mode |= 0x800
 
-        server = self.connect_to_debug_monitor()
+        old_umask = os.umask(0o22)
+        try:
+            server = self.connect_to_debug_monitor()
+        finally:
+            os.umask(old_umask)
         self.assertIsNotNone(server)
 
         # create a temporary file with some data