提交 d7b91c0b 编写于 作者: M Masami Hiramatsu 提交者: Shuah Khan

selftests/ftrace: Reset ftrace filter on older kernel

Since older kernel didn't support separated instance of
set_ftrace_filter, if the test case set the filter in
an instance, it will propagate to top-level instance.
This means that the filter setting remains even if we
remove the instance, and will cause other tests failure.
To avoid this issue, reset the ftrace filter if we
detect the propagation.
Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
上级 c3ca46ef
......@@ -82,7 +82,10 @@ rmdir foo
if [ -d foo ]; then
fail "foo still exists"
fi
if grep -q "schedule:enable_event:sched:sched_switch" ../set_ftrace_filter; then
echo "Older kernel detected. Cleanup filter"
echo '!schedule:enable_event:sched:sched_switch' > ../set_ftrace_filter
fi
instance_slam() {
while :; do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册