diff options
Diffstat (limited to 'libc/test/src/stdlib')
| -rw-r--r-- | libc/test/src/stdlib/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | libc/test/src/stdlib/StrfromTest.h | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/libc/test/src/stdlib/CMakeLists.txt b/libc/test/src/stdlib/CMakeLists.txt index 0eb373c..42e8faa 100644 --- a/libc/test/src/stdlib/CMakeLists.txt +++ b/libc/test/src/stdlib/CMakeLists.txt @@ -187,6 +187,7 @@ add_header_library( DEPENDS libc.src.__support.CPP.type_traits libc.src.__support.FPUtil.fp_bits + libc.src.__support.macros.properties.architectures ) add_libc_test( diff --git a/libc/test/src/stdlib/StrfromTest.h b/libc/test/src/stdlib/StrfromTest.h index fd2e0f12..3dacfca 100644 --- a/libc/test/src/stdlib/StrfromTest.h +++ b/libc/test/src/stdlib/StrfromTest.h @@ -8,6 +8,7 @@ #include "src/__support/CPP/type_traits.h" #include "src/__support/FPUtil/FPBits.h" +#include "src/__support/macros/properties/architectures.h" #include "test/UnitTest/ErrnoCheckingTest.h" #include "test/UnitTest/ErrnoSetterMatcher.h" #include "test/UnitTest/Test.h" @@ -484,7 +485,9 @@ public: ASSERT_STREQ_LEN(written, buff, "-NAN"); } + // https://github.com/llvm/llvm-project/issues/166795 void charsWrittenOverflow(FunctionT func) { +#ifndef LIBC_TARGET_ARCH_IS_RISCV32 char buff[100]; // Trigger an overflow in the return value of strfrom by writing more than // INT_MAX bytes. @@ -492,6 +495,7 @@ public: EXPECT_LT(result, 0); ASSERT_ERRNO_FAILURE(); +#endif } }; |
