[compiler-rt] 11ba2ee - [rtsan][compiler-rt] Disable file permissions test causing build failure (#106079)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 26 07:15:10 PDT 2024


Author: Chris Apple
Date: 2024-08-26T07:15:07-07:00
New Revision: 11ba2eee59c6c7269b2dae27247048f828143274

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

LOG: [rtsan][compiler-rt] Disable file permissions test causing build failure (#106079)

Related to: ca95bee64972, #105732

Added: 
    

Modified: 
    compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp
index 47c07b3e47abd7..5b88cf64612942 100644
--- a/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp
+++ b/compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp
@@ -184,19 +184,25 @@ TEST_F(RtsanFileTest, OpenatDiesWhenRealtime) {
   ExpectNonRealtimeSurvival(func);
 }
 
-TEST_F(RtsanFileTest, OpenCreatesFileWithProperMode) {
-  const int mode = S_IRGRP | S_IROTH | S_IRUSR | S_IWUSR;
-
-  const int fd = open(GetTemporaryFilePath(), O_CREAT | O_WRONLY, mode);
-  ASSERT_THAT(fd, Ne(-1));
-  close(fd);
-
-  struct stat st;
-  ASSERT_THAT(stat(GetTemporaryFilePath(), &st), Eq(0));
-
-  // Mask st_mode to get permission bits only
-  ASSERT_THAT(st.st_mode & 0777, Eq(mode));
-}
+// FIXME: This fails on the build machines, but not locally!
+// see https://github.com/llvm/llvm-project/pull/105732#issuecomment-2310286530
+// Value of: st.st_mode & 0777
+// Expected: is equal to 420
+// Actual: 384
+// TEST_F(RtsanFileTest, OpenCreatesFileWithProperMode) {
+//   const int mode = S_IRGRP | S_IROTH | S_IRUSR | S_IWUSR;
+//
+//   const int fd = open(GetTemporaryFilePath(), O_CREAT | O_WRONLY, mode);
+//   ASSERT_THAT(fd, Ne(-1));
+//   close(fd);
+//
+//   struct stat st;
+//   ASSERT_THAT(stat(GetTemporaryFilePath(), &st), Eq(0));
+//
+//   // Mask st_mode to get permission bits only
+//
+//   //ASSERT_THAT(st.st_mode & 0777, Eq(mode)); FAILED ASSERTION
+// }
 
 TEST_F(RtsanFileTest, CreatDiesWhenRealtime) {
   auto func = [this]() { creat(GetTemporaryFilePath(), S_IWOTH | S_IROTH); };


        


More information about the llvm-commits mailing list