lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181016113952.59893943@gandalf.local.home>
Date:   Tue, 16 Oct 2018 11:39:52 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     Shuah Khan <shuah@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
        Shuah Khan <shuahkh@....samsung.com>
Subject: Re: [PATCH] selftests/ftrace: Add color to the PASS / FAIL results

On Wed, 17 Oct 2018 00:26:32 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:

> On Mon, 15 Oct 2018 23:42:31 +0900
> Masami Hiramatsu <mhiramat@...nel.org> wrote:
> 
> > On Fri, 12 Oct 2018 22:21:06 -0400
> > Steven Rostedt <rostedt@...dmis.org> wrote:
> >   
> > > From: Steven Rostedt (VMware) <rostedt@...dmis.org>
> > > 
> > > Now that ftracetest has over 80 tests, it is difficult to simply scroll
> > > up the console window to find the failed tests when it reports just two
> > > tests have failed. In order to make this stand out better, have the
> > > color of the word "PASS" be green, "FAIL" and "XFAIL" be red, and all
> > > other results be blue. This helps tremendously in quickly spotting the
> > > failed tests by just scrolling up the console window.
> > >   
> > 
> > Looks good to me.
> > 
> > Acked-by: Masami Hiramatsu <mhiramat@...nel.org>  
> 
> Oops, I found some problems.
> 
> > 
> > Thanks!
> >   
> > > Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
> > > ---
> > > diff --git a/tools/testing/selftests/ftrace/ftracetest b/tools/testing/selftests/ftrace/ftracetest
> > > index 5c71d58..4946b2e 100755
> > > --- a/tools/testing/selftests/ftrace/ftracetest
> > > +++ b/tools/testing/selftests/ftrace/ftracetest
> > > @@ -153,7 +153,7 @@ else
> > >  fi
> > >  
> > >  prlog() { # messages
> > > -  [ -z "$LOG_FILE" ] && echo "$@" || echo "$@" | tee -a $LOG_FILE
> > > +  [ -z "$LOG_FILE" ] && echo -e "$@" || echo -e "$@" | tee -a $LOG_FILE  
> 
> I think we should strip escape-sequences from log files, like below;
> 
> strip_esc() {
>   sed -E "s/[[:cntrl:]]\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g"
> }
> 
>   [ -z "$LOG_FILE" ] && echo -e "$@" || echo -e "$@" | strip_esc | tee -a $LOG_FILE
> 
> 
> > >  }
> > >  catlog() { #file
> > >    [ -z "$LOG_FILE" ] && cat $1 || cat $1 | tee -a $LOG_FILE
> > > @@ -195,37 +195,37 @@ test_on_instance() { # testfile
> > >  eval_result() { # sigval
> > >    case $1 in
> > >      $PASS)
> > > -      prlog "	[PASS]"
> > > +      prlog "	[\e[32mPASS\e[30m]"  
> 
> The last one should be "\e[0m" (reset), "\e[30m" just set the color "black".
> That doesn't work on my terminal, which is "white on black".
> 
>

Ah thanks for the feedback. Want to write a patch on top, that Shuah
can add?

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ