aboutsummaryrefslogtreecommitdiff
path: root/include/functions.sh
diff options
context:
space:
mode:
authorDaniel Lezcano <daniel.lezcano@linaro.org>2012-04-05 14:03:08 +0200
committerzhanghongbo <hongbo.zhang@stericsson.com>2012-05-02 16:42:28 +0800
commit3dd53eedc22665ac9eee39cd62279294408b7c56 (patch)
treea1aa30f22cdc8b23007c6cbde3fb9daed5674444 /include/functions.sh
parent7c356293290656bd45b9b65a868dc22431dd4090 (diff)
add cpuidle_02 and cpuidle_03 tests
This patch provides a couple of tests for cpuidle in addition with a small program which behaves to sollicitate the cpuidle drivers especially when both cores needs to reach the same C-states. The program forks as many online processors present on the system and set the affinity to it. Then it runs, during 120 secs, small chunks of busy loops and idle loops. When there is something wrong with the cpuidle driver, this program often triggers the problem which results in a kernel panic, tasks hung warning or system hang. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'include/functions.sh')
-rw-r--r--include/functions.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/functions.sh b/include/functions.sh
index 1d06249..c39b6b7 100644
--- a/include/functions.sh
+++ b/include/functions.sh
@@ -179,6 +179,10 @@ set_online() {
local cpu=$1
local dirpath=$CPU_PATH/$cpu
+ if [ "$cpu" = "cpu0" ]; then
+ return 0
+ fi
+
echo 1 > $dirpath/online
}
@@ -186,6 +190,10 @@ set_offline() {
local cpu=$1
local dirpath=$CPU_PATH/$cpu
+ if [ "$cpu" = "cpu0" ]; then
+ return 0
+ fi
+
echo 0 > $dirpath/online
}