All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests: ftrace: Use md5sum to take less time of checking logs
@ 2017-06-27 10:28 Masami Hiramatsu
  2017-06-28 14:00 ` Shuah Khan
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Masami Hiramatsu @ 2017-06-27 10:28 UTC (permalink / raw)
  To: linux-kselftest, shuah, Steven Rostedt
  Cc: mhiramat, Ingo Molnar, linux-kernel

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>
---
 .../test.d/ftrace/func_traceonoff_triggers.tc      |    6 +++---
 1 file 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 9cf3852..7a9ab4f 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
 

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-07-03  4:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 10:28 [PATCH] selftests: ftrace: Use md5sum to take less time of checking logs Masami Hiramatsu
2017-06-28 14:00 ` Shuah Khan
2017-06-28 14:17 ` Steven Rostedt
2017-06-28 14:30   ` Shuah Khan
2017-06-28 14:59     ` Steven Rostedt
2017-06-28 15:30       ` Shuah Khan
2017-06-29 20:21         ` Shuah Khan
2017-06-30 14:49           ` Steven Rostedt
2017-06-30 16:53             ` Shuah Khan
2017-07-03  4:19               ` Masami Hiramatsu
2017-06-30 18:50 ` Denys Vlasenko
2017-06-30 19:03   ` Steven Rostedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.