summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2017-06-27 19:28:32 +0900
committerShuah Khan <shuahkh@osg.samsung.com>2017-06-30 10:06:02 -0600
commitd87b29179aa00efe15c88eebbcb88819e87e7f2a (patch)
tree4d257a8bf2e9f5acd5a1a79f66aa2141d4e7bdb5 /tools
parentd644437a1dc6226afb7b8a814657961d8812f763 (diff)
downloadlinux-stable-d87b29179aa00efe15c88eebbcb88819e87e7f2a.tar.gz
linux-stable-d87b29179aa00efe15c88eebbcb88819e87e7f2a.tar.bz2
linux-stable-d87b29179aa00efe15c88eebbcb88819e87e7f2a.zip
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/ftrace/test.d/ftrace/func_traceonoff_triggers.tc6
1 files changed, 3 insertions, 3 deletions
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