From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id B0C7A3858C2C for ; Tue, 21 Dec 2021 14:19:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B0C7A3858C2C Received: by mail-lj1-x22c.google.com with SMTP id p8so21652394ljo.5 for ; Tue, 21 Dec 2021 06:19:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=9/5COpR5YwcMisPkdYTivMykB5eBLU8jox+YOgSK0rQ=; b=3GYsujOm1Y49BfbE9VmRoaXaodksABEN6wlWVXe38BI/EQ/Rq4fNznVQOK91ead3aW zEv/d9/iAICeiBbp3Q+qoblsrM9IfUMluFTts7+PFYeYPrtHPk4zyK8uwwU5n9AB0uD5 PW6ellvacjmUqqrueht5T7zFbC+FqiWp3p2acHgKsLTF6aUIGDMAQQQjj7m2KxZgHuUB Us0E47SFcRWCRUOm5LtR+3rU952cOlmP1waNBOCPPT4J60pOaQmodgEKbC0B5F+STGwx QUofjiM3R6KbGVc2A3hjOvi8/kN9mgIwnH2apYzVr0M/mhpkquH9pIptpNIEvwyk5s0h KhvQ== X-Gm-Message-State: AOAM533eUvhzpMzyGH6CEHEUaAeFWZJV7dl+qGjLlTY2WlUAGtDnzkP/ vDz1or59ucYtt+0W+Tg5kJsz X-Google-Smtp-Source: ABdhPJxadhaAUv36+uOfUGmPpRu7ILVk4yfXcKHPiZ8iJA7cPiRHuPupsaUHVfvOSOGfF/vH/qs06g== X-Received: by 2002:a2e:2a41:: with SMTP id q62mr2602651ljq.515.1640096372130; Tue, 21 Dec 2021 06:19:32 -0800 (PST) Received: from [192.168.0.135] ([185.30.228.158]) by smtp.gmail.com with ESMTPSA id e17sm2725261lfr.296.2021.12.21.06.19.31 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Dec 2021 06:19:31 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: [TCWG CI] Regression caused by gcc: libstdc++: Support old and new T_FMT for en_HK locale [PR103687] From: Maxim Kuvyrkov In-Reply-To: <187301037.6343.1640003901370@jenkins.jenkins> Date: Tue, 21 Dec 2021 17:19:30 +0300 Cc: gcc-regression@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <187301037.6343.1640003901370@jenkins.jenkins> To: Jonathan Wakely X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_LOTSOFHASH, KAM_SHORT, LIKELY_SPAM_BODY, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-regression@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-regression mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2021 14:19:36 -0000 Hi Jonathan, This was sent out due to a bug in our CI. Sorry for the noise. Regards, -- Maxim Kuvyrkov https://www.linaro.org > On 20 Dec 2021, at 15:38, ci_notify@linaro.org wrote: >=20 > [TCWG CI] Regression caused by gcc: libstdc++: Support old and new = T_FMT for en_HK locale [PR103687]: > commit 9a4b4514bde2fe2f287f6549ef51326fb8918008 > Author: Jonathan Wakely >=20 > libstdc++: Support old and new T_FMT for en_HK locale [PR103687] >=20 > Results regressed to > # reset_artifacts: > -10 > # build_abe binutils: > -9 > # build_abe stage1 -- --set = gcc_override_configure=3D--disable-libsanitizer --set = gcc_override_configure=3D--disable-multilib --set = gcc_override_configure=3D--with-cpu=3Dcortex-m4 --set = gcc_override_configure=3D--with-mode=3Dthumb --set = gcc_override_configure=3D--with-float=3Dhard: > -8 > # build_abe newlib: > -6 > # build_abe stage2 -- --set = gcc_override_configure=3D--disable-libsanitizer --set = gcc_override_configure=3D--disable-multilib --set = gcc_override_configure=3D--with-cpu=3Dcortex-m4 --set = gcc_override_configure=3D--with-mode=3Dthumb --set = gcc_override_configure=3D--with-float=3Dhard: > -5 > # benchmark -- -O2_LTO_mthumb = artifacts/build-9a4b4514bde2fe2f287f6549ef51326fb8918008/results_id: > 1 >=20 > from > # reset_artifacts: > -10 > # build_abe binutils: > -9 > # build_abe stage1 -- --set = gcc_override_configure=3D--disable-libsanitizer --set = gcc_override_configure=3D--disable-multilib --set = gcc_override_configure=3D--with-cpu=3Dcortex-m4 --set = gcc_override_configure=3D--with-mode=3Dthumb --set = gcc_override_configure=3D--with-float=3Dhard: > -8 > # build_abe newlib: > -6 > # build_abe stage2 -- --set = gcc_override_configure=3D--disable-libsanitizer --set = gcc_override_configure=3D--disable-multilib --set = gcc_override_configure=3D--with-cpu=3Dcortex-m4 --set = gcc_override_configure=3D--with-mode=3Dthumb --set = gcc_override_configure=3D--with-float=3Dhard: > -5 > # benchmark -- -O2_LTO_mthumb artifacts/build-baseline/results_id: > 1 >=20 > THIS IS THE END OF INTERESTING STUFF. BELOW ARE LINKS TO BUILDS, = REPRODUCTION INSTRUCTIONS, AND THE RAW COMMIT. >=20 > This commit has regressed these CI configurations: > - tcwg_bmk_gnu_eabi_stm32/gnu_eabi-master-arm_eabi-coremark-O2_LTO >=20 > First_bad build: = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/15/artifact/artifacts/build-9a4b4514bd= e2fe2f287f6549ef51326fb8918008/ > Last_good build: = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/15/artifact/artifacts/build-85a438fc78= dd12249ca854a3e5c577fefeb1a5cd/ > Baseline build: = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/15/artifact/artifacts/build-baseline/ > Even more details: = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/15/artifact/artifacts/ >=20 > Reproduce builds: > > mkdir investigate-gcc-9a4b4514bde2fe2f287f6549ef51326fb8918008 > cd investigate-gcc-9a4b4514bde2fe2f287f6549ef51326fb8918008 >=20 > # Fetch scripts > git clone https://git.linaro.org/toolchain/jenkins-scripts >=20 > # Fetch manifests and test.sh script > mkdir -p artifacts/manifests > curl -o artifacts/manifests/build-baseline.sh = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/15/artifact/artifacts/manifests/build-= baseline.sh --fail > curl -o artifacts/manifests/build-parameters.sh = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/15/artifact/artifacts/manifests/build-= parameters.sh --fail > curl -o artifacts/test.sh = https://ci.linaro.org/job/tcwg_bmk_ci_gnu_eabi-bisect-tcwg_bmk_stm32-gnu_e= abi-master-arm_eabi-coremark-O2_LTO/15/artifact/artifacts/test.sh --fail > chmod +x artifacts/test.sh >=20 > # Reproduce the baseline build (build all pre-requisites) > ./jenkins-scripts/tcwg_bmk-build.sh @@ = artifacts/manifests/build-baseline.sh >=20 > # Save baseline build state (which is then restored in = artifacts/test.sh) > mkdir -p ./bisect > rsync -a --del --delete-excluded --exclude /bisect/ --exclude = /artifacts/ --exclude /gcc/ ./ ./bisect/baseline/ >=20 > cd gcc >=20 > # Reproduce first_bad build > git checkout --detach 9a4b4514bde2fe2f287f6549ef51326fb8918008 > ../artifacts/test.sh >=20 > # Reproduce last_good build > git checkout --detach 85a438fc78dd12249ca854a3e5c577fefeb1a5cd > ../artifacts/test.sh >=20 > cd .. > >=20 > Full commit (up to 1000 lines): > > commit 9a4b4514bde2fe2f287f6549ef51326fb8918008 > Author: Jonathan Wakely > Date: Tue Dec 14 22:14:48 2021 +0000 >=20 > libstdc++: Support old and new T_FMT for en_HK locale [PR103687] >=20 > This checks whether the locale data for en_HK includes %p and = adjusts > the string being tested accordingly. To account for Jakub's fix to = make > %I parse "12" as 0 instead of 12, we need to change the expected = value > for the case where the locale format doesn't include %p. Also = change the > time from 12:00:00 to 12:02:01 so we can tell if the minutes and = seconds > get mixed up. >=20 > libstdc++-v3/ChangeLog: >=20 > PR libstdc++/103687 > * testsuite/22_locale/time_get/get_date/wchar_t/4.cc: = Restore > original locale before returning. > * testsuite/22_locale/time_get/get_time/char/2.cc: Check = for %p > in locale's T_FMT and adjust accordingly. > * testsuite/22_locale/time_get/get_time/wchar_t/2.cc: = Likewise. > --- > .../22_locale/time_get/get_date/wchar_t/4.cc | 9 +++--- > .../22_locale/time_get/get_time/char/2.cc | 33 = ++++++++++++++++++++-- > .../22_locale/time_get/get_time/wchar_t/2.cc | 33 = ++++++++++++++++++++-- > 3 files changed, 65 insertions(+), 10 deletions(-) >=20 > diff --git = a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/4.cc = b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/4.cc > index d227d4b1ce0..f6de882e4bd 100644 > --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/4.cc > +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/4.cc > @@ -39,7 +39,7 @@ void test01() >=20 > wistringstream iss; > iss.imbue(loc_tw); > - const time_get& tim_get =3D use_facet = >(iss.getloc());=20 > + const time_get& tim_get =3D use_facet = >(iss.getloc()); >=20 > const ios_base::iostate good =3D ios_base::goodbit; > ios_base::iostate errorstate =3D good; > @@ -66,13 +66,14 @@ void test01() > static bool debian_date_format() > { > #ifdef D_FMT > + std::string orig =3D setlocale(LC_TIME, NULL); > if (setlocale(LC_TIME, "zh_TW.UTF-8") !=3D NULL) > { > // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D31413 > // and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D71641#c2 > - if (*nl_langinfo(D_FMT) =3D=3D '%') > - return true; > - setlocale(LC_TIME, "C"); > + std::string d_fmt =3D nl_langinfo(D_FMT); > + setlocale(LC_TIME, orig.c_str()); > + return d_fmt[0] =3D=3D '%'; > } > #endif > return false; > diff --git = a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc = b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc > index a847748dc27..b40971a9bf7 100644 > --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc > +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc > @@ -25,6 +25,8 @@ > #include > #include >=20 > +static bool ampm_time_format(); > + > void test02() > { > using namespace std; > @@ -36,19 +38,23 @@ void test02() > locale loc_hk =3D locale(ISO_8859(1,en_HK)); > VERIFY( loc_hk !=3D loc_c ); >=20 > + const int pm =3D ampm_time_format() ? 12 : 0; > const string empty; > - const tm time_bday =3D __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, = 93, 0); > + const tm time_bday =3D __gnu_test::test_tm(1, 2, 0+pm, 4, 3, 71, 0, = 93, 0); >=20 > // create an ostream-derived object, cache the time_get facet > iterator_type end; > istringstream iss; > - const time_get& tim_get =3D use_facet = >(iss.getloc());=20 > + const time_get& tim_get =3D use_facet = >(iss.getloc()); > const ios_base::iostate good =3D ios_base::goodbit; > ios_base::iostate errorstate =3D good; >=20 > // inspection of named locales, en_HK > iss.imbue(loc_hk); > - iss.str("12:00:00 PM PST");=20 > + if (pm) > + iss.str("12:02:01 PM PST"); > + else > + iss.str("12:02:01 PST"); // %I means 12-hour clock, so parsed as = 12am > // Hong Kong in California! Well, they have Paris in Vegas... this > // is all a little disney-esque anyway. Besides, you can get decent > // Dim Sum in San Francisco. > @@ -62,6 +68,27 @@ void test02() > VERIFY( errorstate =3D=3D ios_base::eofbit ); > } >=20 > +#include > +#if __has_include() > +# include > +#endif > +#include > + > +static bool ampm_time_format() > +{ > +#ifdef T_FMT > + std::string orig =3D setlocale(LC_TIME, NULL); > + if (setlocale(LC_TIME, ISO_8859(1,en_HK)) !=3D NULL) > + { > + // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103687 > + std::string t_fmt =3D nl_langinfo(T_FMT); > + setlocale(LC_TIME, orig.c_str()); > + return t_fmt.find("%p") !=3D std::string::npos; > + } > +#endif > + return false; > +} > + > int main() > { > test02(); > diff --git = a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc = b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc > index b5d61e1afdb..b74604ef472 100644 > --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc > +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc > @@ -25,6 +25,8 @@ > #include > #include >=20 > +static bool ampm_time_format(); > + > void test02() > { > using namespace std; > @@ -36,19 +38,23 @@ void test02() > locale loc_hk =3D locale(ISO_8859(1,en_HK)); > VERIFY( loc_hk !=3D loc_c ); >=20 > + const int pm =3D ampm_time_format() ? 12 : 0; > const wstring empty; > - const tm time_bday =3D __gnu_test::test_tm(0, 0, 12, 4, 3, 71, 0, = 93, 0); > + const tm time_bday =3D __gnu_test::test_tm(1, 2, 0+pm, 4, 3, 71, 0, = 93, 0); >=20 > // create an ostream-derived object, cache the time_get facet > iterator_type end; > wistringstream iss; > - const time_get& tim_get =3D use_facet = >(iss.getloc());=20 > + const time_get& tim_get =3D use_facet = >(iss.getloc()); > const ios_base::iostate good =3D ios_base::goodbit; > ios_base::iostate errorstate =3D good; >=20 > // inspection of named locales, en_HK > iss.imbue(loc_hk); > - iss.str(L"12:00:00 PM PST");=20 > + if (pm) > + iss.str(L"12:02:01 PM PST"); > + else > + iss.str(L"12:02:01 PST"); // %I means 12-hour clock, so parsed as = 12am > // Hong Kong in California! Well, they have Paris in Vegas... this > // is all a little disney-esque anyway. Besides, you can get decent > // Dim Sum in San Francisco. > @@ -62,6 +68,27 @@ void test02() > VERIFY( errorstate =3D=3D ios_base::eofbit ); > } >=20 > +#include > +#if __has_include() > +# include > +#endif > +#include > + > +static bool ampm_time_format() > +{ > +#ifdef T_FMT > + std::string orig =3D setlocale(LC_TIME, NULL); > + if (setlocale(LC_TIME, ISO_8859(1,en_HK)) !=3D NULL) > + { > + // See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103687 > + std::string t_fmt =3D nl_langinfo(T_FMT); > + setlocale(LC_TIME, orig.c_str()); > + return t_fmt.find("%p") !=3D std::string::npos; > + } > +#endif > + return false; > +} > + > int main() > { > test02(); >