@@ -184,25 +184,19 @@ TEST_F(RtsanFileTest, OpenatDiesWhenRealtime) {
184184 ExpectNonRealtimeSurvival (func);
185185}
186186
187- // FIXME: This fails on the build machines, but not locally!
188- // see https://github.com/llvm/llvm-project/pull/105732#issuecomment-2310286530
189- // Value of: st.st_mode & 0777
190- // Expected: is equal to 420
191- // Actual: 384
192- // TEST_F(RtsanFileTest, OpenCreatesFileWithProperMode) {
193- // const int mode = S_IRGRP | S_IROTH | S_IRUSR | S_IWUSR;
194- //
195- // const int fd = open(GetTemporaryFilePath(), O_CREAT | O_WRONLY, mode);
196- // ASSERT_THAT(fd, Ne(-1));
197- // close(fd);
198- //
199- // struct stat st;
200- // ASSERT_THAT(stat(GetTemporaryFilePath(), &st), Eq(0));
201- //
202- // // Mask st_mode to get permission bits only
203- //
204- // //ASSERT_THAT(st.st_mode & 0777, Eq(mode)); FAILED ASSERTION
205- // }
187+ TEST_F (RtsanFileTest, OpenCreatesFileWithProperMode) {
188+ const int mode = S_IRGRP | S_IROTH | S_IRUSR | S_IWUSR;
189+
190+ const int fd = open (GetTemporaryFilePath (), O_CREAT | O_WRONLY, mode);
191+ ASSERT_THAT (fd, Ne (-1 ));
192+ close (fd);
193+
194+ struct stat st;
195+ ASSERT_THAT (stat (GetTemporaryFilePath (), &st), Eq (0 ));
196+
197+ // Mask st_mode to get permission bits only
198+ ASSERT_THAT (st.st_mode & 0777 , Eq (mode));
199+ }
206200
207201TEST_F (RtsanFileTest, CreatDiesWhenRealtime) {
208202 auto func = [this ]() { creat (GetTemporaryFilePath (), S_IWOTH | S_IROTH); };
0 commit comments