2 # SPDX-License-Identifier: GPL-2.0
3 # description: Test creation and deletion of trace instances while setting an event
15 # we don't want to fail on error
22 if [ $result -ne 0 ]; then
23 echo "instance rmdir not supported"
29 mkdir foo
2> /dev
/null
30 rmdir foo
2> /dev
/null
36 cat foo
/trace
1> /dev
/null
2>&1
42 echo 1 > foo
/events
/sched
/sched_switch
/enable
64 echo "Wait for processes to finish"
66 echo "all processes finished, wait for cleanup"
73 fail
"foo still exists"
77 echo "schedule:enable_event:sched:sched_switch" > foo
/set_ftrace_filter
80 fail
"foo still exists"
82 if grep -q "schedule:enable_event:sched:sched_switch" ..
/set_ftrace_filter
; then
83 echo "Older kernel detected. Cleanup filter"
84 echo '!schedule:enable_event:sched:sched_switch' > ..
/set_ftrace_filter
127 echo "Wait for processes to finish"
128 wait $p1 $p2 $p3 $p4 $p5
129 echo "all processes finished, wait for cleanup"
136 fail
"instance $d still exists"