mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
selftests/ftrace: event_triggers: wait longer for test_event_enable
[ Upstream commita1d6cd88c8
] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
3b62d3b511
commit
a918fc5e80
1 changed files with 11 additions and 4 deletions
|
@ -38,11 +38,18 @@ cnt_trace() {
|
|||
|
||||
test_event_enabled() {
|
||||
val=$1
|
||||
check_times=10 # wait for 10 * SLEEP_TIME at most
|
||||
|
||||
e=`cat $EVENT_ENABLE`
|
||||
if [ "$e" != $val ]; then
|
||||
fail "Expected $val but found $e"
|
||||
fi
|
||||
while [ $check_times -ne 0 ]; do
|
||||
e=`cat $EVENT_ENABLE`
|
||||
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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue