Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 044ede4c authored by Yipeng Zou's avatar Yipeng Zou Committed by Greg Kroah-Hartman
Browse files

selftests/ftrace: event_triggers: wait longer for test_event_enable



[ Upstream commit a1d6cd88c8973cfb08ee85722488b1d6d5d16327 ]

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: 43bb45da ("selftests: ftrace: Add a selftest to test event enable/disable func trigger")
Signed-off-by: default avatarYipeng Zou <zouyipeng@huawei.com>
Acked-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Acked-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8511186f
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -42,11 +42,18 @@ cnt_trace() {

test_event_enabled() {
    val=$1
    check_times=10		# wait for 10 * SLEEP_TIME at most

    while [ $check_times -ne 0 ]; do
	e=`cat $EVENT_ENABLE`
    if [ "$e" != $val ]; then
	fail "Expected $val but found $e"
	if [ "$e" == $val ]; then
	    return 0
	fi
	sleep $SLEEP_TIME
	check_times=$((check_times - 1))
    done

    fail "Expected $val but found $e"
}

run_enable_disable() {