public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Poornima Nayak <mpnayak@linux.vnet.ibm.com>
To: ltp-list@lists.sourceforge.net, svaidy@linux.vnet.ibm.com,
	ego@in.ibm.com, arun@linux.vnet.ibm.com
Subject: [LTP] [Patch 1/4]Master script modified to enable testcases to run on Power
Date: Thu, 24 Dec 2009 23:45:32 +0530	[thread overview]
Message-ID: <20091224181532.12571.74576.sendpatchset@localhost.localdomain> (raw)

Patch to enable Power management testcases in LTP to run on Power platform

Signed-off-by: poornima nayak <mpnayak@linux.vnet.ibm.com>

diff -uprN ltp-intermediate-20091209.orig/testcases/kernel/power_management/runpwtests.sh ltp-intermediate-20091209.fixes/testcases/kernel/power_management/runpwtests.sh
--- ltp-intermediate-20091209.orig/testcases/kernel/power_management/runpwtests.sh	2009-12-09 13:18:25.000000000 +0530
+++ ltp-intermediate-20091209.fixes/testcases/kernel/power_management/runpwtests.sh	2009-12-24 23:16:39.859044825 +0530
@@ -28,10 +28,21 @@
 # History:      26 Aug 2008 - Created this file
 # 03 Nov 2008 - Added CPUIDLE sysfs testcase
 #
+# Function:     main
+#
+# Description:  - Execute all tests, exit with test status.
+#
+# Exit:         - zero on success
+#               - non-zero on failure.
+#
+
+#List of reusable functions defined in pm_include.sh
+. ./pm_include.sh
+
+RC=0            #Return status
 
 # Exporting Required variables
 export TST_TOTAL=1
-#LTPTMP=${TMP}
 export PATH=${PATH}:.
 export TCID="Power_Management"
 export TST_COUNT=0
@@ -40,48 +51,39 @@ export analysis="/proctstat"
 
 YES=0
 NO=1
-#List of reusable functions defined in pm_include.sh
-. ./pm_include.sh
-
-# Function:     main
-#
-# Description:  - Execute all tests, exit with test status.
-#
-# Exit:         - zero on success
-#               - non-zero on failure.
-#
-RC=0		#Return status
 
 # Checking required kernel version and architecture
 tst_kvercmp 2 6 21; rc=$?
 if [ $rc -ne 1 -a $rc -ne 2 ] ; then
-	tst_resm TCONF "Kernel version not supported; not running testcases"
-	exit 0
+        tst_resm TCONF "Kernel version not supported; not running testcases"
+        exit 0
 else
-	case "$(uname -m)" in
-	i[4-6]86|x86_64)
+        case "$(uname -m)" in
+        i[4-6]86|x86_64)
+                ;;
+        powerpc|ppc|powerpc64|ppc64)
 		;;
-	*)
-		tst_resm TCONF "Arch not supported; not running testcases"
-		exit 0
-		;;
-	esac
+        *)
+                tst_resm TCONF "Arch not supported; not running testcases"
+                exit 0
+                ;;
+        esac
 fi
 
 tst_kvercmp 2 6 29; rc=$?
 if [ $rc -eq 2 ] ; then
-	max_sched_mc=2
-	max_sched_smt=2
+        max_sched_mc=2
+        max_sched_smt=2
 else
-	max_sched_mc=1
-	max_sched_smt=1
+        max_sched_mc=1
+        max_sched_smt=1
 fi
 
 tst_kvercmp 2 6 31; rc=$?
 if [ $rc -eq 1 -o $rc -eq 2 ] ; then
-	timer_migr_support_compatible=1
+        timer_migr_support_compatible=0
 else
-	timer_migr_support_compatible=0
+        timer_migr_support_compatible=1
 fi
 
 is_hyper_threaded; hyper_threaded=$?
@@ -90,7 +92,6 @@ 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 [ $multi_socket -eq $YES -a $multi_core -eq $YES ] ; then
 	if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
@@ -103,6 +104,25 @@ if [ $multi_socket -eq $YES -a $multi_co
 	else
     	tst_resm TCONF "Required kernel configuration for SCHED_MC NOT set"
 	fi
+
+	: $(( TST_COUNT+=1))
+	if [ -f /proc/sys/kernel/timer_migration ]; then
+    	if [ $timer_migr_support_compatible -eq $YES ]; then
+        	if test_timer_migration.sh; then
+            	tst_resm TPASS "Timer Migration interface test"
+        	else
+            	RC=$?
+            	tst_resm TFAIL "Timer migration interface test"
+        	fi
+    	fi
+	else
+    	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
 else
 	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"
@@ -135,7 +155,6 @@ else
 fi
 
 # Checking cpufreq sysfs interface files
-#check_config.sh config_cpu_freq || RC=$?
 : $(( TST_COUNT += 1 ))
 if [ -d /sys/devices/system/cpu/cpu0/cpufreq ] ; then
     if check_cpufreq_sysfs_files.sh; then
@@ -187,12 +206,13 @@ else
 fi
 
 # sched_domain test
-if ! type python > /dev/null ; then
+which python > /dev/null
+if [ $? -ne 0 ] ; then
 	tst_resm TCONF "Python is not installed, CPU Consoldation\
 test cannot run"
 else
 	if [ -f /sys/devices/system/cpu/sched_mc_power_savings ] ; then
-    		echo "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=$?
@@ -210,25 +230,6 @@ else
 	fi
 fi
 
-: $(( TST_COUNT+=1))
-if [ -f /proc/sys/kernel/timer_migration ]; then
-	if [ $timer_migr_support_compatible -eq $YES ]; then
-		if test_timer_migration.sh; then
-        	tst_resm TPASS "Timer Migration interface test"
-    	else
-        	RC=$?
-        	tst_resm TFAIL "Timer migration interface test"
-		fi
-	fi
-else
-	if [ $timer_migr_support_compatible -eq $YES ]; then
-		RC=$?
-		tst_resm TFAIL "Timer migration interface missing"
-	else
-		tst_resm TCONF "Kernel version does not support Timer migration"
-	fi
-fi
-
 if [ $# -gt 0 -a "$1" = "-exclusive" ]; then 
 	# Test CPU consolidation 
 	if [ $multi_socket -eq $YES -a $multi_core -eq $YES ]; then
@@ -266,7 +267,7 @@ if [ $# -gt 0 -a "$1" = "-exclusive" ]; 
 
 	fi
 
-	if [ $hyper_threaded -eq $YES -a $multi_socket -eq $YES -a $multi_core -eq $NO ]; then
+	if [ $hyper_threaded -eq $YES ]; then
 			#Testcase to validate consolidation at core level
 			for sched_smt in `seq 0 $max_sched_smt`; do
 				if [ $sched_smt -eq 2 ]; then
@@ -319,7 +320,7 @@ if [ $# -gt 0 -a "$1" = "-exclusive" ]; 
 	fi
 
     # Verify threads consolidation stops when sched_smt is disabled in HT systems
-	if [ $hyper_threaded -eq $YES -a $multi_socket -eq $YES ]; then
+	if [ $hyper_threaded -eq $YES ]; then
 		# Vary only sched_smt from 1 to 0 when workload is running and ensure that
 		# tasks do not consolidate to single core when sched_smt is set to 0
 		: $(( TST_COUNT += 1 ))

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

             reply	other threads:[~2009-12-24 18:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-24 18:15 Poornima Nayak [this message]
2009-12-24 18:15 ` [LTP] [Patch 2/4]Reusable functions modified to learn topology from sysfs Poornima Nayak
2009-12-24 20:11   ` Garrett Cooper
2010-01-11  4:25   ` Gautham R Shenoy
2009-12-24 18:15 ` [LTP] [Patch 3/4]Python functions modified to run on Power platform Poornima Nayak
2009-12-24 20:37   ` Garrett Cooper
2010-01-11  4:50   ` Gautham R Shenoy
2009-12-24 18:16 ` [LTP] [Patch 4/4]Readme modified based on review comments Poornima Nayak
2009-12-24 20:04   ` Garrett Cooper
2009-12-24 20:21 ` [LTP] [Patch 1/4]Master script modified to enable testcases to run on Power Garrett Cooper
2010-01-08  7:20   ` Poornima Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091224181532.12571.74576.sendpatchset@localhost.localdomain \
    --to=mpnayak@linux.vnet.ibm.com \
    --cc=arun@linux.vnet.ibm.com \
    --cc=ego@in.ibm.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=svaidy@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox