[libc-commits] [libc] [libc] implement mkstemp (PR #199220)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Fri May 22 12:17:34 PDT 2026
================
@@ -0,0 +1,141 @@
+//===-- Unittests for mkstemp ---------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "hdr/errno_macros.h"
+#include "hdr/fcntl_macros.h"
+#include "hdr/signal_macros.h"
+#include "src/stdlib/mkstemp.h"
+#include "src/unistd/access.h"
+#include "src/unistd/close.h"
+#include "src/unistd/read.h"
+#include "src/unistd/unlink.h"
+#include "src/unistd/write.h"
+#include "test/UnitTest/ErrnoCheckingTest.h"
+#include "test/UnitTest/Test.h"
+
+TEST(LlvmLibcMkstempTest, ValidTemplate) {
----------------
michaelrj-google wrote:
these tests should use `ErrnoCheckingTest`, see `mmap_test.cpp` for an example.
https://github.com/llvm/llvm-project/pull/199220
More information about the libc-commits
mailing list