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

Cyril Hrubis chrubis@suse.cz
Fri Oct 21 15:24:28 CEST 2022


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


More information about the ltp mailing list