From cf583a8b1f8926f6e361f8caba95c131ad252253 Mon Sep 17 00:00:00 2001 From: Lukasz Leczkowski Date: Tue, 21 Jan 2025 15:05:54 +0100 Subject: [PATCH 1/2] libc: disable tests failing on sparcv8leon Cause of these tests failing is strtof/d/ld functions. These functions with the tested inputs are possibly using subnormal numbers which are not supported by SPARC FPU. JIRA: RTOS-883 --- libc/scanf-advanced/stdio_scanf_advanced.c | 20 ++++++++++++++++++++ libc/stdlib/stdlib_strto.c | 12 ++++++++++++ 2 files changed, 32 insertions(+) diff --git a/libc/scanf-advanced/stdio_scanf_advanced.c b/libc/scanf-advanced/stdio_scanf_advanced.c index c937653d..ad62b931 100644 --- a/libc/scanf-advanced/stdio_scanf_advanced.c +++ b/libc/scanf-advanced/stdio_scanf_advanced.c @@ -285,6 +285,11 @@ TEST(stdio_scanf_aefg, A) TEST(stdio_scanf_aefg, e) { +#ifdef __TARGET_SPARCV8LEON + /* Disabled on SPARC because of issue https://github.com/phoenix-rtos/phoenix-rtos-project/issues/970 */ + TEST_IGNORE(); +#endif + char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%e %e %e %e %e %e %e"; @@ -321,6 +326,11 @@ TEST(stdio_scanf_aefg, e) TEST(stdio_scanf_aefg, E) { +#ifdef __TARGET_SPARCV8LEON + /* Disabled on SPARC because of issue https://github.com/phoenix-rtos/phoenix-rtos-project/issues/970 */ + TEST_IGNORE(); +#endif + char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%E %E %E %E %E %E %E"; @@ -357,6 +367,11 @@ TEST(stdio_scanf_aefg, E) TEST(stdio_scanf_aefg, g) { +#ifdef __TARGET_SPARCV8LEON + /* Disabled on SPARC because of issue https://github.com/phoenix-rtos/phoenix-rtos-project/issues/970 */ + TEST_IGNORE(); +#endif + char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%g %g %g %g %g %g %g"; @@ -393,6 +408,11 @@ TEST(stdio_scanf_aefg, g) TEST(stdio_scanf_aefg, G) { +#ifdef __TARGET_SPARCV8LEON + /* Disabled on SPARC because of issue https://github.com/phoenix-rtos/phoenix-rtos-project/issues/970 */ + TEST_IGNORE(); +#endif + char buff[BUFF_LEN] = { 0 }; float fltMax, fltMaxH, zero, fltMin, negFltMax, negFltMaxH, negFltMin; const char *format = "%G %G %G %G %G %G %G"; diff --git a/libc/stdlib/stdlib_strto.c b/libc/stdlib/stdlib_strto.c index a0fea8ed..a39519bc 100644 --- a/libc/stdlib/stdlib_strto.c +++ b/libc/stdlib/stdlib_strto.c @@ -80,6 +80,10 @@ TEST(stdlib_strto, strtod_basic_hex) TEST(stdlib_strto, strtod_min_max) { +#ifdef __TARGET_SPARCV8LEON + /* Disabled on SPARC because of issue https://github.com/phoenix-rtos/phoenix-rtos-project/issues/970 */ + TEST_IGNORE(); +#endif errno = 0; TEST_ASSERT_EQUAL_DOUBLE(DBL_MIN, strtod("2.2250738585072013e-308", NULL)); TEST_ASSERT_EQUAL_INT(0, errno); @@ -134,6 +138,10 @@ TEST(stdlib_strto, strtof_basic_hex) TEST(stdlib_strto, strtof_min_max) { +#ifdef __TARGET_SPARCV8LEON + /* Disabled on SPARC because of issue https://github.com/phoenix-rtos/phoenix-rtos-project/issues/970 */ + TEST_IGNORE(); +#endif errno = 0; TEST_ASSERT_EQUAL_FLOAT(FLT_MIN, strtof("1.17549435e-38", NULL)); TEST_ASSERT_EQUAL_INT(0, errno); @@ -188,6 +196,10 @@ TEST(stdlib_strto, strtold_basic_hex) TEST(stdlib_strto, strtold_min_max) { +#ifdef __TARGET_SPARCV8LEON + /* Disabled on SPARC because of issue https://github.com/phoenix-rtos/phoenix-rtos-project/issues/970 */ + TEST_IGNORE(); +#endif /* * Phoenix-RTOS does not currently support long double numbers. * Consequently, long doubles are not being tested, instead, for this case, we have decided to test doubles From f7a7182b6f9cf83e3d61caf566a087b64c6d1a64 Mon Sep 17 00:00:00 2001 From: Lukasz Leczkowski Date: Tue, 21 Jan 2025 16:29:34 +0100 Subject: [PATCH 2/2] devices: add support for GR740 in test-grlib-multi JIRA: RTOS-883 --- devices/grlib-multi/test-grlib-multi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devices/grlib-multi/test-grlib-multi.c b/devices/grlib-multi/test-grlib-multi.c index ebfea961..ec14c537 100644 --- a/devices/grlib-multi/test-grlib-multi.c +++ b/devices/grlib-multi/test-grlib-multi.c @@ -24,6 +24,8 @@ #include #elif defined(__CPU_GR712RC) #include +#elif defined(__CPU_GR740) +#include #else #error "Unsupported target" #endif