Re: [PATCH] Remove redhat'ism from ftrace selftests.
On Thu, 5 Mar 2015 10:17:04 -0500 Dave Jones 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
On Wed, 4 Mar 2015 21:44:57 +0900 Namhyung Kim 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 > >> 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 > >> Reported-by: Dave Jones > >> Signed-off-by: Namhyung Kim > > > > Thanks, this is working for me. > > > > Tested-by: Michael Ellerman > > > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 >> 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 >> Reported-by: Dave Jones >> Signed-off-by: Namhyung Kim > > Thanks, this is working for me. > > Tested-by: Michael Ellerman > 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) shua...@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
On Thu, 5 Mar 2015 10:17:04 -0500 Dave Jones da...@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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 namhy...@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 m...@ellerman.id.au Reported-by: Dave Jones da...@codemonkey.org.uk Signed-off-by: Namhyung Kim namhy...@kernel.org Thanks, this is working for me. Tested-by: Michael Ellerman m...@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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
On Wed, 4 Mar 2015 21:44:57 +0900 Namhyung Kim namhy...@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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 namhy...@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 m...@ellerman.id.au Reported-by: Dave Jones da...@codemonkey.org.uk Signed-off-by: Namhyung Kim namhy...@kernel.org Thanks, this is working for me. Tested-by: Michael Ellerman m...@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) shua...@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 > 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 > Reported-by: Dave Jones > Signed-off-by: Namhyung Kim Thanks, this is working for me. Tested-by: Michael Ellerman $ 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 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 Reported-by: Dave Jones Signed-off-by: Namhyung Kim --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 namhy...@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 m...@ellerman.id.au Reported-by: Dave Jones da...@codemonkey.org.uk Signed-off-by: Namhyung Kim namhy...@kernel.org Thanks, this is working for me. Tested-by: Michael Ellerman m...@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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 namhy...@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 m...@ellerman.id.au Reported-by: Dave Jones da...@codemonkey.org.uk Signed-off-by: Namhyung Kim namhy...@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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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) shua...@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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) shua...@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 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 >> > > Acked-by: Steven Rostedt > > -- 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) shua...@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
Shuah, Can you take this in your tree? On Tue, 24 Feb 2015 11:19:27 -0500 Dave Jones 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 > Acked-by: Steven Rostedt -- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Remove redhat'ism from ftrace selftests.
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 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] Remove redhat'ism from ftrace selftests.
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 da...@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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
Shuah, Can you take this in your tree? On Tue, 24 Feb 2015 11:19:27 -0500 Dave Jones da...@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 da...@codemonkey.org.uk Acked-by: Steven Rostedt rost...@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 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] Remove redhat'ism from ftrace selftests.
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 da...@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 da...@codemonkey.org.uk Acked-by: Steven Rostedt rost...@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) shua...@osg.samsung.com | (970) 217-8978 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/