bug#80674: DejaGNU vs. Tcl 9
Jacob Bachmeyer <[email protected]> Thu, 2 Apr 2026 22:37:04 -0500
| Newsgroups | gmane.comp.sysutils.dejagnu.bugs |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============8702519042759177335==
Content-Type: multipart/alternative;
boundary="------------i2Ion0OBcb4xZWeEgrbJ8SkM"
Content-Language: en-US
This is a multi-part message in MIME format.
--------------i2Ion0OBcb4xZWeEgrbJ8SkM
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
On 4/2/26 07:14, Jakub Jelinek wrote:
> On Sat, Mar 28, 2026 at 10:05:24PM -0500, Jacob Bachmeyer wrote:
>> [...]
>>> Note, I believe at least in GCC testsuite after the posted patches (i.e.
>>> case -> switch and -encoding binary to -translation binary) all that is
>>> needed is to run the testsuite under LC_ALL=C and then it works with both
>>> tcl8 and tcl9.
>> I have long had an item on my TODO list to unset CDPATH and neutralize the
>> other "Special Shell Variables" described in the Autoconf manual.
>>
>> In Tcl, {unset ::env(CDPATH)} always works---there is no portability issue
>> there. On the other hand, this looks like we may need LC_* set to "C" when
>> the Tcl interpreter is started.
>>
>> Fortunately, DejaGnu has exactly an opportunity to do that: runtest(1) is
>> actually a shell script that locates expect(1) and runtest.exp and spawns
>> expect to run the framework and testsuite. Should LC_ALL and friends be set
>> to "C" and exported in that shell script?
> I think that would be nice, but wonder about gdb, whether its testsuite
> doesn't say test translated messages etc. CCing some gdb folks.
A test that wants to check translated messages would need to set the
locale correctly in its environment prior to invoking the program under
test to ensure the expected translation will be used instead of the
user's own language.
POSIX says [*1] that LC_ALL overrides LANG and all other LC_* variables
if set, so it looks like we need only ensure that LC_ALL is set before
invoking Expect to run the framework.
POSIX also says [*2] that the "C" locale and the "POSIX" locale are
equivalent and both are "the POSIX locale" and identical.
*1:<URL:https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_02>
*2:<URL:https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_02>
-- Jacob
--------------i2Ion0OBcb4xZWeEgrbJ8SkM
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 4/2/26 07:14, Jakub Jelinek wrote:<br>
</div>
<blockquote type="cite" cite="mid:ac5dsLEQh-kWgWJW@tucnak">
<pre wrap="" class="moz-quote-pre">On Sat, Mar 28, 2026 at 10:05:24PM -0500, Jacob Bachmeyer wrote:
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">[...]</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">Note, I believe at least in GCC testsuite after the posted patches (i.e.
case -> switch and -encoding binary to -translation binary) all that is
needed is to run the testsuite under LC_ALL=C and then it works with both
tcl8 and tcl9.
</pre>
</blockquote>
<pre wrap="" class="moz-quote-pre">
I have long had an item on my TODO list to unset CDPATH and neutralize the
other "Special Shell Variables" described in the Autoconf manual.
In Tcl, {unset ::env(CDPATH)} always works---there is no portability issue
there. On the other hand, this looks like we may need LC_* set to "C" when
the Tcl interpreter is started.
Fortunately, DejaGnu has exactly an opportunity to do that: runtest(1) is
actually a shell script that locates expect(1) and runtest.exp and spawns
expect to run the framework and testsuite. Should LC_ALL and friends be set
to "C" and exported in that shell script?
</pre>
</blockquote>
<pre wrap="" class="moz-quote-pre">
I think that would be nice, but wonder about gdb, whether its testsuite
doesn't say test translated messages etc. CCing some gdb folks.</pre>
</blockquote>
<p>A test that wants to check translated messages would need to set
the locale correctly in its environment prior to invoking the
program under test to ensure the expected translation will be used
instead of the user's own language.</p>
<p>POSIX says [*1] that LC_ALL overrides LANG and all other LC_*
variables if set, so it looks like we need only ensure that LC_ALL
is set before invoking Expect to run the framework.</p>
<p>POSIX also says [*2] that the "C" locale and the "POSIX" locale
are equivalent and both are "the POSIX locale" and identical.</p>
<pre>*1: <a class="moz-txt-link-rfc1738" href="https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_02"><URL:https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_02></a>
*2: <a class="moz-txt-link-rfc1738" href="https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_02"><URL:https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_02></a></pre>
<p><br>
</p>
<p>-- Jacob</p>
</body>
</html>
--------------i2Ion0OBcb4xZWeEgrbJ8SkM--
--===============8702519042759177335==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KQnVnLWRlamFn
bnUgbWFpbGluZyBsaXN0CkJ1Zy1kZWphZ251QGdudS5vcmcKaHR0cHM6Ly9saXN0cy5nbnUub3Jn
L21haWxtYW4vbGlzdGluZm8vYnVnLWRlamFnbnUK
--===============8702519042759177335==--