llvm.org GIT mirror llvm / 1425c3f
[Support] Fix add fs::getUmask() patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364622 91177308-0d34-0410-b5e6-96231b3b80d8 Alex Brachet 3 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
15331533 unsigned CurrentMask = fs::getUmask();
15341534 EXPECT_EQ(CurrentMask, 0022U)
15351535 << "getUmask() didn't return previously set umask()";
1536 EXPECT_EQ(::umask(OldMask), 0022) << "getUmask() may have changed umask()";
1536 EXPECT_EQ(::umask(OldMask), 0022U) << "getUmask() may have changed umask()";
15371537 #endif
15381538 }
15391539
15551555
15561556 ASSERT_NO_ERROR(fs::setPermissions(TempPath, AllRWE, /*RespectUmask=*/false));
15571557
1558 ErrorOr Perms = fs::getPermissions(TempPath);
1558 Perms = fs::getPermissions(TempPath);
15591559 ASSERT_TRUE(!!Perms);
15601560 EXPECT_EQ(Perms.get(), AllRWE) << "Should have ignored umask";
15611561