This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [libstdc++ testsuite][patch] many locale tests only SUPPORTED on linux, start making these portable
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: John Marino <gnugcc at marino dot st>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>, Andreas Tobler <andreast at gcc dot gnu dot org>
- Date: Wed, 11 Nov 2015 21:51:06 +0000
- Subject: Re: [libstdc++ testsuite][patch] many locale tests only SUPPORTED on linux, start making these portable
- Authentication-results: sourceware.org; auth=none
- References: <5620C18D dot 30301 at marino dot st>
On 16/10/15 11:21 +0200, John Marino wrote:
There are a few issues with the locales portion of the libstdc++
testsuite. These issues stem from the fact that much about locales are
not standardized, such as the names of the encodings, how to handle
abbreviated versions of named locales, and modifiers (e.g. @euro,
@preeuro). Compounding the problem is that many of test themselves are
Linux specific.
The attached large patch makes a dent with an effort to resolve this
issues. This patch has been scoped to only standardise the names of the
locales. There is no net effect on Linux, but it allows many more tests
to be considered on other systems, including *BSD.
Some types of changes are:
1) convert abreviations to full names (e.g. "de_DE" => "de_DE@ISO8859-15
2) Use ISO-8859-15 over ISO-8859-1 in European locales when possible
3) Use "UTF-8" over variations like "utf8"
4) Use "ISO8859" over "ISO-8859"
on these last two, Linux is case-insensitive and hyphen-insensitive with
respect to named locales where other systems like BSD have only one
version that must be explicitly used. Since encoding names are not
standardised, we've picked a lowest common denominator that works.
5) case changes for eucJP
6) convert tests that specified "@euro" modifier to a new ISO_8859 macro
can produces a named locale as a function of system (currently
FreeBSD/DragonFly/NetBSD and everything else but the tailoring is not
limited). This fixes systems that don't support @euro modifier
There is a lot more work that cant be done to open up libstdc++ locale
tests to non-Linux systems, but given the size of this patch, I wanted
to limit it's scope to only modifying to the name locale specification.
There are many more modifications that could be made to the test
themselves to make them portable to non-linux systems but I think they
are better made with separate patches.
Andreas Tobler has done a lot of review and testing on both FreeBSD and
linux (to verify no regressions), and Jonathan Wakely has done an
initial review and said it was ready for a broader review now.
I asked some colleagues to look at this too (a few weeks ago now,
before I went on vacation).
The only significant comment was:
e.g. `"de_DE" => "de_DE@ISO8859-15` should be `e.g. "de_DE" => "de_DE.ISO8859-15"` ? Since it's an encoding, @ is used for a modifier.
FYI, https://www.ietf.org/rfc/rfc4646.txt