<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9070</bug_id>
          
          <creation_ts>2016-02-05 13:43:32 +0000</creation_ts>
          <short_desc>Add test that locales are working</short_desc>
          <delta_ts>2024-01-04 20:40:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Runtime Testing</product>
          <component>general</component>
          <version>2.5</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>NEWCOMER</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="New Comer Bugs">newcomer</assigned_to>
          <cc>costamagnagianfranco</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>leonardo.sandoval.gonzalez</cc>
    
    <cc>louis.rannou</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sangeeta.jain</cc>
    
    <cc>yoctouser</cc>
          
          <qa_contact name="Apoorv">apoorv.sangal</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>58643</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-05 13:43:32 +0000</bug_when>
    <thetext>Basically we need to test that locales are working, both generated on first boot and build time.

IMAGE_LINGUAS=&quot;en-us fr-fr&quot;
ENABLE_BINARY_LOCALE_GENERATION=&quot;0&quot;
MACHINE=qemuarm
bitbake core-image-base

boot up, ssh in and do (handwavy) something that uses translated strings and won&apos;t change.  A reasonable suggestion was LANG=fr_FR df | head -n1.  Check that the string is in fact in French.

Then do that again with ENABLE_BINARY_LOCALE_GENERATION=&quot;1&quot;.  Using MACHINE=qemuarm is important as we want to make sure that the host and target architectures are not compatible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62454</commentid>
    <comment_count>1</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-05-25 20:44:00 +0000</bug_when>
    <thetext>Due to limited resources, moving this to 2.3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69499</commentid>
    <comment_count>2</comment_count>
    <who name="Jose Perez C">jose.perez.carranza</who>
    <bug_when>2017-01-04 20:16:27 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Basically we need to test that locales are working, both generated on first
&gt; boot and build time.
&gt; 
&gt; IMAGE_LINGUAS=&quot;en-us fr-fr&quot;
&gt; ENABLE_BINARY_LOCALE_GENERATION=&quot;0&quot;
&gt; MACHINE=qemuarm
&gt; bitbake core-image-base
&gt; 
&gt; boot up, ssh in and do (handwavy) something that uses translated strings and
&gt; won&apos;t change.  A reasonable suggestion was LANG=fr_FR df | head -n1.  Check
&gt; that the string is in fact in French.
&gt; 
&gt; Then do that again with ENABLE_BINARY_LOCALE_GENERATION=&quot;1&quot;.  Using
&gt; MACHINE=qemuarm is important as we want to make sure that the host and
&gt; target architectures are not compatible.

I followed the steps mentioned above and still seeing the string in English, there is any extra configuration needed or locales are not working properly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70747</commentid>
    <comment_count>3</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2017-02-16 16:06:03 +0000</bug_when>
    <thetext>Ross, please review and close if complete.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71193</commentid>
    <comment_count>4</comment_count>
    <who name="Yocto User">yoctouser</who>
    <bug_when>2017-03-10 09:00:29 +0000</bug_when>
    <thetext>If the &quot;df&quot; command is from BusyBox (v1.24.1), translation doesn&apos;t work. Avoid to use tools from BusyBox to check if translation works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79603</commentid>
    <comment_count>5</comment_count>
    <who name="Robin Jordan">robin.l.jordan</who>
    <bug_when>2018-02-26 20:34:03 +0000</bug_when>
    <thetext>Please provide a status on this.  Will it be ready for YP 2.5 M3?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79608</commentid>
    <comment_count>6</comment_count>
    <who name="Robin Jordan">robin.l.jordan</who>
    <bug_when>2018-02-26 20:43:58 +0000</bug_when>
    <thetext>I now see this is targeted for M4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79890</commentid>
    <comment_count>7</comment_count>
    <who name="Apoorv">apoorv.sangal</who>
    <bug_when>2018-03-21 07:09:54 +0000</bug_when>
    <thetext>locales have been tested by doing following steps:

changes made in local.conf:
GLIBC_GENERATE_LOCALES = &quot;en_US.UTF-8 fr_FR.UTF-8&quot;
IMAGE_LINGUAS += &quot;en-us fr-fr&quot;
IMAGE_INSTALL_append +=&quot;glibc-utils localedef&quot;
ENABLE_BINARY_LOCALE_GENERATION=&quot;1&quot;

Image generated : bitbake core-image-sato-sdk

boot up and run following commands on terminal:
# locale -a
C
POSIX
en_US
fr_FR
# locale
LANG=
LC_CTYPE = &quot;POSIX&quot;
# export LANG=fr.FR.UTF-8
# locale
LANG=fr.FR.UTF-8
LC_CTYPE=&quot;fr_FR.UTF-8&quot;
#LC_TIME=fr_FR.UTF-8 date
mer.mars 21 13:54:20 UTC 2018
#LC_TIME=fr_FR.UTF-8 date
Wed Mar 21 13:54:45 UTC 2018</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79892</commentid>
    <comment_count>8</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-03-21 07:22:42 +0000</bug_when>
    <thetext>We need that, but in an automated test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79941</commentid>
    <comment_count>9</comment_count>
    <who name="Apoorv">apoorv.sangal</who>
    <bug_when>2018-03-22 15:24:49 +0000</bug_when>
    <thetext>i will get a runtime automated test case in.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94752</commentid>
    <comment_count>10</comment_count>
    <who name="Louis Rannou">louis.rannou</who>
    <bug_when>2023-01-18 16:40:29 +0000</bug_when>
    <thetext>I cannot use date because it is also from busybox. But I&apos;m adding a check with localedef:

# localedef --list-archive | grep &quot;fr_FR.utf8&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94753</commentid>
    <comment_count>11</comment_count>
    <who name="Louis Rannou">louis.rannou</who>
    <bug_when>2023-01-18 17:03:37 +0000</bug_when>
    <thetext>I have created a meta/lib/oeqa/runtime/cases/locales.py

https://privatebin.net/?eb04f95e2d5a9ba1#5dsY67YYN4swSr5wSF5bsWDCheaxGsXtEuzyXf6PUrGM

It requires the local.conf to have:

IMAGE_INSTALL:append = &quot; dropbear &quot;
IMAGE_FEATURES:append = &quot; empty-root-password allow-empty-password allow-root-login &quot;
IMAGE_INSTALL:append = &quot; glibc-utils localedef &quot;
INHERIT:append = &quot; testimage &quot;
TEST_SUITES = &quot; ping ssh locales &quot;
GLIBC_GENERATE_LOCALES = &quot;en_US.UTF-8 fr_FR.UTF-8&quot;
IMAGE_LINGUAS=&quot;en-us fr-fr&quot;
ENABLE_BINARY_LOCALE_GENERATION=&quot;1&quot;

Is that good or does it require something that automatically set those before running the test ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94754</commentid>
    <comment_count>12</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-01-18 17:43:44 +0000</bug_when>
    <thetext>Thanks!

The test should set all the variables that it needs.  Have a look at other tests in eg imagefeatures.py as examples.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94762</commentid>
    <comment_count>13</comment_count>
    <who name="Louis Rannou">louis.rannou</who>
    <bug_when>2023-01-19 12:47:47 +0000</bug_when>
    <thetext>What I have done is a runtime test. As I understand now, it should be placed in selftest instead, right ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94763</commentid>
    <comment_count>14</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2023-01-19 13:57:52 +0000</bug_when>
    <thetext>Yes, in selftest we control the environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94787</commentid>
    <comment_count>15</comment_count>
    <who name="Louis Rannou">louis.rannou</who>
    <bug_when>2023-01-23 16:08:06 +0000</bug_when>
    <thetext>Do you still require the test when ENABLE_BINARY_LOCALE_GENERATION=&quot;0&quot; while this means a complete rebuild (the glibc depends on it) ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95453</commentid>
    <comment_count>16</comment_count>
    <who name="Louis Rannou">louis.rannou</who>
    <bug_when>2023-04-25 09:33:41 +0000</bug_when>
    <thetext>Perhaps this is closed with:

https://lore.kernel.org/all/20230127153344.2868589-1-lrannou@baylibre.com/
and
https://lore.kernel.org/all/20230204114133.1178502-3-richard.purdie@linuxfoundation.org/#t</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>96985</commentid>
    <comment_count>17</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-24 14:24:56 +0000</bug_when>
    <thetext>Bulk move from 4.99 or 0.00 to 5.99</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97735</commentid>
    <comment_count>18</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-01-04 20:40:52 +0000</bug_when>
    <thetext>Fixed by Louis in:
https://git.openembedded.org/openembedded-core/commit/?id=53258fd810bea6475af9f908f7b712a13a02b628

Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>