| Message ID | 20250822051726.2429206-3-raj.khem@gmail.com |
|---|---|
| State | Accepted, archived |
| Commit | 0fe96efea084f4594df43f57e121cb2353bfafa7 |
| Headers | show |
| Series | [1/3] elfutils: Remove run-backtrace-dwarf from musl ptest XFAILs list | expand |
On Fri, 22 Aug 2025 at 07:17, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@lists.openembedded.org> wrote: > +do_install_ptest:append:libc-musl() { > + # Force UTF-8 runtime and skip legacy fr_FR subcases > + sed -i '3i export LANG=fr_FR.UTF-8; export LC_ALL=fr_FR.UTF-8' \ > + ${D}${PTEST_PATH}/run-ptest > + sed -i '3i export LOCALE_FR="none"; export LOCALE_FR_UTF8=fr_FR.UTF-8' \ > + ${D}${PTEST_PATH}/run-ptest > + sed -i -e 's|^LOCALE_FR="fr_FR.ISO-8859-1"|LOCALE_FR="none"|g' \ > + ${D}${PTEST_PATH}/tests/init-env This hurts my eyes. Can we install a musl-specific run-ptest or raise the issue with upstream, or find some way to avoid all this sed? Alex
diff --git a/meta/recipes-core/gettext/gettext_0.23.1.bb b/meta/recipes-core/gettext/gettext_0.23.1.bb index e160d4839dc..509438c2a7a 100644 --- a/meta/recipes-core/gettext/gettext_0.23.1.bb +++ b/meta/recipes-core/gettext/gettext_0.23.1.bb @@ -179,6 +179,16 @@ do_install_ptest() { sed -i -e 's|${DEBUG_PREFIX_MAP}||g' ${D}${PTEST_PATH}/tests/init-env } +do_install_ptest:append:libc-musl() { + # Force UTF-8 runtime and skip legacy fr_FR subcases + sed -i '3i export LANG=fr_FR.UTF-8; export LC_ALL=fr_FR.UTF-8' \ + ${D}${PTEST_PATH}/run-ptest + sed -i '3i export LOCALE_FR="none"; export LOCALE_FR_UTF8=fr_FR.UTF-8' \ + ${D}${PTEST_PATH}/run-ptest + sed -i -e 's|^LOCALE_FR="fr_FR.ISO-8859-1"|LOCALE_FR="none"|g' \ + ${D}${PTEST_PATH}/tests/init-env +} + RDEPENDS:${PN}-ptest += "coreutils make xz bash gawk autoconf locale-base-de-de locale-base-fr-fr" RDEPENDS:${PN}-ptest:append:libc-glibc = "\ glibc-gconv-big5 \
On musl, there is no real legacy (non-UTF-8) fr_FR locale. These tests are designed for libcs that ship both fr_FR (ISO-8859-1) and fr_FR.UTF-8. So the right thing will be to SKIP these tests Unsetting LOCALE_FR will ensure that it does not enable ISO-8859-1 path, so reset it in run-ptest but thats not enough because it is being set in the test's own init-env file as well so clear it in that file as well. Fixes Failed ptests: {'gettext': ['intl-2', 'intl-4', 'intl-thread-3', 'lang-sh', 'lang-bash']} Signed-off-by: Khem Raj <raj.khem@gmail.com> --- meta/recipes-core/gettext/gettext_0.23.1.bb | 10 ++++++++++ 1 file changed, 10 insertions(+)