From: Dave Jones <davej@codemonkey.org.uk>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: namhyung@kernel.org, rostedt@goodmis.org
Subject: [PATCH] Remove redhat'ism from ftrace selftests.
Date: Tue, 24 Feb 2015 11:19:27 -0500 [thread overview]
Message-ID: <20150224161927.GA4998@codemonkey.org.uk> (raw)
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
next reply other threads:[~2015-02-24 16:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-24 16:19 Dave Jones [this message]
2015-02-24 18:18 ` [PATCH] Remove redhat'ism from ftrace selftests 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150224161927.GA4998@codemonkey.org.uk \
--to=davej@codemonkey.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox