Skip to content

Commit 2282af2

Browse files
[libc] Disable -NaN test on float128 systems (#70146)
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.
1 parent 2e3c62b commit 2282af2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libc/test/src/stdio/sprintf_test.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,8 +1008,12 @@ TEST_F(LlvmLibcSPrintfTest, FloatDecimalConv) {
10081008
written = LIBC_NAMESPACE::sprintf(buff, "%Lf", ld_nan);
10091009
ASSERT_STREQ_LEN(written, buff, "nan");
10101010

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

10141018
// Length Modifier Tests.
10151019

0 commit comments

Comments
 (0)