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

Petr Vorel pvorel@suse.cz
Fri Oct 21 13:26:05 CEST 2022


Hi Cyril,

> Hi!
> > > diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
> > > index 28b7d12ba..5ebbe1d25 100644
> > > --- a/testcases/lib/tst_test.sh
> > > +++ b/testcases/lib/tst_test.sh
> > > @@ -831,3 +831,5 @@ if [ -z "$TST_NO_DEFAULT_RUN" ]; then
> > >  		fi
> > >  	fi
> > >  fi
> > > +
> > > +export LC_ALL=C

> > Thinking about it twice this might have impact on other tests.
> > Li, Cyril, any idea about it?

> Actually I think that we should have put this into the tst_test.sh from
> the start. We do have this as a workaround in du01.sh and telnet01.sh
> already.

> The plus side is that all possible bugreports from users will have all
> messages in english which would make debugging easier.

Thanks for acking this.

I suppose Akihiko is correct that we don't have to put it via setlocale()
in C API, right?

Also I guess you prefer this version (LC_ALL=C). I suggested unset LC_ALL;
export LC_COLLATE=C; export LC_NUMERIC=C as it's used in kernel's Makefile (they
have more there, but IMHO only this is relevant for us).

Kind regards,
Petr


More information about the ltp mailing list