A separate name (from controller_cpuset01 to controller_cpuset11) is assigned to each cpuset shell testcase (which was invoked earlier by run_cpuset_test.sh).
This will simplify results analysis. Signed-off-by: Stanislav Kholmanskikh <[email protected]> --- runtest/controllers | 13 ++ .../cpuset_base_ops_testset.sh | 8 +- .../cpuset_exclusive_test/cpuset_exclusive_test.sh | 8 +- .../kernel/controllers/cpuset/cpuset_funcs.sh | 23 ++- .../cpuset_hierarchy_test/cpuset_hierarchy_test.sh | 8 +- .../cpuset_hotplug_test/cpuset_hotplug_test.sh | 6 +- .../cpuset_inherit_test/cpuset_inherit_testset.sh | 8 +- .../cpuset_load_balance_test.sh | 8 +- .../cpuset_sched_domains_test.sh | 8 +- .../cpuset_memory_pressure_testset.sh | 8 +- .../cpuset_memory_spread_testset.sh | 8 +- .../cpuset_memory_test/cpuset_memory_testset.sh | 8 +- .../cpuset_syscall_test/cpuset_syscall_testset.sh | 8 +- .../kernel/controllers/cpuset/run_cpuset_test.sh | 183 -------------------- testcases/kernel/controllers/test_controllers.sh | 20 -- 15 files changed, 75 insertions(+), 250 deletions(-) delete mode 100755 testcases/kernel/controllers/cpuset/run_cpuset_test.sh diff --git a/runtest/controllers b/runtest/controllers index 94fc185..a737b2f 100644 --- a/runtest/controllers +++ b/runtest/controllers @@ -12,4 +12,17 @@ memcg_stress memcg_stress_test.sh memcg_control PAGESIZE=$(mem_process -p);memcg_control_test.sh $PAGESIZE $PAGESIZE $((PAGESIZE * 2)) cgroup_fj run_cgroup_test_fj.sh controllers test_controllers.sh + +controller_cpuset01 cpuset_base_ops_testset.sh +controller_cpuset02 cpuset_inherit_testset.sh +controller_cpuset03 cpuset_exclusive_test.sh +controller_cpuset04 cpuset_hierarchy_test.sh +controller_cpuset05 cpuset_syscall_testset.sh +controller_cpuset06 cpuset_sched_domains_test.sh +controller_cpuset07 cpuset_load_balance_test.sh +controller_cpuset08 cpuset_hotplug_test.sh +controller_cpuset09 cpuset_memory_testset.sh +controller_cpuset10 cpuset_memory_pressure_testset.sh +controller_cpuset11 cpuset_memory_spread_testset.sh + cgroup_xattr cgroup_xattr diff --git a/testcases/kernel/controllers/cpuset/cpuset_base_ops_test/cpuset_base_ops_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_base_ops_test/cpuset_base_ops_testset.sh index 126eec5..7eb03f1 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_base_ops_test/cpuset_base_ops_testset.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_base_ops_test/cpuset_base_ops_testset.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset01" +export TCID="controller_cpuset01" export TST_TOTAL=97 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare nr_cpus=$NR_CPUS nr_mems=$N_NODES diff --git a/testcases/kernel/controllers/cpuset/cpuset_exclusive_test/cpuset_exclusive_test.sh b/testcases/kernel/controllers/cpuset/cpuset_exclusive_test/cpuset_exclusive_test.sh index 0ad31e7..e364567 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_exclusive_test/cpuset_exclusive_test.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_exclusive_test/cpuset_exclusive_test.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset03" +export TCID="controller_cpuset03" export TST_TOTAL=18 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare exit_status=0 diff --git a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh index a83845c..a5ff2d3 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_funcs.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_funcs.sh @@ -89,11 +89,18 @@ user_check() cpuset_check() { - grep cpuset /proc/cgroups > /dev/null 2>&1 - if [ $? -ne 0 ]; then - tst_brkm TCONF ignored "Cpuset is not supported" - return 1 + if [ -f /proc/cgroups ]; then + CPUSET_CONTROLLER=`grep -w cpuset /proc/cgroups | cut -f1` + CPUSET_CONTROLLER_VALUE=`grep -w cpuset /proc/cgroups | cut -f4` + + if [ "$CPUSET_CONTROLLER" = "cpuset" ] && [ "$CPUSET_CONTROLLER_VALUE" = "1" ] + then + return 0 + fi fi + + tst_brkm TCONF ignored "Cpuset is not supported" + return 1 } check() @@ -125,6 +132,14 @@ check() } +check_and_prepare() +{ + check + if [ $? -ne 0 ]; then + exit 0 + fi +} + # Create /dev/cpuset & mount the cgroup file system with cpuset # clean any group created eralier (if any) setup() diff --git a/testcases/kernel/controllers/cpuset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh b/testcases/kernel/controllers/cpuset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh index 5804aa4..b917fb4 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_hierarchy_test/cpuset_hierarchy_test.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset04" +export TCID="controller_cpuset04" export TST_TOTAL=32 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare nr_cpus=$NR_CPUS nr_mems=$N_NODES diff --git a/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_hotplug_test.sh b/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_hotplug_test.sh index 2bfe0f5..69a953b 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_hotplug_test.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_hotplug_test.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - export TCID="cpuset08" export TST_TOTAL=13 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare exit_status=0 diff --git a/testcases/kernel/controllers/cpuset/cpuset_inherit_test/cpuset_inherit_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_inherit_test/cpuset_inherit_testset.sh index 780b7eb..c7d8d73 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_inherit_test/cpuset_inherit_testset.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_inherit_test/cpuset_inherit_testset.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset02" +export TCID="controller_cpuset02" export TST_TOTAL=27 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare nr_cpus=$NR_CPUS nr_mems=$N_NODES diff --git a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_load_balance_test.sh b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_load_balance_test.sh index 55f533a..e698993 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_load_balance_test.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_load_balance_test.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset07" +export TCID="controller_cpuset07" export TST_TOTAL=13 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare exit_status=0 diff --git a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_test.sh b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_test.sh index 3ca70df..7e30f12 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_test.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_load_balance_test/cpuset_sched_domains_test.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset06" +export TCID="controller_cpuset06" export TST_TOTAL=19 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare exit_status=0 diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh index f342e6c..66a4825 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_memory_pressure_test/cpuset_memory_pressure_testset.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset10" +export TCID="controller_cpuset10" export TST_TOTAL=6 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare exit_status=0 diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh index ffce419..6830c7a 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_memory_spread_test/cpuset_memory_spread_testset.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset11" +export TCID="controller_cpuset11" export TST_TOTAL=6 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare exit_status=0 # must >= 3 for: 1-$((nr_mems-2)) diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh index 2a9f7e3..72d78b6 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset09" +export TCID="controller_cpuset09" export TST_TOTAL=18 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare exit_status=0 diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh index af92373..e35f0e4 100755 --- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh +++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_testset.sh @@ -22,13 +22,13 @@ # # ################################################################################ -cd $LTPROOT/testcases/bin - -export TCID="cpuset05" +export TCID="controller_cpuset05" export TST_TOTAL=16 export TST_COUNT=1 -. ./cpuset_funcs.sh +. cpuset_funcs.sh + +check_and_prepare exit_status=0 diff --git a/testcases/kernel/controllers/cpuset/run_cpuset_test.sh b/testcases/kernel/controllers/cpuset/run_cpuset_test.sh deleted file mode 100755 index abdc885..0000000 --- a/testcases/kernel/controllers/cpuset/run_cpuset_test.sh +++ /dev/null @@ -1,183 +0,0 @@ -#!/bin/sh -# usage ./run_cpuset_test.sh test_num - -################################################################################ -# # -# Copyright (c) 2009 FUJITSU 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 # -# # -################################################################################ -# Name Of File: run_cpuset_test.sh # -# # -# Description: This file runs the setup for testing different cpuset resource # -# controller features. After setup it runs diff test cases in # -# diff setup. # -# # -# Test 01: Tests basal operation of control file # -# # -# Precaution: Avoid system use by other applications/users to get fair and # -# appropriate results (avoid unnecessary killing of applicatio) # -# # -# Author: Miao Xie <[email protected]> # -# # -# History: # -# # -# DATE NAME EMAIL DESC # -# # -# 02/03/09 Miao Xie <[email protected]> Created this test # -# # -################################################################################ - -export TCID="cpuset_test"; -export TST_TOTAL=1; -export TST_COUNT=1; - -. cpuset_funcs.sh; - -TEST_NUM=$1; -SCRIPT_PID=$$; -RC=0; -PWD=`pwd`; - -check -if [ $? -ne 0 ]; then - exit 0 -fi - -# The usage of the script file -usage() -{ - echo "Could not start cpuset controller test"; - echo "usage: run_cpuset_test.sh test_num"; - echo "Skipping the cpuset controller test..."; -} - -cd $LTPROOT/testcases/bin/ - -echo "TEST $TEST_NUM: CPUSET CONTROLLER TESTING"; - -echo "TEST STARTED: Please avoid using system while this test executes"; -#Check if C source file has been compiled and then run it in different groups - -case $TEST_NUM in -"1" ) - if [ -f cpuset_base_ops_testset.sh ]; then - ./cpuset_base_ops_testset.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"2" ) - if [ -f cpuset_inherit_testset.sh ]; then - ./cpuset_inherit_testset.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"3" ) - if [ -f cpuset_exclusive_test.sh ]; then - ./cpuset_exclusive_test.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"4" ) - if [ -f cpuset_hierarchy_test.sh ]; then - ./cpuset_hierarchy_test.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"5" ) - if [ -f cpuset_syscall_testset.sh ]; then - ./cpuset_syscall_testset.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"6" ) - if [ -f cpuset_sched_domains_test.sh ]; then - ./cpuset_sched_domains_test.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"7" ) - if [ -f cpuset_load_balance_test.sh ]; then - ./cpuset_load_balance_test.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"8" ) - if [ -f cpuset_hotplug_test.sh ]; then - ./cpuset_hotplug_test.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"9" ) - if [ -f cpuset_memory_testset.sh ]; then - ./cpuset_memory_testset.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"10" ) - if [ -f cpuset_memory_pressure_testset.sh ]; then - ./cpuset_memory_pressure_testset.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"11" ) - if [ -f cpuset_memory_spread_testset.sh ]; then - ./cpuset_memory_spread_testset.sh - exit $?; - else - echo "Shell file not installed..Please check Makefile...Exiting" - exit -1; - fi; - ;; -"*" ) - usage; - exit -1; - ;; -esac - -echo "Cpuset Resource Controller test executed successfully."; -cd $PWD -exit 0; #to let PAN reprt success of test diff --git a/testcases/kernel/controllers/test_controllers.sh b/testcases/kernel/controllers/test_controllers.sh index d3c3362..7aa974f 100755 --- a/testcases/kernel/controllers/test_controllers.sh +++ b/testcases/kernel/controllers/test_controllers.sh @@ -47,8 +47,6 @@ then IOTHROTTLE_CONTROLLER_VALUE=`grep -w blockio /proc/cgroups | cut -f4`; FREEZER=`grep -w freezer /proc/cgroups | cut -f1`; FREEZER_VALUE=`grep -w freezer /proc/cgroups | cut -f4`; - CPUSET_CONTROLLER=`grep -w cpuset /proc/cgroups | cut -f1` - CPUSET_CONTROLLER_VALUE=`grep -w cpuset /proc/cgroups | cut -f4` CPUACCOUNT_CONTROLLER=`grep -w cpuacct /proc/cgroups | cut -f1` CPUACCOUNT_CONTROLLER_VALUE=`grep -w cpuacct /proc/cgroups | cut -f4` @@ -102,24 +100,6 @@ then echo "Kernel does not support freezer controller"; echo "Skipping all freezer testcases...."; fi - if [ "$CPUSET_CONTROLLER" = "cpuset" ] && [ "$CPUSET_CONTROLLER_VALUE" = "1" ] - then - $LTPROOT/testcases/bin/run_cpuset_test.sh 1; - $LTPROOT/testcases/bin/run_cpuset_test.sh 2; - $LTPROOT/testcases/bin/run_cpuset_test.sh 3; - $LTPROOT/testcases/bin/run_cpuset_test.sh 4; - $LTPROOT/testcases/bin/run_cpuset_test.sh 5; - $LTPROOT/testcases/bin/run_cpuset_test.sh 6; - $LTPROOT/testcases/bin/run_cpuset_test.sh 7; - $LTPROOT/testcases/bin/run_cpuset_test.sh 8; - $LTPROOT/testcases/bin/run_cpuset_test.sh 9; - $LTPROOT/testcases/bin/run_cpuset_test.sh 10; - $LTPROOT/testcases/bin/run_cpuset_test.sh 11; - else - echo "CONTROLLERS TESTCASES: WARNING"; - echo "Either Kernel does not support for cpuset controller or functionality is not enabled"; - echo "Skipping all cpuset controller testcases...."; - fi if [ "$CPUACCOUNT_CONTROLLER" = "cpuacct" ] && [ "$CPUACCOUNT_CONTROLLER_VALUE" = "1" ] then $LTPROOT/testcases/bin/run_cpuacct_test.sh 1; -- 1.7.1 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
