public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2]: Added check to test_controller.sh
@ 2009-12-28 10:46 Rishikesh
  2009-12-29  9:22 ` Li Zefan
  0 siblings, 1 reply; 2+ messages in thread
From: Rishikesh @ 2009-12-28 10:46 UTC (permalink / raw)
  To: LTP; +Cc: iranna.ankad

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: ltp-mem-enable.patch --]
[-- Type: text/plain, Size: 4573 bytes --]

commit 0509a4c119d10b8d3e713cb1deaa9299f308c95a
Author: Rishikesh K Rajak <rishikesh@rishikesh.in.ibm.com>
Date:   Mon Dec 28 14:30:41 2009 +0530

    Added check for enablement of controller

diff --git a/testcases/kernel/controllers/test_controllers.sh b/testcases/kernel/controllers/test_controllers.sh
index f3a1daa..0ad5f53 100755
--- a/testcases/kernel/controllers/test_controllers.sh
+++ b/testcases/kernel/controllers/test_controllers.sh
@@ -39,13 +39,19 @@
 if [ -f /proc/cgroups ]
 then
 	CPU_CONTROLLER=`grep -w cpu /proc/cgroups | cut -f1`;
+	CPU_CONTROLLER_VALUE=`grep -w cpu /proc/cgroups | cut -f4`;
 	MEM_CONTROLLER=`grep -w memory /proc/cgroups | cut -f1`;
+	MEM_CONTROLLER_VALUE=`grep -w memory /proc/cgroups | cut -f4`;
 	IOTHROTTLE_CONTROLLER=`grep -w blockio /proc/cgroups | cut -f1`;
+	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`
 
-	if [ "$CPU_CONTROLLER" = "cpu" ]
+	if [ "$CPU_CONTROLLER" = "cpu" ] && [ "$CPU_CONTROLLER_VALUE" = "1" ]
 	then
 		$LTPROOT/testcases/bin/run_cpuctl_test.sh 1;
 		$LTPROOT/testcases/bin/run_cpuctl_test.sh 3;
@@ -63,11 +69,11 @@ then
 		$LTPROOT/testcases/bin/run_cpuctl_test_fj.sh
 	else
 		echo "CONTROLLERS TESTCASES: WARNING";
-		echo "Kernel does not support for cpu controller";
+		echo "Either Kernel does not support for cpu controller or functionality is not enabled";
 		echo "Skipping all cpu controller testcases....";
 	fi;
 
-	if [ "$MEM_CONTROLLER" = "memory" ]
+	if [ "$MEM_CONTROLLER" = "memory" ] && [ "$MEM_CONTROLLER_VALUE" = "1" ]
 	then
 		$LTPROOT/testcases/bin/run_memctl_test.sh 1;
 		$LTPROOT/testcases/bin/run_memctl_test.sh 2;
@@ -75,28 +81,29 @@ then
 		$LTPROOT/testcases/bin/run_memctl_test.sh 4;
 	else
 		echo "CONTROLLERS TESTCASES: WARNING";
-		echo "Kernel does not support for memory controller";
+		echo "Either Kernel does not support for memory controller or functionality is not enabled";
 		echo "Skipping all memory controller testcases....";
 	fi
 
-	if [ "$IOTHROTTLE_CONTROLLER" = "blockio" ]
+	if [ "$IOTHROTTLE_CONTROLLER" = "blockio" ] && [ "$IOTHROTTLE_CONTROLLER_VALUE" = "1" ]
 	then
 		$LTPROOT/testcases/bin/run_io_throttle_test.sh;
 	else
 		echo "CONTROLLERS TESTCASES: WARNING";
-		echo "Kernel does not support blockio controller";
+		echo "Either Kernel does not support for io controller or functionality is not enabled";
 		echo "Skipping all block device I/O throttling testcases....";
 	fi
 
-	if [ "$FREEZER" = "freezer" ]
+	if [ "$FREEZER" = "freezer" ] && [ "$FREEZER_VALUE" = "1" ]
 	then
 		"$LTPROOT/testcases/bin/run_freezer.sh"
 	else
 		echo "CONTROLLERS TESTCASES: WARNING";
+		echo "Either Kernel does not support for freezer or functionality is not enabled";
 		echo "Kernel does not support freezer controller";
 		echo "Skipping all freezer testcases....";
 	fi
-	if [ "$CPUSET_CONTROLLER" = "cpuset" ]
+	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;
@@ -111,21 +118,22 @@ then
 		$LTPROOT/testcases/bin/run_cpuset_test.sh 11;
 	else
 		echo "CONTROLLERS TESTCASES: WARNING";
-		echo "Kernel does not support cpuset controller";
+		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" ]
+	if [ "$CPUACCOUNT_CONTROLLER" = "cpuacct" ] && [ "$CPUACCOUNT_CONTROLLER_VALUE" = "1" ]
         then
                 $LTPROOT/testcases/bin/run_cpuacct_test.sh 1;
                 $LTPROOT/testcases/bin/run_cpuacct_test.sh 2;
         else
                 echo "Could not start cpu accounting controller test";
+		echo "Either Kernel does not support for cpu accounting controller or functionality is not enabled";
                 echo "usage: run_cpuacct_test.sh $TEST_NUM ";
                 echo "Skipping the cpu accounting controller test...";
         fi
 else
 	echo "CONTROLLERS TESTCASES: WARNING"
-	echo "Kernel does not support for control groups";
+	echo "Kernel does not support any controller";
 	echo "Skipping all controllers testcases....";
 fi

[-- Attachment #3: Type: text/plain, Size: 390 bytes --]

------------------------------------------------------------------------------
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 

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH 1/2]: Added check to test_controller.sh
  2009-12-28 10:46 [LTP] [PATCH 1/2]: Added check to test_controller.sh Rishikesh
@ 2009-12-29  9:22 ` Li Zefan
  0 siblings, 0 replies; 2+ messages in thread
From: Li Zefan @ 2009-12-29  9:22 UTC (permalink / raw)
  To: Rishikesh; +Cc: LTP, iranna.ankad

> commit 0509a4c119d10b8d3e713cb1deaa9299f308c95a
> Author: Rishikesh K Rajak <rishikesh@rishikesh.in.ibm.com>
> Date:   Mon Dec 28 14:30:41 2009 +0530
> 
>     Added check for enablement of controller

Acked-by: Li Zefan <lizf@cn.fujitsu.com>

But you should add your Signed-off-by in your patch.



------------------------------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-29  9:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-28 10:46 [LTP] [PATCH 1/2]: Added check to test_controller.sh Rishikesh
2009-12-29  9:22 ` Li Zefan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox