Skip to content

Commit 2fd3ef1

Browse files
mhiramatshuahkh
authored andcommitted
selftests/ftrace: Fix BTFARG testcase to check fprobe is enabled correctly
Since the dynevent/add_remove_btfarg.tc test case forgets to ensure that fprobe is enabled for some structure field access tests which uses the fprobe, it fails if CONFIG_FPROBE=n or CONFIG_FPROBE_EVENTS=n. Fixes it to ensure the fprobe events are supported. Fixes: d892d3d ("selftests/ftrace: Add BTF fields access testcases") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent b0df306 commit 2fd3ef1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/ftrace/test.d/dynevent/add_remove_btfarg.tc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fi
5353

5454
echo > dynamic_events
5555

56-
if [ "$FIELDS" ] ; then
56+
if [ "$FIELDS" -a "$FPROBES" ] ; then
5757
echo "t:tpevent ${TP2} obj_size=s->object_size" >> dynamic_events
5858
echo "f:fpevent ${TP3}%return path=\$retval->name:string" >> dynamic_events
5959
echo "t:tpevent2 ${TP4} p->se.group_node.next->prev" >> dynamic_events

0 commit comments

Comments
 (0)