This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 00/14] Functions with format string for IEEE128 on powercpc64le
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 21 Jun 2018 16:44:29 +0000
- Subject: Re: [PATCH 00/14] Functions with format string for IEEE128 on powercpc64le
- References: <20180621021023.17036-1-gabriel@inconstante.eti.br>
On Wed, 20 Jun 2018, Gabriel F. T. Gomes wrote:
> As a follow-up to my previous message on this topic [1], this patch set
> adds more functions that need new versions on powerpc64le for the long
> double format transition. There are functions that are still missing
> (__isoc99_*scanf, printf_size, obstack_*printf, obstack_*printf_chk,
> strfmon, as well as strfromld and strtold), thus, the redirections are
And presumably strfmon_l, strtold_l, wcstold, wcstold_l, q[efg]cvt{,_r},
at least. And syslog functions.
I have a general comment on the approach for testing in these patches.
Most of the tests seem to have a common file included in a wrapper file
for each long double format, which makes sense. I would suggest that
those common files should actually be in the relevant non-sysdeps
directories (misc/ in the case of err.h functions, for example) - and that
the tests should be built and run generically for the default long double
for all platforms, since after all they look like they should work for all
platforms. Then, the sysdeps directory would add the wrappers that are
specifically for particular formats and the makefile code to run the tests
for those formats (so you'd end up with each such test getting run three
or four times for powerpc64le, for the default format and for each format
that's explicitlyy tested).
This has the following benefits:
* It fixes the problem that err.h functions (maybe others as well) have
zero generic test coverage, by adding some tests that do at least get
built and run everywhere. (The coverage would still be inadequate for
testing most of the semantics of those functions, but that's not your
problem to fix.)
* It makes it easy to add more -mlong-double-64 test coverage in
sysdeps/ieee754/ldbl-opt (again not your problem, except in the cases,
such as for err.h, where adding the redirections for IEEE long double also
means adding the missing redirections for -mlong-double-64), as wrapper
files and makefile logic could be added in that directory that reuse the
main test implementations outside of sysdeps.
I would also suggest that, in the cases where they don't already do so,
it's helpful for the tests of printing functions to output e.g. two long
double values from a single format string rather than just one - that
would help ensure more possible failure modes are detected (if the code
tries reading the wrong one of double and IBM long double from the
arguments, that might sometimes just happen to work when there's only a
single argument).
--
Joseph S. Myers
joseph@codesourcery.com