[PATCH] Set locale related environment variables in debugglibc.sh

Carlos O'Donell carlos@redhat.com
Thu Sep 24 01:54:46 GMT 2020


On 9/23/20 12:06 PM, Arjun Shankar wrote:
> From: Arjun Shankar <arjun@redhat.com>
> 
> Tests and binaries that use locale related functions need to run in the
> correct locale environment when being debugged via debugglibc.sh. This
> commit sets up the environment, specifically: GCONV_PATH, LOCPATH, and
> LC_ALL for such tests and binaries when they are being debugged outside
> of a test container.

OK to commit.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  Makefile | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index 6dcfe40c25..e047e504be 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -305,6 +305,15 @@ then
>    exit 1
>  fi
>  
> +# Container tests needing locale data should install them in-container.

Agreed. And any non-SUPPORTED locales can be built outside of the container
and then installed by the container script. We should try hard to make the
container tests look like normal installs.

> +# Other tests/binaries need to use locale data from the build tree.
> +if [ "$$CONTAINER" == false ]
> +then

> +  ENVVARS="GCONV_PATH=$${BUILD_DIR}/iconvdata $$ENVVARS"

OK.

> +  ENVVARS="LOCPATH=$${BUILD_DIR}/localedata $$ENVVARS"

OK.

> +  ENVVARS="LC_ALL=C $$ENVVARS"

OK.

> +fi
> +
>  # Expand environment setup command
>  if [ -v ENVVARS ]
>  then
> 


-- 
Cheers,
Carlos.



More information about the Libc-alpha mailing list