bug#80674: DejaGNU vs. Tcl 9

Fred Wright <[email protected]> Tue, 31 Mar 2026 15:14:56 -0700 (PDT)
Newsgroups gmane.comp.sysutils.dejagnu.bugs
Message-ID <[email protected]>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-1314413334-1774995296=:2299
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8BIT


On Sat, 28 Mar 2026, Jacob Bachmeyer wrote:

> 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 am inclined to do this on principle anyway:  testsuite results should not 
> be sensitive to the user's locale.  The question is only whether to do it in 
> the Tcl code or in the launcher script.

Indeed locale issues can cause subtle problems.  I once spent considerable 
time tearing my hair out over why two apparently identical strings were 
failing to compare as equal.  It was only when I looked *really* closely 
that I noticed that the comparison string had ASCII single quotes while 
the gcc message had directional single quotes.  And then *after* this I 
found the gcc documentation that said that any code expecting to do 
comparisons on gcc messages should run it with LC_ALL=C, to avoid 
localized messages.  This began in gcc 4.0, so it's nothing new.

Fred Wright
--0-1314413334-1774995296=:2299
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KQnVnLWRlamFn
bnUgbWFpbGluZyBsaXN0CkJ1Zy1kZWphZ251QGdudS5vcmcKaHR0cHM6Ly9saXN0cy5nbnUub3Jn
L21haWxtYW4vbGlzdGluZm8vYnVnLWRlamFnbnUK

--0-1314413334-1774995296=:2299--