From: Masami Hiramatsu Date: Tue, 27 Jun 2017 10:28:32 +0000 (+0900) Subject: selftests: ftrace: Use md5sum to take less time of checking logs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d87b29179aa00efe15c88eebbcb88819e87e7f2a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git selftests: ftrace: Use md5sum to take less time of checking logs Use md5sum so that it takes less time of checking trace logs update. Since busybox tail/cat takes too long time to read the trace log, this uses md5sum to check whether trace log is updated or not. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt (VMware) Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc index 9cf385297c1a..7a9ab4ff83b6 100644 --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc @@ -103,11 +103,11 @@ if [ $on != "0" ]; then fail "Tracing is not off" fi -line1=`cat trace | tail -1` +csum1=`md5sum trace` sleep $SLEEP_TIME -line2=`cat trace | tail -1` +csum2=`md5sum trace` -if [ "$line1" != "$line2" ]; then +if [ "$csum1" != "$csum2" ]; then fail "Tracing file is still changing" fi