summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 08:59:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-13 08:59:21 -0700
commit4541fec3104bef0c60633f9e180be94ea5ccc2b7 (patch)
tree8a2bb66c4510bf122ca414de22af0a6f98bc36ab /tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
parent39a8804455fb23f09157341d3ba7db6d7ae6ee76 (diff)
parent2bfd4d1f8c2bee8b0b8832be0c38d3916713625f (diff)
downloadop-kernel-dev-4541fec3104bef0c60633f9e180be94ea5ccc2b7.zip
op-kernel-dev-4541fec3104bef0c60633f9e180be94ea5ccc2b7.tar.gz
Merge tag 'linux-kselftest-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest updates from Shuah Khan: "This is a milestone update in a sense. Several new tests and install and packaging support is added in this update. This update adds install and packaging tools developed on top of back-end shared logic enhancemnets to run and install tests. In addition several timer tests are added. - New timer tests from John Stultz - rtc test from Prarit Bhargava - Enhancements to un and install tests from Michael Ellerman - Install and packaging tools from Shuah Khan - Cross-compilation enablement from Tyler Baker - A couple of bug fixes" * tag 'linux-kselftest-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (42 commits) ftracetest: Do not use usleep directly selftest/mqueue: enable cross compilation selftest/ipc: enable cross compilation selftest/memfd: include default header install path selftest/mount: enable cross compilation selftest/memfd: enable cross compilation kselftests: timers: Make set-timer-lat fail more gracefully for !CAP_WAKE_ALARM selftests: Change memory on-off-test.sh name to be unique selftests: change cpu on-off-test.sh name to be unique selftests/mount: Make git ignore all binaries in mount test suite kselftests: timers: Reduce default runtime on inconsistency-check and set-timer-lat ftracetest: Convert exit -1 to exit $FAIL ftracetest: Cope properly with stack tracer not being enabled tools, update rtctest.c to verify passage of time Documentation, split up rtc.txt into documentation and test file selftests: Add tool to generate kselftest tar archive selftests: Add kselftest install tool selftests: Set CC using CROSS_COMPILE once in lib.mk selftests: Add install support for the powerpc tests selftests/timers: Use shared logic to run and install tests ...
Diffstat (limited to 'tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc')
-rw-r--r--tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc15
1 files changed, 11 insertions, 4 deletions
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 655c415..ced27ef 100644
--- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
+++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc
@@ -9,7 +9,11 @@ do_reset() {
fail() { #msg
do_reset
echo $1
- exit -1
+ exit $FAIL
+}
+
+yield() {
+ ping localhost -c 1 || sleep .001 || usleep 1 || sleep 1
}
if [ ! -f set_event -o ! -d events/sched ]; then
@@ -21,7 +25,8 @@ reset_tracer
do_reset
echo 'sched:*' > set_event
-usleep 1
+
+yield
count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
if [ $count -lt 3 ]; then
@@ -31,7 +36,8 @@ fi
do_reset
echo 1 > events/sched/enable
-usleep 1
+
+yield
count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
if [ $count -lt 3 ]; then
@@ -41,7 +47,8 @@ fi
do_reset
echo 0 > events/sched/enable
-usleep 1
+
+yield
count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l`
if [ $count -ne 0 ]; then
OpenPOWER on IntegriCloud