diff options
| author | Ian Rogers <irogers@google.com> | 2026-09-28 11:05:32 -0700 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2026-09-29 20:49:34 +0200 |
| commit | 7619d7e8d2a79a587d7f3bf0fc31e15e75bd4f96 (patch) | |
| tree | ed0a447ab3f1d68f28493294baa0c6f1b7daed6a /tools/perf/tests/shell | |
| parent | 8a0b9c9ff582258aafc6d6c8fe3fb104d9686a7b (diff) | |
perf test probe_vfs_getname: Also look for the probe line in do_getname()
Since commit 9fa3ec84587c ("allow incomplete imports of filenames"), in
v7.0, getname_flags() only calls do_getname(). None of the lines the
vfs_getname tests search for are in getname_flags() any more, so the
tests always skip. Fall back to the initname() call in do_getname().
Assisted-by: Antigravity:gemini-3.1-pro
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/shell')
| -rw-r--r-- | tools/perf/tests/shell/lib/probe_vfs_getname.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/perf/tests/shell/lib/probe_vfs_getname.sh b/tools/perf/tests/shell/lib/probe_vfs_getname.sh index 88cd0e26d5f6..a4230a83bcae 100644 --- a/tools/perf/tests/shell/lib/probe_vfs_getname.sh +++ b/tools/perf/tests/shell/lib/probe_vfs_getname.sh @@ -13,6 +13,7 @@ cleanup_probe_vfs_getname() { add_probe_vfs_getname() { add_probe_verbose=$1 if [ $had_vfs_getname -eq 1 ] ; then + local func=getname_flags result_initname_re="[[:space:]]+([[:digit:]]+)[[:space:]]+initname.*" line=$(perf probe -L getname_flags 2>&1 | grep -E "$result_initname_re" | sed -r "s/$result_initname_re/\1/") @@ -28,13 +29,20 @@ add_probe_vfs_getname() { line=$(perf probe -L getname_flags 2>&1 | grep -E "$result_aname_re" | sed -r "s/$result_aname_re/\1/") fi + # Since v7.0 getname_flags() is a wrapper around do_getname(). + if [ -z "$line" ] ; then + func=do_getname + line=$(perf probe -L $func 2>&1 | grep -E "$result_initname_re" | + sed -r "s/$result_initname_re/\1/") + fi + if [ -z "$line" ] ; then echo "Could not find probeable line" return 2 fi - perf probe -q "vfs_getname=getname_flags:${line} pathname=result->name:string" || \ - perf probe $add_probe_verbose "vfs_getname=getname_flags:${line} pathname=filename:ustring" || return 1 + perf probe -q "vfs_getname=${func}:${line} pathname=result->name:string" || \ + perf probe $add_probe_verbose "vfs_getname=${func}:${line} pathname=filename:ustring" || return 1 fi } |
