| .. | .. |
|---|
| 2 | 2 | # SPDX-License-Identifier: GPL-2.0 |
|---|
| 3 | 3 | # description: ftrace - test reading of set_ftrace_filter |
|---|
| 4 | 4 | # |
|---|
| 5 | +# The triggers are set within the set_ftrace_filter file |
|---|
| 6 | +# requires: set_ftrace_filter |
|---|
| 7 | +# |
|---|
| 5 | 8 | # The set_ftrace_filter file of ftrace is used to list functions as well as |
|---|
| 6 | 9 | # triggers (probes) attached to functions. The code to read this file is not |
|---|
| 7 | 10 | # straight forward and has had various bugs in the past. This test is designed |
|---|
| .. | .. |
|---|
| 9 | 12 | # file in various ways (cat vs dd). |
|---|
| 10 | 13 | # |
|---|
| 11 | 14 | |
|---|
| 12 | | -# The triggers are set within the set_ftrace_filter file |
|---|
| 13 | | -if [ ! -f set_ftrace_filter ]; then |
|---|
| 14 | | - echo "set_ftrace_filter not found? Is dynamic ftrace not set?" |
|---|
| 15 | | - exit_unsupported |
|---|
| 16 | | -fi |
|---|
| 17 | | - |
|---|
| 18 | | -do_reset() { |
|---|
| 19 | | - reset_tracer |
|---|
| 20 | | - reset_ftrace_filter |
|---|
| 21 | | - disable_events |
|---|
| 22 | | - clear_trace |
|---|
| 23 | | - enable_tracing |
|---|
| 24 | | -} |
|---|
| 25 | | - |
|---|
| 26 | 15 | fail() { # mesg |
|---|
| 27 | | - do_reset |
|---|
| 28 | 16 | echo $1 |
|---|
| 29 | 17 | exit_fail |
|---|
| 30 | 18 | } |
|---|
| 31 | | - |
|---|
| 32 | | -do_reset |
|---|
| 33 | 19 | |
|---|
| 34 | 20 | FILTER=set_ftrace_filter |
|---|
| 35 | 21 | FUNC1="schedule" |
|---|
| .. | .. |
|---|
| 164 | 150 | |
|---|
| 165 | 151 | rm $TMPDIR/expected |
|---|
| 166 | 152 | rm $TMPDIR/actual |
|---|
| 167 | | - |
|---|
| 168 | | -do_reset |
|---|
| 169 | 153 | |
|---|
| 170 | 154 | exit 0 |
|---|