All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Li, Jin" <Jin.Li@windriver.com>
To: gaowanlong@cn.fujitsu.com
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 2/3] Fix cpuhotplug test case cpuhotplug03
Date: Wed, 14 Nov 2012 15:23:34 +0800	[thread overview]
Message-ID: <50A346F6.8030305@windriver.com> (raw)
In-Reply-To: <50A34576.9060109@cn.fujitsu.com>



On 11/14/2012 03:17 PM, Wanlong Gao wrote:
> On 11/14/2012 03:01 PM, Li, Jin wrote:
>>
>>
>> On 11/14/2012 02:29 PM, Wanlong Gao wrote:
>>> On 11/12/2012 03:34 PM, jin.li@windriver.com wrote:
>>>> 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"
>>
>> Looks strange. It's just what I fixed.
>>
>> 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

>
> Thanks,
> Wanlong Gao
>
>>
>> Thanks,
>>
>> Jin
>>
>>>
>>> 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
>>>
>>>>            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}"
>>>>
>>>
>>
>

------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2012-11-14  7:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=50A346F6.8030305@windriver.com \
    --to=jin.li@windriver.com \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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 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.