Skip to content

[rtsan][compiler-rt] Disable file permissions test causing build failure #106079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

cjappl
Copy link
Contributor

@cjappl cjappl commented Aug 26, 2024

Related to: ca95bee, #105732

@llvmbot
Copy link
Member

llvmbot commented Aug 26, 2024

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Chris Apple (cjappl)

Changes

Related to: ca95bee, #105732


Full diff: https://github.com/llvm/llvm-project/pull/106079.diff

1 Files Affected:

  • (modified) compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp (+19-13)
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); };

@cjappl cjappl merged commit 11ba2ee into llvm:main Aug 26, 2024
7 of 8 checks passed
@cjappl cjappl deleted the revert-flakey-test branch August 26, 2024 14:15
cjappl added a commit to cjappl/llvm-project that referenced this pull request Aug 26, 2024
cjappl added a commit to cjappl/llvm-project that referenced this pull request Aug 26, 2024
cjappl added a commit to cjappl/llvm-project that referenced this pull request Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants