Re: [ping] [PATCH] Different outputs affected by locale

Yao Qi
2014-06-05T09:58:57Z

On 06/05/2014 04:58 PM, Pedro Alves wrote:
>> This is a not a mingw issue nor a remote host testing issue.
> But that's a conflicting answer. It's a remote host testing
> if this only triggers with remote host testing.
>

OK, it is a remote host testing issue, since LC_CTYPE is set on build
only.

>> > If the
>> > LC_CTYPE isn't set properly on host, these tests will fail, even in the
>> > native testing.
> Sure, but it's supposed to be set, and then tests can assume so.
> If not set in some circumstance, then it's a bug in the test
> infrustruture, not the test. For native testing, those are
> set by gdb.exp:gdb_init.
>
>> >
>>> >> ssh)? Is LC_CTYPE really being propagated to the host?
>> >
>> > No, setting env variables on host or target in dejagnu isn't trivial to
>> > me.
> They need to be passed down explicitly in the ssh command line:
>
> $ ssh localhost "FOO=1 env | grep FOO"
> FOO=1
>

Yes, it is simple to pass env variable through ssh, but isn't trivial to
pass env variable to host or target in dejagnu, because,

- ssh is not the only connection dejagnu supports, how about telnet?
- env variable should bind to board. host and target can have
different env vars.

I saw Jie's patch to set env var on target
http://lists.gnu.org/archive/html/dejagnu/2008-07/msg00000.html
but we need do more than that, IMO. That is the reason I am inclined to
fix the test case instead of the infrastructure (dejagnu).

>> >
>>> >> Does testing GDB manually directly on a Windows console show the same
>>> >> issue?
>> >
>> > Yes, here is the output I got on Windows 7 (running gdb.exe in Windows console).
>> > However, I didn't investigate why 'Ã³' is printed.
> But was that with LC_CTYPE set to C?

I don't know how check LC_CTYPE on Windows. :(

--
Yao (é½å°§)