[libc-commits] [libc] [libc] Add getpwnam_r and getpwuid_r entrypoints (PR #220833)

Jeff Bailey via libc-commits libc-commits at lists.llvm.org
Thu Sep 3 14:58:50 PDT 2026


================
@@ -0,0 +1,68 @@
+//===----------------------------------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// Shared test utilities and fixtures for pwd tests.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_TEST_SRC_PWD_PWD_TEST_UTILS_H
+#define LLVM_LIBC_TEST_SRC_PWD_PWD_TEST_UTILS_H
+
+#include "hdr/types/size_t.h"
+#include "src/__support/File/file.h"
+#include "src/__support/macros/config.h"
+#include "src/pwd/pwd_utils.h"
+#include "src/stdio/remove.h"
+#include "src/string/string_utils.h"
+#include "test/UnitTest/ErrnoCheckingTest.h"
+#include "test/UnitTest/Test.h"
+
+namespace LIBC_NAMESPACE_DECL {
----------------
kaladron wrote:

I went with no namespace.   stdlib's QsortReentrantTest and math's AddTest, test fixtures are both defined in the global namespace and so are tests, so I think that's fine.

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


More information about the libc-commits mailing list