* [PATCH] Remove redhat'ism from ftrace selftests. @ 2015-02-24 16:19 Dave Jones 2015-02-24 18:18 ` Steven Rostedt 0 siblings, 1 reply; 13+ messages in thread From: Dave Jones @ 2015-02-24 16:19 UTC (permalink / raw) To: Linux Kernel; +Cc: namhyung, rostedt usleep(1) is a Red Hat'ism (bizarrely provided by initscripts), that isn't available on other distributions. To make this work elsewhere, convert to using fractional shell sleeps. Signed-off-by: Dave Jones <davej@codemonkey.org.uk> diff --git a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc index 668616d9bb03..ecc74d801b97 100644 --- a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc +++ b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc @@ -21,7 +21,7 @@ reset_tracer do_reset echo 'sched:sched_switch' > set_event -usleep 1 +sleep 0.1 count=`cat trace | grep sched_switch | wc -l` if [ $count -eq 0 ]; then @@ -31,7 +31,7 @@ fi do_reset echo 1 > events/sched/sched_switch/enable -usleep 1 +sleep 0.1 count=`cat trace | grep sched_switch | wc -l` if [ $count -eq 0 ]; then @@ -41,7 +41,7 @@ fi do_reset echo 0 > events/sched/sched_switch/enable -usleep 1 +sleep 0.1 count=`cat trace | grep sched_switch | wc -l` if [ $count -ne 0 ]; then diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc index 655c415b6e7f..019766c59db2 100644 --- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc +++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc @@ -21,7 +21,7 @@ reset_tracer do_reset echo 'sched:*' > set_event -usleep 1 +sleep 0.1 count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` if [ $count -lt 3 ]; then @@ -31,7 +31,7 @@ fi do_reset echo 1 > events/sched/enable -usleep 1 +sleep 0.1 count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` if [ $count -lt 3 ]; then @@ -41,7 +41,7 @@ fi do_reset echo 0 > events/sched/enable -usleep 1 +sleep 0.1 count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` if [ $count -ne 0 ]; then ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-02-24 16:19 [PATCH] Remove redhat'ism from ftrace selftests Dave Jones @ 2015-02-24 18:18 ` Steven Rostedt 2015-02-24 18:22 ` Shuah Khan 0 siblings, 1 reply; 13+ messages in thread From: Steven Rostedt @ 2015-02-24 18:18 UTC (permalink / raw) To: Shuah Khan; +Cc: Dave Jones, Linux Kernel, namhyung Shuah, Can you take this in your tree? On Tue, 24 Feb 2015 11:19:27 -0500 Dave Jones <davej@codemonkey.org.uk> wrote: > usleep(1) is a Red Hat'ism (bizarrely provided by initscripts), > that isn't available on other distributions. > To make this work elsewhere, convert to using fractional > shell sleeps. > > Signed-off-by: Dave Jones <davej@codemonkey.org.uk> > Acked-by: Steven Rostedt <rostedt@goodmis.org> -- Steve > diff --git a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc > index 668616d9bb03..ecc74d801b97 100644 > --- a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc > +++ b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc > @@ -21,7 +21,7 @@ reset_tracer > do_reset > > echo 'sched:sched_switch' > set_event > -usleep 1 > +sleep 0.1 > > count=`cat trace | grep sched_switch | wc -l` > if [ $count -eq 0 ]; then > @@ -31,7 +31,7 @@ fi > do_reset > > echo 1 > events/sched/sched_switch/enable > -usleep 1 > +sleep 0.1 > > count=`cat trace | grep sched_switch | wc -l` > if [ $count -eq 0 ]; then > @@ -41,7 +41,7 @@ fi > do_reset > > echo 0 > events/sched/sched_switch/enable > -usleep 1 > +sleep 0.1 > > count=`cat trace | grep sched_switch | wc -l` > if [ $count -ne 0 ]; then > diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc > index 655c415b6e7f..019766c59db2 100644 > --- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc > +++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc > @@ -21,7 +21,7 @@ reset_tracer > do_reset > > echo 'sched:*' > set_event > -usleep 1 > +sleep 0.1 > > count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > if [ $count -lt 3 ]; then > @@ -31,7 +31,7 @@ fi > do_reset > > echo 1 > events/sched/enable > -usleep 1 > +sleep 0.1 > > count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > if [ $count -lt 3 ]; then > @@ -41,7 +41,7 @@ fi > do_reset > > echo 0 > events/sched/enable > -usleep 1 > +sleep 0.1 > > count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > if [ $count -ne 0 ]; then ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-02-24 18:18 ` Steven Rostedt @ 2015-02-24 18:22 ` Shuah Khan 2015-02-24 18:24 ` Dave Jones 0 siblings, 1 reply; 13+ messages in thread From: Shuah Khan @ 2015-02-24 18:22 UTC (permalink / raw) To: Steven Rostedt; +Cc: Dave Jones, Linux Kernel, namhyung, Shuah Khan On 02/24/2015 11:18 AM, Steven Rostedt wrote: > > Shuah, > > Can you take this in your tree? Yes I can do that. This must be the original patch email: https://lkml.org/lkml/2015/2/24/435 -- Shuah > > On Tue, 24 Feb 2015 11:19:27 -0500 > Dave Jones <davej@codemonkey.org.uk> wrote: > >> usleep(1) is a Red Hat'ism (bizarrely provided by initscripts), >> that isn't available on other distributions. >> To make this work elsewhere, convert to using fractional >> shell sleeps. >> >> Signed-off-by: Dave Jones <davej@codemonkey.org.uk> >> > > Acked-by: Steven Rostedt <rostedt@goodmis.org> > > -- Steve > >> diff --git a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc >> index 668616d9bb03..ecc74d801b97 100644 >> --- a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc >> +++ b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc >> @@ -21,7 +21,7 @@ reset_tracer >> do_reset >> >> echo 'sched:sched_switch' > set_event >> -usleep 1 >> +sleep 0.1 >> >> count=`cat trace | grep sched_switch | wc -l` >> if [ $count -eq 0 ]; then >> @@ -31,7 +31,7 @@ fi >> do_reset >> >> echo 1 > events/sched/sched_switch/enable >> -usleep 1 >> +sleep 0.1 >> >> count=`cat trace | grep sched_switch | wc -l` >> if [ $count -eq 0 ]; then >> @@ -41,7 +41,7 @@ fi >> do_reset >> >> echo 0 > events/sched/sched_switch/enable >> -usleep 1 >> +sleep 0.1 >> >> count=`cat trace | grep sched_switch | wc -l` >> if [ $count -ne 0 ]; then >> diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc >> index 655c415b6e7f..019766c59db2 100644 >> --- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc >> +++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc >> @@ -21,7 +21,7 @@ reset_tracer >> do_reset >> >> echo 'sched:*' > set_event >> -usleep 1 >> +sleep 0.1 >> >> count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` >> if [ $count -lt 3 ]; then >> @@ -31,7 +31,7 @@ fi >> do_reset >> >> echo 1 > events/sched/enable >> -usleep 1 >> +sleep 0.1 >> >> count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` >> if [ $count -lt 3 ]; then >> @@ -41,7 +41,7 @@ fi >> do_reset >> >> echo 0 > events/sched/enable >> -usleep 1 >> +sleep 0.1 >> >> count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` >> if [ $count -ne 0 ]; then > -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shuahkh@osg.samsung.com | (970) 217-8978 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-02-24 18:22 ` Shuah Khan @ 2015-02-24 18:24 ` Dave Jones 2015-02-28 3:16 ` Namhyung Kim 0 siblings, 1 reply; 13+ messages in thread From: Dave Jones @ 2015-02-24 18:24 UTC (permalink / raw) To: Shuah Khan; +Cc: Steven Rostedt, Linux Kernel, namhyung On Tue, Feb 24, 2015 at 11:22:58AM -0700, Shuah Khan wrote: > On 02/24/2015 11:18 AM, Steven Rostedt wrote: > > > > Shuah, > > > > Can you take this in your tree? > > Yes I can do that. This must be the original patch email: > https://lkml.org/lkml/2015/2/24/435 Correct. Dave ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-02-24 18:24 ` Dave Jones @ 2015-02-28 3:16 ` Namhyung Kim 2015-03-04 0:05 ` Shuah Khan 0 siblings, 1 reply; 13+ messages in thread From: Namhyung Kim @ 2015-02-28 3:16 UTC (permalink / raw) To: Dave Jones, Shuah Khan, Steven Rostedt, Linux Kernel Hi, On Tue, Feb 24, 2015 at 01:24:59PM -0500, Dave Jones wrote: > On Tue, Feb 24, 2015 at 11:22:58AM -0700, Shuah Khan wrote: > > On 02/24/2015 11:18 AM, Steven Rostedt wrote: > > > > > > Shuah, > > > > > > Can you take this in your tree? > > > > Yes I can do that. This must be the original patch email: > > https://lkml.org/lkml/2015/2/24/435 Please see below links: https://lkml.org/lkml/2014/12/10/52 https://lkml.org/lkml/2014/12/22/556 I think we can get rid of the (u)sleeps entirely since 'cat trace' itself should trigger scheduler events. Thanks, Namhyung ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-02-28 3:16 ` Namhyung Kim @ 2015-03-04 0:05 ` Shuah Khan 2015-03-04 10:47 ` Michael Ellerman 0 siblings, 1 reply; 13+ messages in thread From: Shuah Khan @ 2015-03-04 0:05 UTC (permalink / raw) To: Namhyung Kim, Dave Jones, Steven Rostedt, Linux Kernel On 02/27/2015 08:16 PM, Namhyung Kim wrote: > Hi, > > On Tue, Feb 24, 2015 at 01:24:59PM -0500, Dave Jones wrote: >> On Tue, Feb 24, 2015 at 11:22:58AM -0700, Shuah Khan wrote: >> > On 02/24/2015 11:18 AM, Steven Rostedt wrote: >> > > >> > > Shuah, >> > > >> > > Can you take this in your tree? >> > >> > Yes I can do that. This must be the original patch email: >> > https://lkml.org/lkml/2015/2/24/435 > > Please see below links: > > https://lkml.org/lkml/2014/12/10/52 > https://lkml.org/lkml/2014/12/22/556 > > I think we can get rid of the (u)sleeps entirely since 'cat trace' > itself should trigger scheduler events. > Steve/Dave, Still good to take it through. The discussion in the threads Namhyung Kim pointed to seem to be inconclusive. The only difference between the original patch https://lkml.org/lkml/2014/12/9/780 and https://lkml.org/lkml/2015/2/24/435 is sleep duration change. I can take through my tree https://lkml.org/lkml/2015/2/24/435 just confirming. -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shuahkh@osg.samsung.com | (970) 217-8978 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-03-04 0:05 ` Shuah Khan @ 2015-03-04 10:47 ` Michael Ellerman 2015-03-04 12:44 ` Namhyung Kim 0 siblings, 1 reply; 13+ messages in thread From: Michael Ellerman @ 2015-03-04 10:47 UTC (permalink / raw) To: Shuah Khan; +Cc: Namhyung Kim, Dave Jones, Steven Rostedt, Linux Kernel On Tue, 2015-03-03 at 17:05 -0700, Shuah Khan wrote: > On 02/27/2015 08:16 PM, Namhyung Kim wrote: > > On Tue, Feb 24, 2015 at 01:24:59PM -0500, Dave Jones wrote: > >> On Tue, Feb 24, 2015 at 11:22:58AM -0700, Shuah Khan wrote: > >> > On 02/24/2015 11:18 AM, Steven Rostedt wrote: > >> > > > >> > > Shuah, > >> > > > >> > > Can you take this in your tree? > >> > > >> > Yes I can do that. This must be the original patch email: > >> > https://lkml.org/lkml/2015/2/24/435 > > > > Please see below links: > > > > https://lkml.org/lkml/2014/12/10/52 > > https://lkml.org/lkml/2014/12/22/556 > > > > I think we can get rid of the (u)sleeps entirely since 'cat trace' > > itself should trigger scheduler events. > > Steve/Dave, > > Still good to take it through. The discussion in the threads > Namhyung Kim pointed to seem to be inconclusive. > > The only difference between the original patch > https://lkml.org/lkml/2014/12/9/780 > and > https://lkml.org/lkml/2015/2/24/435 > > is sleep duration change. I can take through my tree > https://lkml.org/lkml/2015/2/24/435 > > just confirming. No, the resoultion was that busybox doesn't support fractional sleeps and so using them is not a solution. I thought /bin/true would work, but never got around to testing it. The other option was to use (echo "forked"): https://lkml.org/lkml/2014/12/23/447 cheers ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-03-04 10:47 ` Michael Ellerman @ 2015-03-04 12:44 ` Namhyung Kim 2015-03-05 1:18 ` Michael Ellerman 2015-03-05 15:24 ` Steven Rostedt 0 siblings, 2 replies; 13+ messages in thread From: Namhyung Kim @ 2015-03-04 12:44 UTC (permalink / raw) To: Michael Ellerman; +Cc: Shuah Khan, Dave Jones, Steven Rostedt, Linux Kernel Hello, On Wed, Mar 04, 2015 at 09:47:47PM +1100, Michael Ellerman wrote: > On Tue, 2015-03-03 at 17:05 -0700, Shuah Khan wrote: > > On 02/27/2015 08:16 PM, Namhyung Kim wrote: > > > On Tue, Feb 24, 2015 at 01:24:59PM -0500, Dave Jones wrote: > > >> On Tue, Feb 24, 2015 at 11:22:58AM -0700, Shuah Khan wrote: > > >> > On 02/24/2015 11:18 AM, Steven Rostedt wrote: > > >> > > > > >> > > Shuah, > > >> > > > > >> > > Can you take this in your tree? > > >> > > > >> > Yes I can do that. This must be the original patch email: > > >> > https://lkml.org/lkml/2015/2/24/435 > > > > > > Please see below links: > > > > > > https://lkml.org/lkml/2014/12/10/52 > > > https://lkml.org/lkml/2014/12/22/556 > > > > > > I think we can get rid of the (u)sleeps entirely since 'cat trace' > > > itself should trigger scheduler events. > > > > Steve/Dave, > > > > Still good to take it through. The discussion in the threads > > Namhyung Kim pointed to seem to be inconclusive. > > > > The only difference between the original patch > > https://lkml.org/lkml/2014/12/9/780 > > and > > https://lkml.org/lkml/2015/2/24/435 > > > > is sleep duration change. I can take through my tree > > https://lkml.org/lkml/2015/2/24/435 > > > > just confirming. > > No, the resoultion was that busybox doesn't support fractional sleeps and so > using them is not a solution. > > I thought /bin/true would work, but never got around to testing it. The other > option was to use (echo "forked"): > > https://lkml.org/lkml/2014/12/23/447 I think that there's no need to even call true or echo.. >From 0549544e8e982df6478f11e2b4fe419f94c22434 Mon Sep 17 00:00:00 2001 From: Namhyung Kim <namhyung@kernel.org> Date: Wed, 4 Mar 2015 21:26:38 +0900 Subject: [PATCH] ftracetest: Do not use usleep The usleep is only provided on distros from Redhat so running ftracetest on other distro resulted in failures due to the missing usleep. The reason of using [u]sleep in the test was to generate (scheduler) events. But as we use 'cat trace | grep | wc -l' to read the events, the command themselves already generate some events before reading the trace file so no need to call [u]sleep explicitly. Reported-by: Michael Ellerman <mpe@ellerman.id.au> Reported-by: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Namhyung Kim <namhyung@kernel.org> --- tools/testing/selftests/ftrace/test.d/event/event-enable.tc | 3 --- tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc | 3 --- 2 files changed, 6 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc index 668616d9bb03..7c7b4ce383a3 100644 --- a/tools/testing/selftests/ftrace/test.d/event/event-enable.tc +++ b/tools/testing/selftests/ftrace/test.d/event/event-enable.tc @@ -21,7 +21,6 @@ reset_tracer do_reset echo 'sched:sched_switch' > set_event -usleep 1 count=`cat trace | grep sched_switch | wc -l` if [ $count -eq 0 ]; then @@ -31,7 +30,6 @@ fi do_reset echo 1 > events/sched/sched_switch/enable -usleep 1 count=`cat trace | grep sched_switch | wc -l` if [ $count -eq 0 ]; then @@ -41,7 +39,6 @@ fi do_reset echo 0 > events/sched/sched_switch/enable -usleep 1 count=`cat trace | grep sched_switch | wc -l` if [ $count -ne 0 ]; then diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc index 655c415b6e7f..08a9459224b0 100644 --- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc +++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc @@ -21,7 +21,6 @@ reset_tracer do_reset echo 'sched:*' > set_event -usleep 1 count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` if [ $count -lt 3 ]; then @@ -31,7 +30,6 @@ fi do_reset echo 1 > events/sched/enable -usleep 1 count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` if [ $count -lt 3 ]; then @@ -41,7 +39,6 @@ fi do_reset echo 0 > events/sched/enable -usleep 1 count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` if [ $count -ne 0 ]; then -- 2.3.1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-03-04 12:44 ` Namhyung Kim @ 2015-03-05 1:18 ` Michael Ellerman 2015-03-05 15:14 ` Shuah Khan 2015-03-05 15:24 ` Steven Rostedt 1 sibling, 1 reply; 13+ messages in thread From: Michael Ellerman @ 2015-03-05 1:18 UTC (permalink / raw) To: Namhyung Kim; +Cc: Shuah Khan, Dave Jones, Steven Rostedt, Linux Kernel On Wed, 2015-03-04 at 21:44 +0900, Namhyung Kim wrote: > > I think that there's no need to even call true or echo.. > > From 0549544e8e982df6478f11e2b4fe419f94c22434 Mon Sep 17 00:00:00 2001 > From: Namhyung Kim <namhyung@kernel.org> > Date: Wed, 4 Mar 2015 21:26:38 +0900 > Subject: [PATCH] ftracetest: Do not use usleep > > The usleep is only provided on distros from Redhat so running ftracetest > on other distro resulted in failures due to the missing usleep. > > The reason of using [u]sleep in the test was to generate (scheduler) > events. But as we use 'cat trace | grep | wc -l' to read the events, > the command themselves already generate some events before reading the > trace file so no need to call [u]sleep explicitly. > > Reported-by: Michael Ellerman <mpe@ellerman.id.au> > Reported-by: Dave Jones <davej@codemonkey.org.uk> > Signed-off-by: Namhyung Kim <namhyung@kernel.org> Thanks, this is working for me. Tested-by: Michael Ellerman <mpe@ellerman.id.au> $ cat /etc/issue Ubuntu 14.10 \n \l $ git log -2 --pretty=oneline 385a914624fc9fb6d0ccc3d2fd3a12ebd1ece7dd ftracetest: Do not use usleep a6c5170d1edea97c538c81e377e56c7b5c5b7e63 Merge branch 'for-4.0' of git://linux-nfs.org/~bfields/linux $ sudo ./ftracetest === Ftrace unit tests === [1] Basic trace file check [PASS] [2] Basic test for tracers [PASS] [3] Basic trace clock test [PASS] [4] Basic event tracing check [PASS] [5] event tracing - enable/disable with event level files [PASS] [6] event tracing - enable/disable with subsystem level files [PASS] [7] event tracing - enable/disable with top level files [PASS] [8] ftrace - function graph filters with stack tracer [PASS] [9] ftrace - function graph filters [PASS] [10] ftrace - function profiler with function tracing [PASS] [11] Kprobe dynamic event - adding and removing [PASS] [12] Kprobe dynamic event - busy event check [PASS] [13] Kprobe dynamic event with arguments [PASS] [14] Kprobe dynamic event with function tracer [PASS] [15] Kretprobe dynamic event with arguments [PASS] # of passed: 15 # of failed: 0 # of unresolved: 0 # of untested: 0 # of unsupported: 0 # of xfailed: 0 # of undefined(test bug): 0 cheers ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-03-05 1:18 ` Michael Ellerman @ 2015-03-05 15:14 ` Shuah Khan 2015-03-05 15:17 ` Dave Jones 0 siblings, 1 reply; 13+ messages in thread From: Shuah Khan @ 2015-03-05 15:14 UTC (permalink / raw) To: Michael Ellerman, Namhyung Kim, Dave Jones, Steven Rostedt; +Cc: Linux Kernel On 03/04/2015 06:18 PM, Michael Ellerman wrote: > On Wed, 2015-03-04 at 21:44 +0900, Namhyung Kim wrote: >> >> I think that there's no need to even call true or echo.. >> >> From 0549544e8e982df6478f11e2b4fe419f94c22434 Mon Sep 17 00:00:00 2001 >> From: Namhyung Kim <namhyung@kernel.org> >> Date: Wed, 4 Mar 2015 21:26:38 +0900 >> Subject: [PATCH] ftracetest: Do not use usleep >> >> The usleep is only provided on distros from Redhat so running ftracetest >> on other distro resulted in failures due to the missing usleep. >> >> The reason of using [u]sleep in the test was to generate (scheduler) >> events. But as we use 'cat trace | grep | wc -l' to read the events, >> the command themselves already generate some events before reading the >> trace file so no need to call [u]sleep explicitly. >> >> Reported-by: Michael Ellerman <mpe@ellerman.id.au> >> Reported-by: Dave Jones <davej@codemonkey.org.uk> >> Signed-off-by: Namhyung Kim <namhyung@kernel.org> > > Thanks, this is working for me. > > Tested-by: Michael Ellerman <mpe@ellerman.id.au> > Steve, Do you want to make a call on which one you want me to take it through between these two patches - one from Dave and the other from Namhyung Kim. Please send me the patch I have to pull in. Namhyung Kim's patch isn't in the format I can apply and I don't have Dave's patch in my inbox. thanks, -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shuahkh@osg.samsung.com | (970) 217-8978 ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-03-05 15:14 ` Shuah Khan @ 2015-03-05 15:17 ` Dave Jones 2015-03-05 15:26 ` Steven Rostedt 0 siblings, 1 reply; 13+ messages in thread From: Dave Jones @ 2015-03-05 15:17 UTC (permalink / raw) To: Shuah Khan; +Cc: Michael Ellerman, Namhyung Kim, Steven Rostedt, Linux Kernel On Thu, Mar 05, 2015 at 08:14:42AM -0700, Shuah Khan wrote: > On 03/04/2015 06:18 PM, Michael Ellerman wrote: > > On Wed, 2015-03-04 at 21:44 +0900, Namhyung Kim wrote: > >> > >> I think that there's no need to even call true or echo.. > >> > >> From 0549544e8e982df6478f11e2b4fe419f94c22434 Mon Sep 17 00:00:00 2001 > >> From: Namhyung Kim <namhyung@kernel.org> > >> Date: Wed, 4 Mar 2015 21:26:38 +0900 > >> Subject: [PATCH] ftracetest: Do not use usleep > >> > >> The usleep is only provided on distros from Redhat so running ftracetest > >> on other distro resulted in failures due to the missing usleep. > >> > >> The reason of using [u]sleep in the test was to generate (scheduler) > >> events. But as we use 'cat trace | grep | wc -l' to read the events, > >> the command themselves already generate some events before reading the > >> trace file so no need to call [u]sleep explicitly. > >> > >> Reported-by: Michael Ellerman <mpe@ellerman.id.au> > >> Reported-by: Dave Jones <davej@codemonkey.org.uk> > >> Signed-off-by: Namhyung Kim <namhyung@kernel.org> > > > > Thanks, this is working for me. > > > > Tested-by: Michael Ellerman <mpe@ellerman.id.au> > > > > Steve, > > Do you want to make a call on which one you want me to take it > through between these two patches - one from Dave and the other > from Namhyung Kim. > > Please send me the patch I have to pull in. Namhyung Kim's patch > isn't in the format I can apply and I don't have Dave's patch in > my inbox. Removing it entirely sounds like a much better choice, so I'd wait for Namhyung to resend. Dave ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-03-05 15:17 ` Dave Jones @ 2015-03-05 15:26 ` Steven Rostedt 0 siblings, 0 replies; 13+ messages in thread From: Steven Rostedt @ 2015-03-05 15:26 UTC (permalink / raw) To: Dave Jones; +Cc: Shuah Khan, Michael Ellerman, Namhyung Kim, Linux Kernel On Thu, 5 Mar 2015 10:17:04 -0500 Dave Jones <davej@codemonkey.org.uk> wrote: > Removing it entirely sounds like a much better choice, so I'd > wait for Namhyung to resend. Removing or just doing something small may be better. Those sleeps were added to my original tests because it sometimes had false failures. But that was a long time ago. Maybe they are not needed. It really doesn't matter much to me, as long as there's no false failures. I'm still running my original tests. -- Steve ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] Remove redhat'ism from ftrace selftests. 2015-03-04 12:44 ` Namhyung Kim 2015-03-05 1:18 ` Michael Ellerman @ 2015-03-05 15:24 ` Steven Rostedt 1 sibling, 0 replies; 13+ messages in thread From: Steven Rostedt @ 2015-03-05 15:24 UTC (permalink / raw) To: Namhyung Kim; +Cc: Michael Ellerman, Shuah Khan, Dave Jones, Linux Kernel On Wed, 4 Mar 2015 21:44:57 +0900 Namhyung Kim <namhyung@kernel.org> wrote: > I think that there's no need to even call true or echo.. Ideally it shouldn't. But I if you noticed it expects 3 or more events in some cases. I believe without the sleep it would sometimes fail that. Is there a small command we can run just to do something? I rather have that then nothing at all. I added those sleeps a while ago (in my original tests), because every so often it would fail a test due to not enough going on. -- Steve ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-03-05 15:26 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-02-24 16:19 [PATCH] Remove redhat'ism from ftrace selftests Dave Jones 2015-02-24 18:18 ` Steven Rostedt 2015-02-24 18:22 ` Shuah Khan 2015-02-24 18:24 ` Dave Jones 2015-02-28 3:16 ` Namhyung Kim 2015-03-04 0:05 ` Shuah Khan 2015-03-04 10:47 ` Michael Ellerman 2015-03-04 12:44 ` Namhyung Kim 2015-03-05 1:18 ` Michael Ellerman 2015-03-05 15:14 ` Shuah Khan 2015-03-05 15:17 ` Dave Jones 2015-03-05 15:26 ` Steven Rostedt 2015-03-05 15:24 ` Steven Rostedt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox