[v4,2/5] ldbl-opt: Reuse argp tests that print long double
diff mbox series

Message ID 20190221205706.12225-3-gabriel@inconstante.eti.br
State New
Headers show
Series
  • Add missing nldbl functions to libc
Related show

Commit Message

Gabriel F. T. Gomes Feb. 21, 2019, 8:57 p.m. UTC
No changes since v3.

No changes since v2.

No changes since v1.

-- 8< --
The test case tst-ldbl-argp checks that the conversion specifier '%Lf'
correctly prints long double values with the default long double format
for a platform.  This patch reuses the test case for long double with
the same format as double (-mlong-double-64).

Tested for powerpc64 and powerpc64le.

	* sysdeps/ieee754/ldbl-opt/Makefile
	[subdir == argp] (tests-internal): Add tst-nldbl-argp.
	[subdir == argp] ($(objpfx)tst-nldbl-argp.c): New rule.
	[subdir == argp] (CFLAGS-tst-nldbl-argp.c): New variable.
---
 sysdeps/ieee754/ldbl-opt/Makefile | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Joseph Myers Feb. 28, 2019, 6:36 p.m. UTC | #1
On Thu, 21 Feb 2019, Gabriel F. T. Gomes wrote:

> The test case tst-ldbl-argp checks that the conversion specifier '%Lf'
> correctly prints long double values with the default long double format
> for a platform.  This patch reuses the test case for long double with
> the same format as double (-mlong-double-64).

OK.

Patch
diff mbox series

diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile
index 64fdb8cb9e..8a2c129f5f 100644
--- a/sysdeps/ieee754/ldbl-opt/Makefile
+++ b/sysdeps/ieee754/ldbl-opt/Makefile
@@ -179,3 +179,13 @@  CFLAGS-test-nldbl-redirect.c += -mlong-double-64
 $(objpfx)test-nldbl-redirect: $(objpfx)libnldbl_nonshared.a
 
 endif
+
+# Tests for argp.h functions (reusing the relevant tests from argp/)
+ifeq ($(subdir),argp)
+tests-internal += tst-nldbl-argp
+
+$(objpfx)tst-nldbl-argp.c: tst-ldbl-argp.c
+	cp $< $@
+
+CFLAGS-tst-nldbl-argp.c += -mlong-double-64
+endif