diff options
| author | Michael Jones <michaelrj@google.com> | 2023-03-02 14:01:41 -0800 |
|---|---|---|
| committer | Michael Jones <michaelrj@google.com> | 2023-03-03 11:15:36 -0800 |
| commit | 04a9c62554cf74b06bd1f7af94eefd5a0a19590d (patch) | |
| tree | 31c072d5c6741bf98f423b734e8ee7b1190bd215 /libc/test/src/stdio/remove_test.cpp | |
| parent | 56e8fd6f6a841d51b0dd52bfd646403e328fbe34 (diff) | |
[libc] move stdlib and stdio to new errno pattern
Fixes https://github.com/llvm/llvm-project/issues/61071
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D145191
Diffstat (limited to 'libc/test/src/stdio/remove_test.cpp')
| -rw-r--r-- | libc/test/src/stdio/remove_test.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/test/src/stdio/remove_test.cpp b/libc/test/src/stdio/remove_test.cpp index 4295046b0df2..b6e8b6405826 100644 --- a/libc/test/src/stdio/remove_test.cpp +++ b/libc/test/src/stdio/remove_test.cpp @@ -15,18 +15,18 @@ #include "test/UnitTest/Test.h" #include "utils/testutils/FDReader.h" -#include <errno.h> +#include "src/errno/libc_errno.h" #include <unistd.h> TEST(LlvmLibcRemoveTest, CreateAndRemoveFile) { // The test strategy is to create a file and remove it, and also verify that // it was removed. - errno = 0; + libc_errno = 0; using __llvm_libc::testing::ErrnoSetterMatcher::Fails; using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds; constexpr const char *TEST_FILE = "testdata/remove.test.file"; int fd = __llvm_libc::open(TEST_FILE, O_WRONLY | O_CREAT, S_IRWXU); - ASSERT_EQ(errno, 0); + ASSERT_EQ(libc_errno, 0); ASSERT_GT(fd, 0); ASSERT_THAT(__llvm_libc::close(fd), Succeeds(0)); @@ -38,7 +38,7 @@ TEST(LlvmLibcRemoveTest, CreateAndRemoveFile) { TEST(LlvmLibcRemoveTest, CreateAndRemoveDir) { // The test strategy is to create a dir and remove it, and also verify that // it was removed. - errno = 0; + libc_errno = 0; using __llvm_libc::testing::ErrnoSetterMatcher::Fails; using __llvm_libc::testing::ErrnoSetterMatcher::Succeeds; constexpr const char *TEST_DIR = "testdata/remove.test.dir"; |
