Skip to content

[libc] fix unit tests #75361

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 13, 2023
Merged

[libc] fix unit tests #75361

merged 5 commits into from
Dec 13, 2023

Conversation

nickdesaulniers
Copy link
Member

Fixes #75261

@llvmbot
Copy link
Member

llvmbot commented Dec 13, 2023

@llvm/pr-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

Changes

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 --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;

@nickdesaulniers nickdesaulniers marked this pull request as draft December 13, 2023 17:23
Copy link

github-actions bot commented Dec 13, 2023

:white_check_mark: With the latest revision this PR passed the C/C++ code formatter.

@nickdesaulniers nickdesaulniers marked this pull request as ready for review December 13, 2023 17:30
@nickdesaulniers nickdesaulniers merged commit c0ad6e2 into llvm:main Dec 13, 2023
@nickdesaulniers nickdesaulniers deleted the fix_test branch December 13, 2023 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants