diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-10-03 11:07:36 +0200 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2011-10-03 11:07:36 +0200 |
commit | b10475e6929b4a573af17ea1c96cd518d7d4e0d3 (patch) | |
tree | 4d71e1c629fd9f12a7a22067199965f40a8ba93c | |
parent | 27bc9d695a2db448db67f720487bf1e322320705 (diff) |
check the files are present
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org
Acked-by: Amit Kucheria <amit.kucheria@linaro.org>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | cpuhotplug/cpuhotplug_01.sh | 36 | ||||
-rw-r--r-- | cpuhotplug/cpuhotplug_01.txt | 1 | ||||
-rw-r--r-- | include/functions.sh | 12 |
4 files changed, 51 insertions, 0 deletions
@@ -29,10 +29,12 @@ all: check: @(cd utils; $(MAKE) check) @(cd cpufreq; $(MAKE) check) + @(cd cpuhotplug; $(MAKE) check) @(cd sched_mc; $(MAKE) check) uncheck: @(cd cpufreq; $(MAKE) uncheck) + @(cd cpuhotplug; $(MAKE) uncheck) @(cd sched_mc; $(MAKE) uncheck) recheck: uncheck check diff --git a/cpuhotplug/cpuhotplug_01.sh b/cpuhotplug/cpuhotplug_01.sh new file mode 100644 index 0000000..f6f36ff --- /dev/null +++ b/cpuhotplug/cpuhotplug_01.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# PM-QA validation test suite for the power management on ARM +# +# Copyright (C) 2011, Linaro Limited. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Contributors: +# Daniel Lezcano <daniel.lezcano@linaro.org> (IBM Corporation) +# - initial API and implementation +# + +# URL : https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/QA/Scripts#cpuhotplug_01 + +source ../include/functions.sh + +FILES="online offline possible present" + +for i in $FILES; do + check_file $i $CPU_PATH || return 1 +done + +for_each_cpu check_cpuhotplug_files online diff --git a/cpuhotplug/cpuhotplug_01.txt b/cpuhotplug/cpuhotplug_01.txt new file mode 100644 index 0000000..047f13a --- /dev/null +++ b/cpuhotplug/cpuhotplug_01.txt @@ -0,0 +1 @@ +test the sysfs files are present diff --git a/include/functions.sh b/include/functions.sh index bff8e13..b2a8b47 100644 --- a/include/functions.sh +++ b/include/functions.sh @@ -236,6 +236,18 @@ check_topology_files() { return 0 } +check_cpuhotplug_files() { + + local dirpath=$CPU_PATH/$1 + shift 1 + + for i in $@; do + check_file $i $dirpath || return 1 + done + + return 0 +} + save_governors() { governors_backup= |