selftests/ftrace: event_triggers: wait longer for test_event_enable

In some platform, the schedule event may came slowly, delay 100ms can't
cover it.

I was notice that on my board which running in low cpu_freq,and this
selftests allways gose fail.

So maybe we can check more times here to wait longer.

Fixes: 43bb45da82 ("selftests: ftrace: Add a selftest to test event enable/disable func trigger")
Signed-off-by: Yipeng Zou <zouyipeng@huawei.com>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
Yipeng Zou 2022-11-04 10:09:31 +08:00 коммит произвёл Shuah Khan
Родитель d942f231af
Коммит a1d6cd88c8
1 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -38,11 +38,18 @@ cnt_trace() {
test_event_enabled() { test_event_enabled() {
val=$1 val=$1
check_times=10 # wait for 10 * SLEEP_TIME at most
e=`cat $EVENT_ENABLE` while [ $check_times -ne 0 ]; do
if [ "$e" != $val ]; then e=`cat $EVENT_ENABLE`
fail "Expected $val but found $e" if [ "$e" == $val ]; then
fi return 0
fi
sleep $SLEEP_TIME
check_times=$((check_times - 1))
done
fail "Expected $val but found $e"
} }
run_enable_disable() { run_enable_disable() {