The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 1/2] selftests/ftrace: Force C locale for readelf in uprobe test
@ 2026-08-06  8:31 Rui Qi
  2026-08-06  8:31 ` [PATCH 2/2] selftests/ftrace: Convert ELF entry point to file offset " Rui Qi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Rui Qi @ 2026-08-06  8:31 UTC (permalink / raw)
  To: Steven Rostedt, Masami Hiramatsu, Mathieu Desnoyers, Shuah Khan
  Cc: Heiko Carstens, linux-trace-kernel, linux-kselftest, linux-kernel,
	Rui Qi

The add_remove_uprobe test parses the entry point from readelf -h output
by looking for the English "Entry" field. readelf output is localized
via gettext, while the ftracetest runner does not force LC_ALL=C and the
top-level Makefile leaves LANG effective for child processes.

If readelf prints a translated field name, ENTRYPOINT becomes empty and
the uprobe_events write is rejected because the offset after PATH: is
missing.

Run readelf with LC_ALL=C so the parsed header field remains stable
across locales.

Signed-off-by: Rui Qi <qirui.001@bytedance.com>
---
 .../selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc
index f2048c244526..f33a863be68b 100644
--- a/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc
+++ b/tools/testing/selftests/ftrace/test.d/dynevent/add_remove_uprobe.tc
@@ -12,7 +12,7 @@ echo 0 > events/enable
 echo > dynamic_events
 
 REALBIN=`readlink -f /bin/sh`
-ENTRYPOINT=`readelf -h ${REALBIN} | grep Entry | sed -e 's/[^0]*//'`
+ENTRYPOINT=`LC_ALL=C readelf -h ${REALBIN} | grep Entry | sed -e 's/[^0]*//'`
 
 echo "p:myevent ${REALBIN}:${ENTRYPOINT}" >> uprobe_events
 
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-08-07 10:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06  8:31 [PATCH 1/2] selftests/ftrace: Force C locale for readelf in uprobe test Rui Qi
2026-08-06  8:31 ` [PATCH 2/2] selftests/ftrace: Convert ELF entry point to file offset " Rui Qi
2026-08-07  1:47 ` [PATCH 1/2] selftests/ftrace: Force C locale for readelf " Masami Hiramatsu
2026-08-07  8:01   ` Rui Qi
2026-08-07  8:15 ` [PATCH v2 0/2] selftests/ftrace: Fix add_remove_uprobe robustness Rui Qi
2026-08-07  8:15   ` [PATCH v2 1/2] selftests/ftrace: Force C locale in ftracetest Rui Qi
2026-08-07  8:15   ` [PATCH v2 2/2] selftests/ftrace: Convert ELF entry point to file offset in uprobe test Rui Qi
2026-08-07 10:30     ` Masami Hiramatsu
2026-08-07 10:29   ` [PATCH v2 0/2] selftests/ftrace: Fix add_remove_uprobe robustness Masami Hiramatsu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox