[PATCH] ftracetest: replace usleep by sleep
From: Luis Henriques
Date: Wed Mar 25 2015 - 13:36:49 EST
'usleep' seems to be a distro-specific utility and may not be
available:
[5] event tracing - enable/disable with event level files [FAIL]
execute: /home/miguel/linux/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
+ . /home/miguel/linux/tools/testing/selftests/ftrace/test.d/event/event-enable.tc
+ [ ! -f set_event -o ! -d events/sched ]
+ reset_tracer
+ echo nop
+ do_reset
+ echo
+ clear_trace
+ echo
+ echo sched:sched_switch
+ usleep 1
./ftracetest: 24: /home/miguel/linux/tools/testing/selftests/ftrace/test.d/event/event-enable.tc: usleep: not found
Replace it with the more standard sleep.
Signed-off-by: Luis Henriques <luis.henriques@xxxxxxxxxxxxx>
---
tools/testing/selftests/ftrace/test.d/event/event-enable.tc | 6 +++---
tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc | 6 +++---
2 files changed, 6 insertions(+), 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..abafc0c3605c 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.001
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.001
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.001
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..d1e0f5b770c3 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.001
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.001
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.001
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/