All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] Fix cpuhotplug testcase cpuhotplug01 and cpuhotplug03
@ 2012-11-12  7:33 jin.li
  2012-11-12  7:33 ` [LTP] [PATCH 1/3] Fix cpuhotplug test case cpuhotplug01 jin.li
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: jin.li @ 2012-11-12  7:33 UTC (permalink / raw)
  To: jin.li, gaowanlong, ltp-list

Hi,

Send out fix for cpuhotplug test case cpuhotplug01, cpuhotplug03 and
cpuhotplug05

Regards,

Jin



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [LTP] [PATCH 2/3] Fix cpuhotplug test case cpuhotplug03
@ 2012-11-12  7:30 jin.li
  0 siblings, 0 replies; 14+ messages in thread
From: jin.li @ 2012-11-12  7:30 UTC (permalink / raw)
  To: jin.li, ltp-list

From: Jin Li <jin.li@windriver.com>

Fix test case cpuhotplug03 as follows:
1. Avoid to check whether the cpu0 is on.
2. Check the cpu before turn it on

Signed-off-by: Jin Li <jin.li@windriver.com>
---
 .../hotplug/cpu_hotplug/functional/cpuhotplug03.sh  | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh
index ca636d1..516a21f 100755
--- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh
+++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh
@@ -60,15 +60,22 @@ until [ $TST_COUNT -gt $TST_TOTAL ]; do
 
 	# Turns on all CPUs and saves their states
 	for i in $( get_all_cpus ); do
-		if ! online_cpu $1; then
-			: $(( cpu += 1 ))
-			eval "on_${cpu}=$i"
-		fi
+            if [ "$i" = "cpu0" ]; then
+                continue
+            fi
+            if ! cpu_is_online $i; then
+		if ! online_cpu $i; then
+                    tst_resm TFAIL "Could not online cpu $i"
+                    exit_clean 1
+                fi
+                : $(( cpu += 1 ))
+                eval "on_${cpu}=$i"
+            fi
 		: $(( number_of_cpus += 1 ))
 	done
 
 	if ! offline_cpu ${CPU_TO_TEST} ; then
-		tst_resm TBAIL "CPU${CPU_TO_TEST} cannot be offlined"
+		tst_resm TFAIL "CPU${CPU_TO_TEST} cannot be offlined"
 		exit_clean 1
 	fi
 
@@ -90,7 +97,7 @@ until [ $TST_COUNT -gt $TST_TOTAL ]; do
 	tst_resm TINFO "Onlining CPU ${CPU_TO_TEST}"
 	online_cpu ${CPU_TO_TEST}
 	RC=$?
-	if [ $RC -eq 0 ]; then
+	if [ $RC -ne 0 ]; then
 		tst_resm TFAIL "CPU${CPU_TO_TEST} cannot be onlined"
 		exit_clean 1
 	fi
@@ -101,7 +108,7 @@ until [ $TST_COUNT -gt $TST_TOTAL ]; do
 	ps -o psr -o command --no-headers -C do_spin_loop
 	RC=$?
 	NUM=`ps -o psr -o command --no-headers -C do_spin_loop | sed -e "s/^ *//" | cut -d' ' -f 1 | grep "^${CPU_TO_TEST}$" | wc -l`
-	if [ $RC -eq 0 ]; then
+	if [ $RC -ne 0 ]; then
 		tst_resm TBROK "No do_spin_loop processes found on any processor"
 	elif [ $NUM -lt 1 ]; then
 		tst_resm TFAIL "No do_spin_loop processes found on CPU${CPU_TO_TEST}"
-- 
1.7.11


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2012-11-14  8:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-12  7:33 [LTP] Fix cpuhotplug testcase cpuhotplug01 and cpuhotplug03 jin.li
2012-11-12  7:33 ` [LTP] [PATCH 1/3] Fix cpuhotplug test case cpuhotplug01 jin.li
2012-11-14  6:04   ` Wanlong Gao
2012-11-14  6:14     ` Li, Jin
2012-11-12  7:34 ` [LTP] [PATCH 2/3] Fix cpuhotplug test case cpuhotplug03 jin.li
2012-11-14  6:29   ` Wanlong Gao
2012-11-14  7:01     ` Li, Jin
2012-11-14  7:17       ` Wanlong Gao
2012-11-14  7:23         ` Li, Jin
2012-11-14  8:23   ` Wanlong Gao
2012-11-12  7:34 ` [LTP] [PATCH 3/3] Fix cpuhotplug test case cpuhotplug05 jin.li
2012-11-14  6:38   ` Wanlong Gao
2012-11-14  8:23   ` Wanlong Gao
  -- strict thread matches above, loose matches on Subject: below --
2012-11-12  7:30 [LTP] [PATCH 2/3] Fix cpuhotplug test case cpuhotplug03 jin.li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.