lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Mar 2015 09:32:23 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Steven Rostedt <rostedt@...dmis.org>,
	Shuah Khan <shuahkh@....samsung.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Michael Ellerman <mpe@...erman.id.au>,
	Dave Jones <davej@...emonkey.org.uk>,
	Luis Henriques <luis.henriques@...onical.com>
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@...erman.id.au>
Reported-by: Dave Jones <davej@...emonkey.org.uk>
Reported-by: Luis Henriques <luis.henriques@...onical.com>
Tested-by: Michael Ellerman <mpe@...erman.id.au>
Signed-off-by: Namhyung Kim <namhyung@...nel.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.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ