From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
To: khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH vz10 2/2] selftests/ftrace: skip gcov symbols when picking a function to probe
Date: Wed, 9 Sep 2026 00:31:48 +0300 [thread overview]
Message-ID: <20260908213150.2677032-2-eva.kurchatova@virtuozzo.com> (raw)
In-Reply-To: <20260908213150.2677032-1-eva.kurchatova@virtuozzo.com>
kprobe_eventname.tc takes the last kallsyms entry whose name ends in
vfs_read and puts a probe on it. On a kernel built with
CONFIG_GCOV_PROFILE_ALL=y the counter symbol gcc emits for the function
sorts after it:
ffffffff819bd1e0 T vfs_read
ffffffff845013e0 t __gcov_.vfs_read
so the test picks __gcov_.vfs_read, which is not a function entry, and
the write fails:
kprobe_eventname.tc: line 10: echo: write error: Invalid argument
Leave those symbols out of the choice. The test then picks vfs_read and
passes; without a coverage build nothing changes, as no such symbol
exists there.
This is the same class of problem as commit 23a4b108accc
("tracing/selftests: Fix kprobe event name test for .isra. functions"),
where a compiler-generated symbol was picked instead of a real function.
https://virtuozzo.atlassian.net/browse/VSTOR-144622
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
.../testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
index ba19b81cef39..0688a5c47d1e 100644
--- a/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
+++ b/tools/testing/selftests/ftrace/test.d/kprobe/kprobe_eventname.tc
@@ -5,7 +5,7 @@
:;: "Add an event on function without name" ;:
-FUNC=`grep " [tT] .*vfs_read$" /proc/kallsyms | tail -n 1 | cut -f 3 -d " "`
+FUNC=`grep " [tT] .*vfs_read$" /proc/kallsyms | grep -v __gcov | tail -n 1 | cut -f 3 -d " "`
[ "x" != "x$FUNC" ] || exit_unresolved
echo "p $FUNC" > kprobe_events
PROBE_NAME=`echo $FUNC | tr ".:" "_"`
--
2.55.0
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel
next prev parent reply other threads:[~2026-09-08 21:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 21:31 [Devel] [PATCH vz10 1/2] ms/selftests/tracing: Fix false failure of subsystem event test Eva Kurchatova
2026-09-08 21:31 ` Eva Kurchatova [this message]
2026-09-23 19:30 ` Konstantin Khorenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260908213150.2677032-2-eva.kurchatova@virtuozzo.com \
--to=eva.kurchatova@virtuozzo.com \
--cc=devel@openvz.org \
--cc=khorenko@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.