Fix cpuhotplug testcase cpuhotplug01 and cpuhotplug03
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 1/3 Fix cpuhotplug test case cpuhotplug01
From: Jin Li <[email protected]>
Fix for case cpuhotplug01:
1. Give all available parameters to function migrate_irq.
2. Add the INFO note for the IRQ whose IRQ affinity is NOT permitted to changed.
3. Remove the variable cpustate and related code in function do_clean. The cpu, which was off before the test start, has been closed correctly in do_clean.
4. Add test case PASS at the end of the passed case
--- .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh | 11 +++++------ testcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns | 12 ++++++++---- 2 files changed, 13 insertions(+), 10 deletions(-)
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh +5 -6
@@ -81,11 +81,6 @@ do_clean() offline_cpu $offline_cpu : $(( CPU_COUNT -= 1 )) done - if [ "x${cpustate}" = x1 ]; then - online_cpu ${CPU_TO_TEST} - else - offline_cpu ${CPU_TO_TEST} - fi }
@@ -98,7 +93,7 @@ do_offline() CPU=${1#cpu} # Migrate some irq's this way first. IRQS=`get_all_irqs` - migrate_irq ${CPU} ${IRQS} + migrate_irq "${CPU}" "${IRQS}" offline_cpu ${CPU} if [ $? -ne 0 ]; then if [ "$CPU" -ne 0 ]; then
@@ -191,4 +186,8 @@ do done +if [ "$RC" -eq 0 ];then + tst_resm TPASS "online and offline cpu${CPU} when writing disk" +fi + exit_clean $RC
testcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns +8 -4
@@ -1,3 +1,5 @@ +#!/bin/sh + # hotplug.fns - Collection of functions for hotplugging # operations.
@@ -27,7 +29,8 @@ migrate_irq() IRQS=$2 for irq in ${IRQS} do - echo $MASK > /proc/irq/${irq}/smp_affinity + echo $MASK > /proc/irq/${irq}/smp_affinity || \ + tst_resm TINFO "It is NOT permitted to change the IRQ $irq smp_affinity" done }
@@ -106,7 +109,8 @@ offline_cpu() get_all_cpus() { [ -d /sys/devices/system/cpu/cpu0 ] || return 1 - ls -dr /sys/devices/system/cpu/cpu[0-9]* || return 2 + ls -dr /sys/devices/system/cpu/cpu[0-9]* | \ + sed "s/\/sys\/devices\/system\/cpu\///g" || return 2 }
@@ -183,8 +187,8 @@ cpu_is_valid() # cpu_is_online(CPU) # -# Returns a true value if the given CPU number is currently online, -# false otherwise. This function requires the system's CPUs have +# Returns a 0 value if the given CPU number is currently online, +# 1 otherwise. This function requires the system's CPUs have # hotplug capabilities. # cpu_is_online()
Signature · 12 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 1/3] Fix cpuhotplug test case cpuhotplug01
Quoted 21 lines · On 11/12/2012 03:33 PM, [email protected] wrote:
From: Jin Li <[email protected]>
Fix for case cpuhotplug01:
1. Give all available parameters to function
migrate_irq.
2. Add the INFO note for the IRQ whose IRQ affinity is NOT permitted to changed.
3. Remove the variable cpustate and related code in functiondo_clean. The cpu, which was off before the test start, has been closed correctly indo_clean.
4. Add test case PASS at the end of the passed caseSigned-off-by Jin Li <[email protected]>--- .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh | 11 +++++------ testcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns | 12 ++++++++---- 2 files changed, 13 insertions(+), 10 deletions(-)testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh +0
-0
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh do_clean() · line 84
Quoted 4 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh +0
-1@@ -81,11 +81,6 @@ do_clean() offline_cpu $offline_cpu : $(( CPU_COUNT -= 1 )) done - if [ "x${cpustate}" = x1 ]; then
If so, the cpustate variable need be removed?
Thanks,
Wanlong Gao
Quoted 57 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh +5
-5- online_cpu ${CPU_TO_TEST} - else - offline_cpu ${CPU_TO_TEST} - fi }@@ -98,7 +93,7 @@ do_offline() CPU=${1#cpu} # Migrate some irq's this way first. IRQS=`get_all_irqs` - migrate_irq ${CPU} ${IRQS} + migrate_irq "${CPU}" "${IRQS}" offline_cpu ${CPU} if [ $? -ne 0 ]; then if [ "$CPU" -ne 0 ]; then@@ -191,4 +186,8 @@ do done +if [ "$RC" -eq 0 ];then + tst_resm TPASS "online and offline cpu${CPU} when writing disk" +fi + exit_clean $RCtestcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns +6
-2@@ -1,3 +1,5 @@ +#!/bin/sh + # hotplug.fns - Collection of functions for hotplugging # operations.@@ -27,7 +29,8 @@ migrate_irq() IRQS=$2 for irq in ${IRQS} do - echo $MASK > /proc/irq/${irq}/smp_affinity + echo $MASK > /proc/irq/${irq}/smp_affinity || \ + tst_resm TINFO "It is NOT permitted to change the IRQ $irq smp_affinity" done }@@ -106,7 +109,8 @@ offline_cpu() get_all_cpus() { [ -d /sys/devices/system/cpu/cpu0 ] || return 1 - ls -dr /sys/devices/system/cpu/cpu[0-9]* || return 2 + ls -dr /sys/devices/system/cpu/cpu[0-9]* | \ + sed "s/\/sys\/devices\/system\/cpu\///g" || return 2 }
testcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns cpu_is_valid() · line 194
Quoted 10 lines
testcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns +2
-2@@ -183,8 +187,8 @@ cpu_is_valid() # cpu_is_online(CPU) # -# Returns a true value if the given CPU number is currently online, -# false otherwise. This function requires the system's CPUs have +# Returns a 0 value if the given CPU number is currently online, +# 1 otherwise. This function requires the system's CPUs have # hotplug capabilities. # cpu_is_online()
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 1/3] Fix cpuhotplug test case cpuhotplug01
Quoted 17 lines · Wanlong Gao
Quoted 16 lines · On 11/12/2012 03:33 PM, [email protected] wrote:
From: Jin Li<[email protected]>
Fix for case cpuhotplug01:
1. Give all available parameters to function
migrate_irq.
2. Add the INFO note for the IRQ whose IRQ affinity is NOT permitted to changed.
3. Remove the variable cpustate and related code in functiondo_clean. The cpu, which was off before the test start, has been closed correctly indo_clean.
4. Add test case PASS at the end of the passed caseSigned-off-by Jin Li<[email protected]>--- .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh | 11 +++++------ testcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns | 12 ++++++++---- 2 files changed, 13 insertions(+), 10 deletions(-)
Quoted 11 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh do_clean() · line 84
Quoted 9 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh +0
-1@@ -81,11 +81,6 @@ do_clean() offline_cpu $offline_cpu : $(( CPU_COUNT -= 1 )) done - if [ "x${cpustate}" = x1 ]; thenIf so, the cpustate variable need be removed?
Yep.
Thanks for your reminding.
Any other comments about other two patches?
Regards,
Jin
Quoted 77 lines
Thanks,
Wanlong GaoQuoted 57 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug01.sh +5
-5- online_cpu ${CPU_TO_TEST} - else - offline_cpu ${CPU_TO_TEST} - fi }@@ -98,7 +93,7 @@ do_offline() CPU=${1#cpu} # Migrate some irq's this way first. IRQS=`get_all_irqs` - migrate_irq ${CPU} ${IRQS} + migrate_irq "${CPU}" "${IRQS}" offline_cpu ${CPU} if [ $? -ne 0 ]; then if [ "$CPU" -ne 0 ]; then@@ -191,4 +186,8 @@ do done +if [ "$RC" -eq 0 ];then + tst_resm TPASS "online and offline cpu${CPU} when writing disk" +fi + exit_clean $RCtestcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns +6
-2@@ -1,3 +1,5 @@ +#!/bin/sh + # hotplug.fns - Collection of functions for hotplugging # operations.@@ -27,7 +29,8 @@ migrate_irq() IRQS=$2 for irq in ${IRQS} do - echo $MASK> /proc/irq/${irq}/smp_affinity + echo $MASK> /proc/irq/${irq}/smp_affinity || \ + tst_resm TINFO "It is NOT permitted to change the IRQ $irq smp_affinity" done }@@ -106,7 +109,8 @@ offline_cpu() get_all_cpus() { [ -d /sys/devices/system/cpu/cpu0 ] || return 1 - ls -dr /sys/devices/system/cpu/cpu[0-9]* || return 2 + ls -dr /sys/devices/system/cpu/cpu[0-9]* | \ + sed "s/\/sys\/devices\/system\/cpu\///g" || return 2 }testcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns cpu_is_valid() · line 194
Quoted 10 lines
testcases/kernel/hotplug/cpu_hotplug/include/hotplug.fns +2
-2@@ -183,8 +187,8 @@ cpu_is_valid() # cpu_is_online(CPU) # -# Returns a true value if the given CPU number is currently online, -# false otherwise. This function requires the system's CPUs have +# Returns a 0 value if the given CPU number is currently online, +# 1 otherwise. This function requires the system's CPUs have # hotplug capabilities. # cpu_is_online()------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
Quoted 8 lines
web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 2/3 Fix cpuhotplug test case cpuhotplug03
In reply to [email protected]From: Jin Li <[email protected]>
Fix test case cpuhotplug03 as follows:
1. Avoid to check whether the cpu0 is on.
2. Check the cpu before turn it on
--- .../hotplug/cpu_hotplug/functional/cpuhotplug03.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +14 -7
@@ -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}"
Signature · 12 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 2/3] Fix cpuhotplug test case cpuhotplug03
Quoted 44 lines · On 11/12/2012 03:34 PM, [email protected] wrote:
From: Jin Li <[email protected]>
Fix test case cpuhotplug03 as follows:
1. Avoid to check whether the cpu0 is on.
2. Check the cpu before turn it onSigned-off-by Jin Li <[email protected]>--- .../hotplug/cpu_hotplug/functional/cpuhotplug03.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +12
-5@@ -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
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh until [ $TST_COUNT -gt $TST_TOTAL ]; do · line 101
Quoted 6 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1
-1@@ -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"
I test with your patch and always failed here,
Running tests.......
<<<test_start>>>
tag=cpuhotplug03 stime=1352874488
cmdline="export CPU_TO_TEST=1; $LTPROOT/testcases/bin/cpu_hotplug/functional/cpuhotplug03.sh" contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
Name: cpuhotplug03 Date: Wed Nov 14 14:28:08 CST 2012 Desc: Do tasks get scheduled to a newly on-lined CPU?
CPU is 1
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 31631 3.0 0.0 134116 1556 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31632 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31634 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31635 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31636 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31637 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31638 2.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31639 1.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31643 0.0 0.0 133488 1304 pts/1 S 14:28 0:00 grep do_spin_loop cpuhotplug03 0 TINFO : Onlining CPU 1 cpuhotplug03 1 TFAIL : CPU1 cannot be onlined
Wed Nov 14 14:28:08 CST 2012
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no cutime=37 cstime=4
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20120903-133-gb631790
###############################################################
Done executing testcases.
LTP Version: 20120903-133-gb631790
###############################################################Thanks,
Wanlong Gao
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh until [ $TST_COUNT -gt $TST_TOTAL ]; do · line 114
Quoted 12 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1
-1exit_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}"
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 2/3] Fix cpuhotplug test case cpuhotplug03
Quoted 44 lines · Wanlong Gao
Quoted 43 lines · On 11/12/2012 03:34 PM, [email protected] wrote:
From: Jin Li<[email protected]>
Fix test case cpuhotplug03 as follows:
1. Avoid to check whether the cpu0 is on.
2. Check the cpu before turn it onSigned-off-by Jin Li<[email protected]>--- .../hotplug/cpu_hotplug/functional/cpuhotplug03.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +12
-5@@ -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
Quoted 7 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh until [ $TST_COUNT -gt $TST_TOTAL ]; do · line 101
Quoted 7 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1
-1@@ -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"
Looks strange. It's just what I fixed.
Could you please help to confirm that the 0002-patch is applied correctly?
Thanks,
Jin
Quoted 46 lines
I test with your patch and always failed here,
Running tests.......
<<<test_start>>>
tag=cpuhotplug03 stime=1352874488
cmdline="export CPU_TO_TEST=1;$LTPROOT/testcases/bin/cpu_hotplug/functional/cpuhotplug03.sh" contacts=""
analysis=exit
<<<test_output>>>
incrementing stopName: cpuhotplug03 Date: Wed Nov 14 14:28:08 CST 2012 Desc: Do tasks get scheduled to a newly on-lined CPU?CPU is 1
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 31631 3.0 0.0 134116 1556 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31632 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31634 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31635 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31636 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31637 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31638 2.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31639 1.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31643 0.0 0.0 133488 1304 pts/1 S 14:28 0:00 grep do_spin_loop cpuhotplug03 0 TINFO : Onlining CPU 1 cpuhotplug03 1 TFAIL : CPU1 cannot be onlinedWed Nov 14 14:28:08 CST 2012
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no cutime=37 cstime=4
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20120903-133-gb631790############################################################### Done executing testcases. LTP Version: 20120903-133-gb631790 ###############################################################Thanks,
Wanlong Gao
Quoted 13 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh until [ $TST_COUNT -gt $TST_TOTAL ]; do · line 114
Quoted 12 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1
-1exit_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}"
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 2/3] Fix cpuhotplug test case cpuhotplug03
Quoted 57 lines · Jin
Quoted 44 lines · Wanlong Gao
Quoted 43 lines · On 11/12/2012 03:34 PM, [email protected] wrote:
From: Jin Li<[email protected]>
Fix test case cpuhotplug03 as follows:
1. Avoid to check whether the cpu0 is on.
2. Check the cpu before turn it onSigned-off-by Jin Li<[email protected]>--- .../hotplug/cpu_hotplug/functional/cpuhotplug03.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +12
-5@@ -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 fiQuoted 7 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh until [ $TST_COUNT -gt $TST_TOTAL ]; do · line 101
Quoted 7 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1
-1@@ -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"Looks strange. It's just what I fixed.
Quoted 1 line
Could you please help to confirm that the 0002-patch is applied correctly?
I tested again and it passed. Maybe caused by some cache. So, can you resend your 1/3 patch and I can apply all these three.
Thanks,
Wanlong Gao
Quoted 65 lines
Thanks,
Jin
Quoted 59 lines
I test with your patch and always failed here,
Running tests.......
<<<test_start>>>
tag=cpuhotplug03 stime=1352874488
cmdline="export CPU_TO_TEST=1;$LTPROOT/testcases/bin/cpu_hotplug/functional/cpuhotplug03.sh" contacts=""
analysis=exit
<<<test_output>>>
incrementing stopName: cpuhotplug03 Date: Wed Nov 14 14:28:08 CST 2012 Desc: Do tasks get scheduled to a newly on-lined CPU?CPU is 1
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 31631 3.0 0.0 134116 1556 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31632 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31634 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31635 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31636 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31637 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31638 2.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31639 1.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31643 0.0 0.0 133488 1304 pts/1 S 14:28 0:00 grep do_spin_loop cpuhotplug03 0 TINFO : Onlining CPU 1 cpuhotplug03 1 TFAIL : CPU1 cannot be onlinedWed Nov 14 14:28:08 CST 2012
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no cutime=37 cstime=4
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20120903-133-gb631790############################################################### Done executing testcases. LTP Version: 20120903-133-gb631790 ###############################################################Thanks,
Wanlong GaoQuoted 12 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1
-1exit_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}"
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 2/3] Fix cpuhotplug test case cpuhotplug03
Quoted 58 lines · Wanlong Gao
Quoted 57 lines · Jin
Quoted 44 lines · Wanlong Gao
Quoted 43 lines · On 11/12/2012 03:34 PM, [email protected] wrote:
From: Jin Li<[email protected]>
Fix test case cpuhotplug03 as follows:
1. Avoid to check whether the cpu0 is on.
2. Check the cpu before turn it onSigned-off-by Jin Li<[email protected]>--- .../hotplug/cpu_hotplug/functional/cpuhotplug03.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +12
-5@@ -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 fiQuoted 7 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh until [ $TST_COUNT -gt $TST_TOTAL ]; do · line 101
Quoted 7 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1
-1@@ -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"Looks strange. It's just what I fixed.
Quoted 4 lines
Quoted 1 line
Could you please help to confirm that the 0002-patch is applied correctly?
I tested again and it passed. Maybe caused by some cache. So, can you resend your 1/3 patch and I can apply all these three.
Get it. V2 will come up soon.
Jin
Quoted 70 lines
Thanks,
Wanlong GaoQuoted 65 lines
Thanks,
Jin
Quoted 59 lines
I test with your patch and always failed here,
Running tests.......
<<<test_start>>>
tag=cpuhotplug03 stime=1352874488
cmdline="export CPU_TO_TEST=1;$LTPROOT/testcases/bin/cpu_hotplug/functional/cpuhotplug03.sh" contacts=""
analysis=exit
<<<test_output>>>
incrementing stopName: cpuhotplug03 Date: Wed Nov 14 14:28:08 CST 2012 Desc: Do tasks get scheduled to a newly on-lined CPU?CPU is 1
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 31631 3.0 0.0 134116 1556 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31632 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31634 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31635 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31636 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31637 0.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31638 2.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31639 1.0 0.0 134116 1560 pts/1 R 14:28 0:00 /bin/sh /opt/ltp/testcases/bin/cpu_hotplug/tools/do_spin_loop root 31643 0.0 0.0 133488 1304 pts/1 S 14:28 0:00 grep do_spin_loop cpuhotplug03 0 TINFO : Onlining CPU 1 cpuhotplug03 1 TFAIL : CPU1 cannot be onlinedWed Nov 14 14:28:08 CST 2012
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no cutime=37 cstime=4
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: 20120903-133-gb631790############################################################### Done executing testcases. LTP Version: 20120903-133-gb631790 ###############################################################Thanks,
Wanlong GaoQuoted 12 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug03.sh +1
-1exit_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}"
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Wanlong Gao
AppliedRe: [LTP] [PATCH 2/3] Fix cpuhotplug test case cpuhotplug03
In reply to [email protected]Quoted 5 lines · On 11/12/2012 03:34 PM, [email protected] wrote:
From: Jin Li <[email protected]>
Fix test case cpuhotplug03 as follows:
1. Avoid to check whether the cpu0 is on.
2. Check the cpu before turn it on
Applied, thank you.
Wanlong Gao
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 3/3 Fix cpuhotplug test case cpuhotplug05
In reply to [email protected]From: Jin Li <[email protected]>
Check whether sar is available befor run test
--- testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh | 5 +++++ 1 file changed, 5 insertions(+)
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh +5 -0
@@ -27,6 +27,11 @@ Desc: Does sar behave properly during CPU hotplug events? EOF +which sar > /dev/null 2>&1 || { + tst_resm TCONF "sar does not exist" + exit_clean 1 +} + # Verify the specified CPU is available if ! cpu_is_valid "${CPU_TO_TEST}" ; then tst_resm TBROK"CPU${CPU_TO_TEST} not found"
Signature · 12 lines
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 [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH 3/3] Fix cpuhotplug test case cpuhotplug05
Quoted 3 lines · On 11/12/2012 03:34 PM, [email protected] wrote:
From: Jin Li <[email protected]>
Check whether sar is available befor run test
This is OK to me.
Thanks,
Wanlong Gao
Quoted 13 lines
Signed-off-by Jin Li <[email protected]>--- testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh | 5 +++++ 1 file changed, 5 insertions(+)testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh +0
-0@@ -27,6 +27,11 @@ Desc: Does sar behave properly during CPU hotplug events?
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh Desc: Does sar behave properly during CPU hotplug events? · line 37
Quoted 10 lines
testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug05.sh +5
-0EOF +which sar > /dev/null 2>&1 || { + tst_resm TCONF "sar does not exist" + exit_clean 1 +} + # Verify the specified CPU is available if ! cpu_is_valid "${CPU_TO_TEST}" ; then tst_resm TBROK"CPU${CPU_TO_TEST} not found"
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Wanlong Gao
AppliedRe: [LTP] [PATCH 3/3] Fix cpuhotplug test case cpuhotplug05
In reply to [email protected]Quoted 3 lines · On 11/12/2012 03:34 PM, [email protected] wrote:
From: Jin Li <[email protected]>
Check whether sar is available befor run test
Applied, thank you.
Wanlong Gao
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list