Return-Path: Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by 3yr0jf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Mf7Wo-0005Uw-9R for ltp-list@lists.sourceforge.net; Sun, 23 Aug 2009 07:30:14 +0000 Received: from e5.ny.us.ibm.com ([32.97.182.145]) by 3b2kzd1.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1Mf7Wj-0002cF-Df for ltp-list@lists.sourceforge.net; Sun, 23 Aug 2009 07:30:14 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e5.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n7N7LueX012560 for ; Sun, 23 Aug 2009 03:21:56 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n7N7U44i254640 for ; Sun, 23 Aug 2009 03:30:04 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n7N7U35L006300 for ; Sun, 23 Aug 2009 03:30:03 -0400 From: Subrata Modak In-Reply-To: <20090820160750.30926.34693.sendpatchset@localhost.localdomain> References: <20090820160655.30926.34854.sendpatchset@localhost.localdomain> <20090820160750.30926.34693.sendpatchset@localhost.localdomain> Date: Sun, 23 Aug 2009 12:59:19 +0530 Message-Id: <1251012559.16822.41.camel@subratamodak.linux.ibm.com> Mime-Version: 1.0 Subject: Re: [LTP] Patch for PM Master script to integrate new testcases Reply-To: subrata@linux.vnet.ibm.com List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: Poornima Nayak Cc: ltp-list@lists.sourceforge.net, arun@linux.vnet.ibm.com, vaidy , gautham On Thu, 2009-08-20 at 21:37 +0530, Poornima Nayak wrote: > Modified Master script of power management testcases to include new test case > and to increase test coverage on system which is not multi core but hyper threaded. > > Signed-off-by: poornima nayak Thanks. Regards-- Subrata > > diff -uprN ltp-full-20090731_orig/testcases/kernel/power_management/runpwtests.sh ltp-full-20090731/testcases/kernel/power_management/runpwtests.sh > --- ltp-full-20090731_orig/testcases/kernel/power_management/runpwtests.sh 2009-08-20 19:59:11.000000000 +0530 > +++ ltp-full-20090731/testcases/kernel/power_management/runpwtests.sh 2009-08-20 20:41:02.000000000 +0530 > @@ -40,6 +40,7 @@ export contacts="mpnayak@linux.vnet.ibm. > export analysis="/proctstat" > > YES=0 > +NO=1 > #List of reusable functions defined in pm_include.sh > . ./pm_include.sh > > @@ -61,34 +62,50 @@ if [ $RC -eq 1 ] ; then > fi > > is_hyper_threaded; hyper_threaded=$? > +is_multi_socket; multi_socket=$? > +is_multi_core; multi_core=$? > +is_dual_core; dual_core=$? > > #Checking sched_mc sysfs interface > #check_config.sh config_sched_mc || RC=$? > TST_COUNT=1 > -if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then > - if test_sched_mc.sh ; then > - tst_resm TPASS "SCHED_MC sysfs tests" > +if [ $multi_socket -eq $YES -a $dual_core -eq $YES ] ; then > + if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then > + if test_sched_mc.sh ; then > + tst_resm TPASS "SCHED_MC sysfs tests" > + else > + RC=$? > + tst_resm TFAIL "SCHED_MC sysfs tests" > + fi > else > - RC=$? > - tst_resm TFAIL "SCHED_MC sysfs tests" > + tst_resm TCONF "Required kernel configuration for SCHED_MC NOT set" > fi > else > - tst_resm TCONF "Required kernel configuration for SCHED_MC NOT set" > + if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then > + tst_resm TFAIL "sched_mc_power_savings interface in system which is not a multi socket &(/) multi core" > + else > + tst_resm TCONF "Not a suitable architecture for SCHED_MC test" > + fi > fi > > # Test sched_smt_power_savings interface on HT machines > : $(( TST_COUNT += 1 )) > -if [ -f /sys/devices/system/cpu/sched_smt_power_savings ] ; then > - if test_sched_smt.sh; then > - tst_resm TPASS "SCHED_SMT sysfs test" > +if [ $hyper_threaded -eq $YES ]; then > + if [ -f /sys/devices/system/cpu/sched_smt_power_savings ] ; then > + if test_sched_smt.sh; then > + tst_resm TPASS "SCHED_SMT sysfs test" > + else > + RC=$? > + tst_resm TFAIL "SCHED_SMT sysfs test" > + fi > else > RC=$? > - tst_resm TFAIL "SCHED_SMT sysfs test" > - fi > + tst_resm TFAIL "Required kernel configuration for SCHED_SMT NOT set" > + fi > else > - if [ $hyper_threaded -eq $YES ]; then > + if [ -f /sys/devices/system/cpu/sched_smt_power_savings ] ; then > RC=$? > - tst_resm TFAIL "Required kernel configuration for SCHED_SMT NOT set" > + tst_resm TFAIL "sched_smt_power_saving interface in system not hyper-threaded" > else > tst_resm TCONF "Required Hyper Threading support for SCHED_SMT test" > fi > @@ -152,13 +169,13 @@ if [ $? -ne 0 ] ; then > tst_resm TCONF "Python is not installed, CPU Consoldation\ > test cannot run" > else > - get_max_sched_mc; max_sched_mc=$? > + get_sched_values sched_mc; max_sched_mc=$? > for sched_mc in `seq 0 $max_sched_mc`; do > : $(( TST_COUNT+=1)) > sched_domain.py -c $sched_mc; RC=$? > analyze_sched_domain_result $sched_mc $RC > if [ $hyper_threaded -eq $YES ]; then > - get_max_sched_smt ; max_sched_smt=$? > + get_sched_values sched_smt; max_sched_smt=$? > for sched_smt in `seq 0 $max_sched_smt`; do > # Testcase to validate sched_domain tree > : $(( TST_COUNT+=1)) > @@ -168,32 +185,54 @@ else > fi > done > fi > + > +: $(( TST_COUNT+=1)) > +if [ -f /proc/sys/kernel/timer_migration ]; then > + if test_timer_migration.sh; then > + tst_resm TPASS "Timer Migration interface test" > + else > + RC=$? > + tst_resm TFAIL "Timer migration interface test" > + fi > +else > + check_kv_arch "timer_migration"; supp=$? > + if [ $supp -eq $YES ]; then > + RC=$? > + tst_resm TFAIL "Timer migration interface missing" > + else > + tst_resm TCONF "Kernel version does not support Timer migration" > + fi > +fi > + > +: $(( TST_COUNT+=1)) > +if check_cpufreq_sysfs_files.sh; then > + tst_resm TPASS "CPUFREQ sysfs tests" > + else > + RC=$? > + tst_resm TFAIL "CPUFREQ sysfs tests " > + fi > + > if [ $# -gt 0 -a "$1" = "-exclusive" ]; then > # Test CPU consolidation > - which python > /dev/null > - if [ $? -ne 0 ] ; then > - tst_resm TCONF "Python is not installed, CPU Consoldation\ > - test not run" > - else > - sched_mc_smt_pass_cnt=0 > + if [ $multi_socket -eq $YES -a $multi_core -eq $YES ]; then > work_loads_list="ebizzy kernbench" > for sched_mc in `seq 0 $max_sched_mc`; do > for work_load in ${work_loads_list} > - do > + do > : $(( TST_COUNT += 1 )) > sched_mc_pass_cnt=0 > for repeat_test in `seq 1 10`; do > - #Testcase to validate CPU consolidation for sched_mc > + #Testcase to validate CPU consolidation for sched_mc > if cpu_consolidation.py -c $sched_mc -w $work_load ; then > : $(( sched_mc_pass_cnt += 1 )) > fi > done > - analyze_consolidation_result $sched_mc $work_load $sched_mc_pass_cnt > + analyze_package_consolidation_result $sched_mc $work_load $sched_mc_pass_cnt > done > if [ $hyper_threaded -eq $YES ]; then > for sched_smt in `seq 0 $max_sched_smt`; do > for work_load in ${work_loads_list}; do > - : $(( TST_COUNT += 1 )) > + : $(( TST_COUNT += 1 )) > sched_mc_smt_pass_cnt=0 > for repeat_test in `seq 1 10`; do > # Testcase to validate CPU consolidation for > @@ -201,24 +240,26 @@ if [ $# -gt 0 -a "$1" = "-exclusive" ]; > if cpu_consolidation.py -c $sched_mc -t $sched_smt -w $work_load; then > : $(( sched_mc_smt_pass_cnt += 1 )) > fi > + echo "sched_mc_smt_pass_cnt = $sched_mc_smt_pass_cnt" > done > - analyze_consolidation_result $sched_mc $work_load $sched_mc_smt_pass_cnt $sched_smt > - > - #Testcase to validate consolidation at core level > - sched_mc_smt_pass_cnt=0 > - stress="thread" > - : $(( TST_COUNT += 1 )) > - for repeat_test in `seq 1 10`; do > - if cpu_consolidation.py -c $sched_mc -t $sched_smt -w $work_load -s $stress; then > - : $(( sched_mc_smt_pass_cnt += 1 )) > - fi > - done > - analyze_consolidation_result $sched_mc $work_load $sched_mc_smt_pass_cnt $sched_smt $stress > + analyze_package_consolidation_result $sched_mc $work_load $sched_mc_smt_pass_cnt $sched_smt > done > done > fi > done > fi > + if [ $hyper_threaded -eq $YES ]; then > + #Testcase to validate consolidation at core level > + sched_smt_pass_cnt=0 > + : $(( TST_COUNT += 1 )) > + stress="thread" > + for repeat_test in `seq 1 10`; do > + if cpu_consolidation.py -c $sched_mc -t $sched_smt -w $work_load -s $stress; then > + : $(( sched_smt_pass_cnt += 1 )) > + fi > + done > + analyze_core_consolidation_result $sched_smt $work_load $sched_smt_pass_cnt > + fi > fi > > exit $RC > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Ltp-list mailing list > Ltp-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ltp-list ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list