linux-hardened/tools/testing/selftests
Steven Rostedt (VMware) 0787ce3360 selftests/ftrace: Have reset_ftrace_filter handle multiple instances
If a probe is attached to a static function that is in multiple files with
the same name, removing it by name will remove all instances:

 # grep jump_label_unlock set_ftrace_filter
jump_label_unlock:traceoff:unlimited
jump_label_unlock:traceoff:unlimited

 # echo '!jump_label_unlock:traceoff' >> set_ftrace_filter
 # grep jump_label_unlock set_ftrace_filter
 #

But the loop in reset_ftrace_filter will try to remove multiple instances
multiple times. If this happens the second time will error and cause the
test to fail.

At each iteration of the loop, check to see if the probe being removed still
exists.

Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
2018-02-08 10:13:17 -05:00
..
android
bpf bpf: mark dst unknown on inconsistent {s, u}bounds adjustments 2018-01-17 16:23:17 -08:00
breakpoints
capabilities
cpu-hotplug
cpufreq
drivers/gpu
efivarfs
exec
filesystems
firmware
ftrace selftests/ftrace: Have reset_ftrace_filter handle multiple instances 2018-02-08 10:13:17 -05:00
futex
gpio
ia64
intel_pstate
ipc
kcmp
kmod
lib
locking
media_tests
membarrier
memfd
memory-hotplug
mount
mqueue
net
networking/timestamping
nsfs
ntb
powerpc
prctl
pstore
ptp
ptrace
rcutorture
seccomp
sigaltstack
size
splice
static_keys
sync
sysctl
tc-testing
timers
user
vDSO
vm
watchdog
x86
zram
.gitignore
gen_kselftest_tar.sh
kselftest.h
kselftest_harness.h
kselftest_install.sh
lib.mk
Makefile