[libc-commits] [libc] [libc] Add 'x' and 'e' mode support to fopen() (PR #224207)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Thu Sep 17 09:53:30 PDT 2026


================
@@ -84,3 +86,33 @@ TEST_F(LlvmLibcStdioFdopenTest, InvalidMode) {
   LIBC_NAMESPACE::close(fd);
   ASSERT_ERRNO_SUCCESS();
 }
+
+TEST_F(LlvmLibcStdioFdopenTest, CloseOnExecPreservedWithoutModifier) {
+  using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
+  int fd = LIBC_NAMESPACE::open("/dev/null", O_WRONLY | O_CLOEXEC);
----------------
michaelrj-google wrote:

Filepaths in tests should be in a local directory and use `libc_make_test_file_path`. Here and below.

https://github.com/llvm/llvm-project/pull/224207


More information about the libc-commits mailing list