[PATCH 1/2] test-powl: Port to libsupport
Siddhesh Poyarekar
siddhesh@sourceware.org
Tue Oct 21 03:02:13 GMT 2025
Use test-driver.c instead of test-skeleton.c
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
---
math/test-powl.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/math/test-powl.c b/math/test-powl.c
index 4c02d73d60..2c716043b8 100644
--- a/math/test-powl.c
+++ b/math/test-powl.c
@@ -20,12 +20,13 @@
#include <math.h>
#include <float.h>
#include <ieee754.h>
+#include <support/check.h>
-static int
-do_test (void)
+/* Smoke test for bz12775, which discovered a typo in the x86_64 powl
+ implementation. */
+static void
+do_test_bz12775 (void)
{
- int result = 0;
-
#if LDBL_MANT_DIG == 64
{
long double x = 1e-20;
@@ -39,13 +40,18 @@ do_test (void)
if (fabsl (x - 1e-30) > 1e-10)
{
printf ("powl (1e-20, 1.5): wrong result: %Lg\n", x);
- result = 1;
+ support_record_failure ();
}
}
#endif
+}
+
+static int
+do_test (void)
+{
+ do_test_bz12775 ();
- return result;
+ return 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
--
2.51.0
More information about the Libc-alpha
mailing list