* [PATCH] Set locale related environment variables in debugglibc.sh
@ 2020-09-23 16:06 Arjun Shankar
2020-09-24 1:54 ` Carlos O'Donell
2020-09-24 7:51 ` Andreas Schwab
0 siblings, 2 replies; 5+ messages in thread
From: Arjun Shankar @ 2020-09-23 16:06 UTC (permalink / raw)
To: libc-alpha; +Cc: Gabriel F. T. Gomes
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.
---
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.
+# Other tests/binaries need to use locale data from the build tree.
+if [ "$$CONTAINER" == false ]
+then
+ ENVVARS="GCONV_PATH=$${BUILD_DIR}/iconvdata $$ENVVARS"
+ ENVVARS="LOCPATH=$${BUILD_DIR}/localedata $$ENVVARS"
+ ENVVARS="LC_ALL=C $$ENVVARS"
+fi
+
# Expand environment setup command
if [ -v ENVVARS ]
then
--
2.26.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Set locale related environment variables in debugglibc.sh
2020-09-23 16:06 [PATCH] Set locale related environment variables in debugglibc.sh Arjun Shankar
@ 2020-09-24 1:54 ` Carlos O'Donell
2020-09-24 7:51 ` Andreas Schwab
1 sibling, 0 replies; 5+ messages in thread
From: Carlos O'Donell @ 2020-09-24 1:54 UTC (permalink / raw)
To: Arjun Shankar, libc-alpha; +Cc: Gabriel F. T. Gomes
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Set locale related environment variables in debugglibc.sh
2020-09-23 16:06 [PATCH] Set locale related environment variables in debugglibc.sh Arjun Shankar
2020-09-24 1:54 ` Carlos O'Donell
@ 2020-09-24 7:51 ` Andreas Schwab
2020-09-24 12:55 ` Arjun Shankar
1 sibling, 1 reply; 5+ messages in thread
From: Andreas Schwab @ 2020-09-24 7:51 UTC (permalink / raw)
To: Arjun Shankar; +Cc: libc-alpha, Gabriel F. T. Gomes
On Sep 23 2020, Arjun Shankar wrote:
> 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.
> +# Other tests/binaries need to use locale data from the build tree.
> +if [ "$$CONTAINER" == false ]
`==' is non-POSIX.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Set locale related environment variables in debugglibc.sh
2020-09-24 7:51 ` Andreas Schwab
@ 2020-09-24 12:55 ` Arjun Shankar
2020-09-25 3:18 ` Carlos O'Donell
0 siblings, 1 reply; 5+ messages in thread
From: Arjun Shankar @ 2020-09-24 12:55 UTC (permalink / raw)
To: Andreas Schwab; +Cc: libc-alpha, Gabriel F. T. Gomes
On Thu, Sep 24, 2020 at 09:51:11AM +0200, Andreas Schwab wrote:
> > +# Container tests needing locale data should install them in-container.
> > +# Other tests/binaries need to use locale data from the build tree.
> > +if [ "$$CONTAINER" == false ]
>
> `==' is non-POSIX.
Thanks, Andreas. I'll replace with `='.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Set locale related environment variables in debugglibc.sh
2020-09-24 12:55 ` Arjun Shankar
@ 2020-09-25 3:18 ` Carlos O'Donell
0 siblings, 0 replies; 5+ messages in thread
From: Carlos O'Donell @ 2020-09-25 3:18 UTC (permalink / raw)
To: Arjun Shankar, Andreas Schwab; +Cc: libc-alpha, Gabriel F. T. Gomes
On 9/24/20 8:55 AM, Arjun Shankar wrote:
> On Thu, Sep 24, 2020 at 09:51:11AM +0200, Andreas Schwab wrote:
>
>>> +# Container tests needing locale data should install them in-container.
>>> +# Other tests/binaries need to use locale data from the build tree.
>>> +if [ "$$CONTAINER" == false ]
>>
>> `==' is non-POSIX.
>
> Thanks, Andreas. I'll replace with `='.
The whole of debugglibc.sh is a bash script and as such may use bash
constructs, and indeed has other instances of '=='.
However, there is value in simplifying this to make it POSIX shell
compatible.
--
Cheers,
Carlos.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-25 3:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-23 16:06 [PATCH] Set locale related environment variables in debugglibc.sh Arjun Shankar
2020-09-24 1:54 ` Carlos O'Donell
2020-09-24 7:51 ` Andreas Schwab
2020-09-24 12:55 ` Arjun Shankar
2020-09-25 3:18 ` Carlos O'Donell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).