Skip to content

Commit

Permalink
[libc] Disable -NaN test on float128 systems (#70146)
Browse files Browse the repository at this point in the history
Some float128 systems (specifically the ones used for aarch64 buildbots)
don't respect signs for long double NaNs. This patch disables the printf
test that was failing due to this.
  • Loading branch information
michaelrj-google committed Oct 24, 2023
1 parent 2e3c62b commit 2282af2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libc/test/src/stdio/sprintf_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,12 @@ TEST_F(LlvmLibcSPrintfTest, FloatDecimalConv) {
written = LIBC_NAMESPACE::sprintf(buff, "%Lf", ld_nan);
ASSERT_STREQ_LEN(written, buff, "nan");

// Some float128 systems (specifically the ones used for aarch64 buildbots)
// don't respect signs for long double NaNs.
#if defined(SPECIAL_X86_LONG_DOUBLE) || defined(LONG_DOUBLE_IS_DOUBLE)
written = LIBC_NAMESPACE::sprintf(buff, "%LF", -ld_nan);
ASSERT_STREQ_LEN(written, buff, "-NAN");
#endif

// Length Modifier Tests.

Expand Down

0 comments on commit 2282af2

Please sign in to comment.