Input: wm97xx: add new AC97 bus support
[sfrench/cifs-2.6.git] / tools / testing / selftests / ftrace / test.d / kprobe / kprobe_module.tc
1 #!/bin/sh
2 # description: Kprobe dynamic event - probing module
3
4 [ -f kprobe_events ] || exit_unsupported # this is configurable
5
6 disable_events
7 echo > kprobe_events
8
9 :;: "Add an event on a module function without specifying event name" ;:
10
11 MOD=`lsmod | head -n 2 | tail -n 1 | cut -f1 -d" "`
12 FUNC=`grep -m 1 ".* t .*\\[$MOD\\]" /proc/kallsyms | xargs | cut -f3 -d" "`
13 [ "x" != "x$MOD" -a "y" != "y$FUNC" ] || exit_unresolved
14 echo "p $MOD:$FUNC" > kprobe_events
15 PROBE_NAME=`echo $MOD:$FUNC | tr ".:" "_"`
16 test -d events/kprobes/p_${PROBE_NAME}_0 || exit_failure
17
18 :;: "Add an event on a module function with new event name" ;:
19
20 echo "p:event1 $MOD:$FUNC" > kprobe_events
21 test -d events/kprobes/event1 || exit_failure
22
23 :;: "Add an event on a module function with new event and group name" ;:
24
25 echo "p:kprobes1/event1 $MOD:$FUNC" > kprobe_events
26 test -d events/kprobes1/event1 || exit_failure
27
28 echo > kprobe_events