]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
selftests: ftrace: Use md5sum to take less time of checking logs
authorMasami Hiramatsu <mhiramat@kernel.org>
Tue, 27 Jun 2017 10:28:32 +0000 (19:28 +0900)
committerShuah Khan <shuahkh@osg.samsung.com>
Fri, 30 Jun 2017 16:06:02 +0000 (10:06 -0600)
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>
tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc

index 9cf385297c1a56df332c9b68d65cb0aa858774ed..7a9ab4ff83b6fc27a78a4fde2b0a2c54855e9ab8 100644 (file)
@@ -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