Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752376AbdF1Oap (ORCPT ); Wed, 28 Jun 2017 10:30:45 -0400 Received: from resqmta-po-12v.sys.comcast.net ([96.114.154.171]:38618 "EHLO resqmta-po-12v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752056AbdF1Oag (ORCPT ); Wed, 28 Jun 2017 10:30:36 -0400 Reply-To: shuah@kernel.org Subject: Re: [PATCH] selftests: ftrace: Use md5sum to take less time of checking logs To: Steven Rostedt , Masami Hiramatsu Cc: linux-kselftest@vger.kernel.org, Ingo Molnar , linux-kernel@vger.kernel.org, Shuah Khan References: <149855930170.10335.7114289594738299220.stgit@devbox> <20170628101728.5a41bed0@gandalf.local.home> From: Shuah Khan Message-ID: <8f6497e7-8236-f0e0-0f51-87d691b9df8b@kernel.org> Date: Wed, 28 Jun 2017 08:30:24 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170628101728.5a41bed0@gandalf.local.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfJEvr1PCVgBLutJl8mYzoFcNF621eM0DNRQ9ddcJ3igtaAM7a+uGSVpWC1CrD4p4chH3E+Z+MgVjJU27mmX5BcZjYKOFcFhCaz23fZYuwtjDFJOswNga UMQXk258V++wW7T2gd2H7/7+B5TFNvQg650wurOYy3lc/uFRnx3+QYLzOlK+LHVmduP2RjhupCKW3S+03ibIDTipn/FwzTpGZ/yLPEVcMufBckH6VG2nsYG/ hEXLtdnx80J2ZHioxOB4uHtxZCxWzpXNbaxrh0AOd3N46FtzTh+3tuQwo6AXohB04UmCSDI9sveI3xz5klGZPzXRbfDRMDhXFE7JKY2mFwI= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1551 Lines: 50 On 06/28/2017 08:17 AM, Steven Rostedt wrote: > On Tue, 27 Jun 2017 19:28:32 +0900 > Masami Hiramatsu 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 >> --- >> .../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 >> > > >