Skip to content

Conversation

@michaelrj-google
Copy link
Contributor

@michaelrj-google michaelrj-google commented Nov 5, 2025

The patch #166382 fixed most of these, but missed the fprintf_test ones.

@llvmbot llvmbot added the libc label Nov 5, 2025
The patch llvm#166382 fixed most of these, but missed the fprintf_test ones.
@llvmbot
Copy link
Member

llvmbot commented Nov 5, 2025

@llvm/pr-subscribers-libc

Author: Michael Jones (michaelrj-google)

Changes

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

1 Files Affected:

  • (modified) libc/test/src/stdio/fprintf_test.cpp (+2-2)
diff --git a/libc/test/src/stdio/fprintf_test.cpp b/libc/test/src/stdio/fprintf_test.cpp
index 1b35a09645939..2cea7f554ce38 100644
--- a/libc/test/src/stdio/fprintf_test.cpp
+++ b/libc/test/src/stdio/fprintf_test.cpp
@@ -83,7 +83,7 @@ TEST(LlvmLibcFPrintfTest, WriteToFile) {
   written =
       LIBC_NAMESPACE::fprintf(file, "Writing to a read only file should fail.");
   EXPECT_LT(written, 0);
-  ASSERT_ERRNO_EQ(EBADF);
+  ASSERT_ERRNO_FAILURE();
 
   ASSERT_EQ(printf_test::fclose(file), 0);
 }
@@ -100,7 +100,7 @@ TEST(LlvmLibcFPrintfTest, NullPtrCheck) {
   int ret =
       LIBC_NAMESPACE::fprintf(file, "hello %n", static_cast<int *>(nullptr));
   EXPECT_LT(ret, 0);
-  ASSERT_ERRNO_EQ(EINVAL);
+  ASSERT_ERRNO_FAILURE();
 
   ASSERT_EQ(printf_test::fclose(file), 0);
 }

@michaelrj-google michaelrj-google enabled auto-merge (squash) November 5, 2025 00:54
@michaelrj-google michaelrj-google merged commit 15b19c7 into llvm:main Nov 5, 2025
18 of 19 checks passed
@Kewen12
Copy link
Contributor

Kewen12 commented Nov 5, 2025

Hi, our buildbot still failed at fprintftest. Could you please fix it? Thanks!

bot: https://lab.llvm.org/buildbot/#/builders/10/builds/16691

FAILED: libc/test/src/stdio/libc.test.src.stdio.fprintf_test.hermetic.cmd /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-amdgcn-amd-amdhsa-bins/libc/test/src/stdio/libc.test.src.stdio.fprintf_test.hermetic.cmd
cd /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-amdgcn-amd-amdhsa-bins/libc/test/src/stdio && /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/bin/amdhsa-loader /home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.build/runtimes/runtimes-amdgcn-amd-amdhsa-bins/libc/test/src/stdio/libc.test.src.stdio.fprintf_test.hermetic.build
[==========] Running 2 tests from 1 test suite.
[ RUN ] LlvmLibcFPrintfTest.WriteToFile
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/src/stdio/fprintf_test.cpp:86: FAILURE
Expected: 0
Which is: 0
To be not equal to: static_cast(libc_errno)
Which is: 0
[ FAILED ] LlvmLibcFPrintfTest.WriteToFile
[ RUN ] LlvmLibcFPrintfTest.NullPtrCheck
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/src/stdio/fprintf_test.cpp:102: FAILURE
Expected: ret
Which is: 8
To be less than: 0
Which is: 0
/home/botworker/builds/openmp-offload-amdgpu-runtime-2/llvm.src/libc/test/src/stdio/fprintf_test.cpp:103: FAILURE
Expected: 0
Which is: 0
To be not equal to: static_cast(libc_errno)
Which is: 0
[ FAILED ] LlvmLibcFPrintfTest.NullPtrCheck
Ran 2 tests. PASS: 0 FAIL: 2

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.

4 participants