diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2013-04-10 11:40:14 +0530 |
---|---|---|
committer | Sanjay Singh Rawat <sanjay.rawat@linaro.org> | 2013-04-10 11:40:14 +0530 |
commit | 17b98e50ce38d36f278510eea639c27da6f81eed (patch) | |
tree | 261eec4319e412436f04ade9c62a4120b3759399 | |
parent | f698a6736fc105beca5feca8e5f5e4b6c97c41c8 (diff) |
pm-qa: add test for cpu topology attributes
test checks for topology attributes of cpus
Signed-off-by: Sanjay Singh Rawat <sanjay.rawat@linaro.org>
-rw-r--r-- | cputopology/Android.mk | 18 | ||||
-rw-r--r-- | cputopology/Makefile | 25 | ||||
-rw-r--r-- | cputopology/cputopology_01.sh | 38 | ||||
-rw-r--r-- | cputopology/cputopology_01.txt | 1 | ||||
-rw-r--r-- | cputopology/cputopology_02.sh | 33 | ||||
-rw-r--r-- | cputopology/cputopology_02.txt | 1 |
6 files changed, 116 insertions, 0 deletions
diff --git a/cputopology/Android.mk b/cputopology/Android.mk new file mode 100644 index 0000000..7f2c1ef --- /dev/null +++ b/cputopology/Android.mk @@ -0,0 +1,18 @@ +include $(call all-subdir-makefiles) +LOCAL_PATH:= $(call my-dir) + +module_name = cputopology + +define $(module_name)_add_executable + include $(CLEAR_VARS) + LOCAL_MODULE_TAGS := optional + LOCAL_MODULE_CLASS := tests + LOCAL_MODULE := $1.sh + systemtarball: $1.sh + LOCAL_SRC_FILES := $1.sh + LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)/pm-qa/$(module_name) + include $(BUILD_PREBUILT) +endef + +test_num := 01 02 +$(foreach item,$(test_num),$(eval $(call $(module_name)_add_executable, $(module_name)_$(item)))) diff --git a/cputopology/Makefile b/cputopology/Makefile new file mode 100644 index 0000000..a90620c --- /dev/null +++ b/cputopology/Makefile @@ -0,0 +1,25 @@ +# +# PM-QA validation test suite for the power management on Linux +# +# 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 +# + +include ../Test.mk
\ No newline at end of file diff --git a/cputopology/cputopology_01.sh b/cputopology/cputopology_01.sh new file mode 100644 index 0000000..c7cbc26 --- /dev/null +++ b/cputopology/cputopology_01.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# PM-QA validation test suite for the power management on Linux +# +# 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#sched_mc_02 + +source ../include/functions.sh + +check_physical_package_id() { + + local package_id=$CPU_PATH/$1/topology/physical_package_id + local val=$(cat $package_id) + + check "topology is enabled" "test \"$val\" != \"-1\"" +} + +for_each_cpu check_physical_package_id || exit 1 diff --git a/cputopology/cputopology_01.txt b/cputopology/cputopology_01.txt new file mode 100644 index 0000000..5493610 --- /dev/null +++ b/cputopology/cputopology_01.txt @@ -0,0 +1 @@ +test the topology is implemented in the kernel diff --git a/cputopology/cputopology_02.sh b/cputopology/cputopology_02.sh new file mode 100644 index 0000000..6520ce5 --- /dev/null +++ b/cputopology/cputopology_02.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# PM-QA validation test suite for the power management on Linux +# +# 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#sched_mc_03 + +source ../include/functions.sh + +FILES="core_id core_siblings core_siblings_list physical_package_id \ +thread_siblings thread_siblings_list" + +for_each_cpu check_topology_files $FILES diff --git a/cputopology/cputopology_02.txt b/cputopology/cputopology_02.txt new file mode 100644 index 0000000..b9e8d6f --- /dev/null +++ b/cputopology/cputopology_02.txt @@ -0,0 +1 @@ +test the topology files are present |