[Lldb-commits] [lldb] d6bf9dc - [lldb] [test] Fix TestGdbRemotePlatformFile with non-022 umask

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 9 05:12:26 PDT 2021


Author: Michał Górny
Date: 2021-08-09T14:12:06+02:00
New Revision: d6bf9dcbd5d4b198ed55c311be27fee927d8721c

URL: https://github.com/llvm/llvm-project/commit/d6bf9dcbd5d4b198ed55c311be27fee927d8721c
DIFF: https://github.com/llvm/llvm-project/commit/d6bf9dcbd5d4b198ed55c311be27fee927d8721c.diff

LOG: [lldb] [test] Fix TestGdbRemotePlatformFile with non-022 umask

Added: 
    

Modified: 
    lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py b/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
index 5c8f5ba4ef9d..8b6bb112aa5f 100644
--- a/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
+++ b/lldb/test/API/tools/lldb-server/TestGdbRemotePlatformFile.py
@@ -102,7 +102,11 @@ def vFile_test(self, read=False, write=False, append=False, trunc=False,
         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


        


More information about the lldb-commits mailing list