Message ID | 20240731122602.21724-1-jwakely@redhat.com |
---|---|
State | New |
Headers | show |
Series | libstdc++: Only append "@euro" to locale names for Glibc testing | expand |
On Wed, 31 Jul 2024 at 13:27, Jonathan Wakely <jwakely@redhat.com> wrote: > > I doubt we want the @euro suffix anywhere except Glibc-based targets. We > certainly don't want to append "@euro" on Solaris, where this change > flips some tests from UNSUPPORTED to PASS, e.g. > 21_strings/basic_string/numeric_conversions/char/to_string_float.cc > It will probably also cause some to flip from UNSUPPORTED to FAIL, which > we'll need to address. Oh, I've just realised that the UNSUPPORTED -> PASS I observed on Solaris was a build using my patch for PR 57585, which is not pushed yet. I think without that all uses of dg-require-namedlocale might fail on Solaris, so this change won't actually change anything ... yet. It still seems worth doing now though. > > Let's restrict it to Glibc. > > Tested x86_64-linux and sparc-solaris11.4. > > -- >8 -- > > The testsuite automatically appends "@euro" to "xx.ISO8859-15" locale > names on all targets except FreeBSD, DragonflyBSD, and NetBSD. It should > only be for Glibc, not all non-BSD targets. > > libstdc++-v3/ChangeLog: > > * testsuite/lib/libstdc++.exp (check_v3_target_namedlocale): > Only append "@euro" to ".ISO8859-15" locales for Glibc. > --- > libstdc++-v3/testsuite/lib/libstdc++.exp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp > index 18331c80bc2..2510c7f4cbb 100644 > --- a/libstdc++-v3/testsuite/lib/libstdc++.exp > +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp > @@ -1032,7 +1032,7 @@ proc check_v3_target_namedlocale { args } { > puts $f " strcpy(result, name);" > puts $f "#if defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__" > puts $f " /* fall-through */" > - puts $f "#else" > + puts $f "#elif defined __GLIBC__" > puts $f " if (strstr(result, \"ISO8859-15\")) {" > puts $f " strcat(result, \"@euro\");" > puts $f " }" > -- > 2.45.2 >
Hi Jonathan, > On Wed, 31 Jul 2024 at 13:27, Jonathan Wakely <jwakely@redhat.com> wrote: >> >> I doubt we want the @euro suffix anywhere except Glibc-based targets. We >> certainly don't want to append "@euro" on Solaris, where this change >> flips some tests from UNSUPPORTED to PASS, e.g. >> 21_strings/basic_string/numeric_conversions/char/to_string_float.cc >> It will probably also cause some to flip from UNSUPPORTED to FAIL, which >> we'll need to address. > > Oh, I've just realised that the UNSUPPORTED -> PASS I observed on > Solaris was a build using my patch for PR 57585, which is not pushed > yet. I think without that all uses of dg-require-namedlocale might > fail on Solaris, so this change won't actually change anything ... > yet. > > It still seems worth doing now though. agreed: while Solaris 11.4 does have a few *.ISO8859-15@euro locales da_DK.ISO8859-15@euro en_GB.ISO8859-15@euro en_US.ISO8859-15@euro sv_SE.ISO8859-15@euro the majority (17) are not. Rainer
On Wed, 31 Jul 2024 at 13:42, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote: > > Hi Jonathan, > > > On Wed, 31 Jul 2024 at 13:27, Jonathan Wakely <jwakely@redhat.com> wrote: > >> > >> I doubt we want the @euro suffix anywhere except Glibc-based targets. We > >> certainly don't want to append "@euro" on Solaris, where this change > >> flips some tests from UNSUPPORTED to PASS, e.g. > >> 21_strings/basic_string/numeric_conversions/char/to_string_float.cc > >> It will probably also cause some to flip from UNSUPPORTED to FAIL, which > >> we'll need to address. > > > > Oh, I've just realised that the UNSUPPORTED -> PASS I observed on > > Solaris was a build using my patch for PR 57585, which is not pushed > > yet. I think without that all uses of dg-require-namedlocale might > > fail on Solaris, so this change won't actually change anything ... > > yet. > > > > It still seems worth doing now though. > > agreed: while Solaris 11.4 does have a few *.ISO8859-15@euro locales > > da_DK.ISO8859-15@euro > en_GB.ISO8859-15@euro > en_US.ISO8859-15@euro > sv_SE.ISO8859-15@euro > > the majority (17) are not. Ah interesting, I only saw en_US.ISO8859-15@euro on cfarm216, which is an interesting one. US locale using Euro symbol for currency?! Anyway, thanks for confirming, I'll push this.
Hi Jonathan, >> agreed: while Solaris 11.4 does have a few *.ISO8859-15@euro locales >> >> da_DK.ISO8859-15@euro >> en_GB.ISO8859-15@euro >> en_US.ISO8859-15@euro >> sv_SE.ISO8859-15@euro >> >> the majority (17) are not. > > Ah interesting, I only saw en_US.ISO8859-15@euro on cfarm216, which is > an interesting one. US locale using Euro symbol for currency?! don't ask me what they were thinking ;-) Anyway, I found that both Solaris cfarm systems only had a subset of the available locales installed. An artifact of the exact installation method, I supposed. Whatever the case, that's fixed now. Rainer
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 18331c80bc2..2510c7f4cbb 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -1032,7 +1032,7 @@ proc check_v3_target_namedlocale { args } { puts $f " strcpy(result, name);" puts $f "#if defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__" puts $f " /* fall-through */" - puts $f "#else" + puts $f "#elif defined __GLIBC__" puts $f " if (strstr(result, \"ISO8859-15\")) {" puts $f " strcat(result, \"@euro\");" puts $f " }"