@@ -193,25 +193,19 @@ TEST_F(RtsanFileTest, OpenatDiesWhenRealtime) {
193193 ExpectNonRealtimeSurvival (func);
194194}
195195
196- // FIXME: This fails on the build machines, but not locally!
197- // see https://github.com/llvm/llvm-project/pull/105732#issuecomment-2310286530
198- // Value of: st.st_mode & 0777
199- // Expected: is equal to 420
200- // Actual: 384
201- // TEST_F(RtsanFileTest, OpenCreatesFileWithProperMode) {
202- // const int mode = S_IRGRP | S_IROTH | S_IRUSR | S_IWUSR;
203- //
204- // const int fd = open(GetTemporaryFilePath(), O_CREAT | O_WRONLY, mode);
205- // ASSERT_THAT(fd, Ne(-1));
206- // close(fd);
207- //
208- // struct stat st;
209- // ASSERT_THAT(stat(GetTemporaryFilePath(), &st), Eq(0));
210- //
211- // // Mask st_mode to get permission bits only
212- //
213- // //ASSERT_THAT(st.st_mode & 0777, Eq(mode)); FAILED ASSERTION
214- // }
196+ TEST_F (RtsanFileTest, OpenCreatesFileWithProperMode) {
197+ const int mode = S_IRGRP | S_IROTH | S_IRUSR | S_IWUSR;
198+
199+ const int fd = open (GetTemporaryFilePath (), O_CREAT | O_WRONLY, mode);
200+ ASSERT_THAT (fd, Ne (-1 ));
201+ close (fd);
202+
203+ struct stat st;
204+ ASSERT_THAT (stat (GetTemporaryFilePath (), &st), Eq (0 ));
205+
206+ // Mask st_mode to get permission bits only
207+ ASSERT_THAT (st.st_mode & 0777 , Eq (mode));
208+ }
215209
216210TEST_F (RtsanFileTest, CreatDiesWhenRealtime) {
217211 auto func = [this ]() { creat (GetTemporaryFilePath (), S_IWOTH | S_IROTH); };
0 commit comments