Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1676723

Re: [PATCH] selftests: ftrace: Use md5sum to take less time of checking logs

From Shuah Khan <shuah@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] selftests: ftrace: Use md5sum to take less time of checking logs
Date 2017-06-28 16:40 +0200
Message-ID <tXmil-7Xs-9@gated-at.bofh.it> (permalink)
References <tWVUS-7zY-27@gated-at.bofh.it> <tXlZ0-7Qx-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 06/28/2017 08:17 AM, Steven Rostedt wrote:
> On Tue, 27 Jun 2017 19:28:32 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
>> 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.
> 
> How much faster is md5sum? I can see this causing issues in other
> environments.
> 
> -- Steve

Sorry Steve. I pulled this into linux-ksefltest next. Are you concerned
about any specific environments? I can try this out and see if it is a
problem.

thanks,
-- Shuah

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] selftests: ftrace: Use md5sum to take less time of checking logs Masami Hiramatsu <mhiramat@kernel.org> - 2017-06-27 12:30 +0200
  Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Shuah Khan <shuah@kernel.org> - 2017-06-28 16:10 +0200
  Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Steven Rostedt <rostedt@goodmis.org> - 2017-06-28 16:20 +0200
    Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Shuah Khan <shuah@kernel.org> - 2017-06-28 16:40 +0200
      Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Steven Rostedt <rostedt@goodmis.org> - 2017-06-28 17:00 +0200
        Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Shuah Khan <shuah@kernel.org> - 2017-06-28 17:40 +0200
          Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Shuah Khan <shuah@kernel.org> - 2017-06-29 22:30 +0200
            Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Steven Rostedt <rostedt@goodmis.org> - 2017-06-30 17:00 +0200
              Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Shuah Khan <shuah@kernel.org> - 2017-06-30 19:00 +0200
                Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Masami Hiramatsu <mhiramat@kernel.org> - 2017-07-03 06:20 +0200
  Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Denys Vlasenko <vda.linux@googlemail.com> - 2017-06-30 21:00 +0200
    Re: [PATCH] selftests: ftrace: Use md5sum to take less time of  checking logs Steven Rostedt <rostedt@goodmis.org> - 2017-06-30 21:10 +0200

csiph-web