[Lldb-commits] [lldb] 3bc58fc - [lldb][test] Fix FileActionTest.cpp for Windows (#112657)

Muhammad Omair Javaid via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 31 02:39:03 PDT 2024


Author: Muhammad Omair Javaid
Date: 2024-10-31T14:37:32+05:00
New Revision: 3bc58fc7f79a9b0cbf931573cb257344bfeaca1e

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

LOG: [lldb][test] Fix FileActionTest.cpp for Windows (#112657)

Disable part of the test failing on windows. as O_NOCTTY and
O_RDONLY dont have same behavior on windows vs linux.

Added: 
    

Modified: 
    lldb/unittests/Host/FileActionTest.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/unittests/Host/FileActionTest.cpp b/lldb/unittests/Host/FileActionTest.cpp
index 56227cd587e5bb..ac067c4d3349b8 100644
--- a/lldb/unittests/Host/FileActionTest.cpp
+++ b/lldb/unittests/Host/FileActionTest.cpp
@@ -34,7 +34,9 @@ TEST(FileActionTest, OpenReadWrite) {
 TEST(FileActionTest, OpenReadOnly) {
   FileAction Action;
   Action.Open(49, FileSpec("/tmp_1"), /*read*/ true, /*write*/ false);
+#ifndef _WIN32
   EXPECT_TRUE(Action.GetActionArgument() & (O_NOCTTY | O_RDONLY));
+#endif
   EXPECT_FALSE(Action.GetActionArgument() & O_WRONLY);
 }
 


        


More information about the lldb-commits mailing list