[libc-commits] [libc] a858e25 - [libc][NFC] Create file with all permissions for the user in read_write_test.

Siva Chandra Reddy via libc-commits libc-commits at lists.llvm.org
Fri Jan 28 08:42:57 PST 2022


Author: Siva Chandra Reddy
Date: 2022-01-28T16:41:52Z
New Revision: a858e25f1cf384af9f7350b92594467321070cf1

URL: https://github.com/llvm/llvm-project/commit/a858e25f1cf384af9f7350b92594467321070cf1
DIFF: https://github.com/llvm/llvm-project/commit/a858e25f1cf384af9f7350b92594467321070cf1.diff

LOG: [libc][NFC] Create file with all permissions for the user in read_write_test.

Added: 
    

Modified: 
    libc/test/src/unistd/read_write_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/src/unistd/read_write_test.cpp b/libc/test/src/unistd/read_write_test.cpp
index 6b86cd1560ab..2113d8ceeac2 100644
--- a/libc/test/src/unistd/read_write_test.cpp
+++ b/libc/test/src/unistd/read_write_test.cpp
@@ -20,7 +20,7 @@
 TEST(LlvmLibcUniStd, WriteAndReadBackTest) {
   using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds;
   constexpr const char *TEST_FILE = "__unistd_read_write.test";
-  int write_fd = __llvm_libc::open(TEST_FILE, O_WRONLY | O_CREAT);
+  int write_fd = __llvm_libc::open(TEST_FILE, O_WRONLY | O_CREAT, S_IRWXU);
   ASSERT_EQ(errno, 0);
   ASSERT_GT(write_fd, 0);
   constexpr const char HELLO[] = "hello";


        


More information about the libc-commits mailing list