Skip to content

Commit 905de5c

Browse files
[libc] Fix fprintf_test assuming specific errnos.
The patch llvm#166382 fixed most of these, but missed the fprintf_test ones.
1 parent 4209e41 commit 905de5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/test/src/stdio/fprintf_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ TEST(LlvmLibcFPrintfTest, WriteToFile) {
8383
written =
8484
LIBC_NAMESPACE::fprintf(file, "Writing to a read only file should fail.");
8585
EXPECT_LT(written, 0);
86-
ASSERT_ERRNO_EQ(EBADF);
86+
ASSERT_ERRNO_FAILURE();
8787

8888
ASSERT_EQ(printf_test::fclose(file), 0);
8989
}
@@ -100,7 +100,7 @@ TEST(LlvmLibcFPrintfTest, NullPtrCheck) {
100100
int ret =
101101
LIBC_NAMESPACE::fprintf(file, "hello %n", static_cast<int *>(nullptr));
102102
EXPECT_LT(ret, 0);
103-
ASSERT_ERRNO_EQ(EINVAL);
103+
ASSERT_ERRNO_FAILURE();
104104

105105
ASSERT_EQ(printf_test::fclose(file), 0);
106106
}

0 commit comments

Comments
 (0)