@@ -193,25 +193,19 @@ TEST_F(RtsanFileTest, OpenatDiesWhenRealtime) {
193
193
ExpectNonRealtimeSurvival (func);
194
194
}
195
195
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
+ }
215
209
216
210
TEST_F (RtsanFileTest, CreatDiesWhenRealtime) {
217
211
auto func = [this ]() { creat (GetTemporaryFilePath (), S_IWOTH | S_IROTH); };
0 commit comments