[LTP] [PATCH v3] tst_test.sh: Normalize the locale

Richard Palethorpe rpalethorpe@suse.de
Mon Nov 7 11:27:23 CET 2022


Hello,

Cyril Hrubis <chrubis@suse.cz> writes:

> Hi!
>> Yep. I thought more about pure C API programs. Mostly they don't have any locale
>> related code, but sometimes they call other programs via shell (e.g.
>> tst_system(), but there are more).
>>
>> I also aimed for consistency between C and shell API.
>> That's why I thought we should consider setlocale() on LC_ALL and LANG in
>> lib/tst_test.c. But maybe I'm wrong.
>
> I do not think that we need to call setlocale() in tst_test.c we do not
> have any support for locales there anyways.
>
> As for any programs executed from these as long as environment is
> propagated correctly the locale would be set to C once the corresponding
> program calls setlocale() in main().
>
> -- 
> Cyril Hrubis
> chrubis@suse.cz

Well I see no argument against setting the locale to C. So I have merged
it.

-- 
Thank you,
Richard.


More information about the ltp mailing list