[libc-commits] [libc] [libc] fix unit tests (PR #75361)

via libc-commits libc-commits at lists.llvm.org
Wed Dec 13 09:20:25 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

<details>
<summary>Changes</summary>

Fixes #<!-- -->75261


---
Full diff: https://github.com/llvm/llvm-project/pull/75361.diff


2 Files Affected:

- (modified) libc/test/src/fcntl/creat_test.cpp (+2) 
- (modified) libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp (+1) 


``````````diff
diff --git a/libc/test/src/fcntl/creat_test.cpp b/libc/test/src/fcntl/creat_test.cpp
index ca926b30e62faf..ef30d8862c45f2 100644
--- a/libc/test/src/fcntl/creat_test.cpp
+++ b/libc/test/src/fcntl/creat_test.cpp
@@ -13,6 +13,8 @@
 #include "test/UnitTest/ErrnoSetterMatcher.h"
 #include "test/UnitTest/Test.h"
 
+#include <sys/stat.h>
+
 TEST(LlvmLibcCreatTest, CreatAndOpen) {
   using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
   constexpr const char *TEST_FILE = "testdata/creat.test";
diff --git a/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp b/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp
index 7e6bb0aaca9251..0870deeeb5d801 100644
--- a/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp
+++ b/libc/test/src/sys/resource/getrlimit_setrlimit_test.cpp
@@ -17,6 +17,7 @@
 #include "test/UnitTest/Test.h"
 
 #include <sys/resource.h>
+#include <sys/stat.h>
 
 TEST(LlvmLibcResourceLimitsTest, SetNoFileLimit) {
   using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;

``````````

</details>


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


More information about the libc-commits mailing list