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: <20221114131028.110a91c4@gandalf.local.home>
Date:   Mon, 14 Nov 2022 13:10:28 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc:     Yipeng Zou <zouyipeng@...wei.com>, <shuah@...nel.org>,
        <rdunlap@...radead.org>, <linux-kselftest@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH] selftests/ftrace: event_triggers: wait longer for
 test_event_enable

On Sat, 5 Nov 2022 17:52:41 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:

> Hi Yipeng,
> 
> On Fri, 4 Nov 2022 10:09:31 +0800
> Yipeng Zou <zouyipeng@...wei.com> wrote:
> 
> > In some platform, the schedule event may came slowly, delay 100ms can't
> > cover it.
> > 
> > I was notice that on my board which running in low cpu_freq,and this
> > selftests allways gose fail.  
> 
> This looks good to me, since this can just extend the waiting time to 1 sec.
> (and most of the platforms have no effect)
> 
> Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
> 

Acked-by: Steven Rostedt (Google) <rostedt@...dmis.org>

Shuah,

Care to take this through your tree?

Thanks,

-- Steve


> Thank you!
> 
> > 
> > So maybe we can check more times here to wait longer.
> > 
> > Fixes: 43bb45da82f9 ("selftests: ftrace: Add a selftest to test event enable/disable func trigger")
> > Signed-off-by: Yipeng Zou <zouyipeng@...wei.com>
> > ---
> >  .../ftrace/test.d/ftrace/func_event_triggers.tc   | 15 +++++++++++----
> >  1 file changed, 11 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
> > index 8d26d5505808..3eea2abf68f9 100644
> > --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
> > +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc
> > @@ -38,11 +38,18 @@ cnt_trace() {
> >  
> >  test_event_enabled() {
> >      val=$1
> > +    check_times=10		# wait for 10 * SLEEP_TIME at most
> >  
> > -    e=`cat $EVENT_ENABLE`
> > -    if [ "$e" != $val ]; then
> > -	fail "Expected $val but found $e"
> > -    fi
> > +    while [ $check_times -ne 0 ]; do
> > +	e=`cat $EVENT_ENABLE`
> > +	if [ "$e" == $val ]; then
> > +	    return 0
> > +	fi
> > +	sleep $SLEEP_TIME
> > +	check_times=$((check_times - 1))
> > +    done
> > +
> > +    fail "Expected $val but found $e"
> >  }
> >  
> >  run_enable_disable() {
> > -- 
> > 2.17.1
> >   
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ