public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/ftrace: Drop invalid top-level local in test_ownership
@ 2026-04-07 10:26 CaoRuichuang
  2026-04-08  0:37 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: CaoRuichuang @ 2026-04-07 10:26 UTC (permalink / raw)
  To: rostedt, mhiramat, mathieu.desnoyers, shuah
  Cc: linux-kernel, linux-trace-kernel, linux-kselftest, Cao Ruichuang

From: Cao Ruichuang <create0818@163.com>

test_ownership.tc is sourced by ftracetest under /bin/sh.

The script currently declares mount_point with local at file scope,
which makes /bin/sh abort with "local: not in a function" before the
test can reach the eventfs ownership checks.

Replace the top-level local declaration with a normal shell variable so
kernels that support the gid= tracefs mount option can run the test at
all.

Signed-off-by: Cao Ruichuang <create0818@163.com>
---
 tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc b/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc
index e71cc3ad0..6d00d3c0f 100644
--- a/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc
+++ b/tools/testing/selftests/ftrace/test.d/00basic/test_ownership.tc
@@ -6,7 +6,7 @@
 original_group=`stat -c "%g" .`
 original_owner=`stat -c "%u" .`
 
-local mount_point=$(get_mount_point)
+mount_point=$(get_mount_point)
 
 mount_options=$(get_mnt_options "$mount_point")
 
-- 
2.39.5 (Apple Git-154)


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

end of thread, other threads:[~2026-04-08  0:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 10:26 [PATCH] selftests/ftrace: Drop invalid top-level local in test_ownership CaoRuichuang
2026-04-08  0:37 ` Steven Rostedt

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