mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
selftests/ftrace: Force C locale in ftracetest
Some ftracetest test cases parse command output by matching English field names. Tools such as readelf may localize their output via gettext, while ftracetest currently inherits the user locale from the environment. If a translated field name is printed, parsing can fail even though the tested kernel behavior is unchanged. For example, add_remove_uprobe can fail to find the ELF entry point and then write a uprobe event with a missing offset. Export LC_ALL=C in the top-level ftracetest runner so every test case gets stable command output by default. Link: https://lore.kernel.org/all/20260807081512.2974757-2-qirui.001@bytedance.com/ Signed-off-by: Rui Qi <qirui.001@bytedance.com> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
This commit is contained in:
parent
c00e735410
commit
c13fcd3951
|
|
@ -7,6 +7,9 @@
|
|||
# Written by Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
|
||||
#
|
||||
|
||||
# Keep command output parsing stable regardless of the user's locale.
|
||||
export LC_ALL=C
|
||||
|
||||
usage() { # errno [message]
|
||||
[ ! -z "$2" ] && echo $2
|
||||
echo "Usage: ftracetest [options] [testcase(s)] [testcase-directory(s)]"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user