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 <mhiramat@kernel.org>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
This commit is contained in:
Masami Hiramatsu 2017-06-27 19:28:32 +09:00 коммит произвёл Shuah Khan
Родитель d644437a1d
Коммит d87b29179a
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -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