public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Zhang, Yixin <yixin.zhang@intel.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH LTP] - cpuhotplug06.sh:Add judgment for command "top".
Date: Fri, 19 Jul 2019 18:50:12 +0800	[thread overview]
Message-ID: <20190719105012.GA18145@yixin-dev> (raw)
In-Reply-To: <20190719040655.54345-1-siliangx.yu@intel.com>

Hi Siliang,
There is some issue in your patch:

1. The "top" tool is not 100% located at /usr/bin/, you should use "which" cmd
    to check it
2. [[ -L "/usr/bin/top" ]] does not mean the case should go to TCONF. The real
    logic is the check the realpath of the top tool and check it's name, if the
    real name is not "top" (like "htop" in Clear Liunx case), TCONF the case.
    We don't care if it's a symlink or not, we just care if it's using the
    oringal top or an other top which may not support "top -b".
3. The error log is not correct. Clear Linux use symlink or Clear Liunx use
    "htop" doesn't go to the conclusion that if a distro use symlink or it use
    "htop" or some other "Xtop" so it's Clear Linux. We should not mention a
    specific distro name here. Same for commit message.
4. Take care of white spaces v.s. <tab>

Yixin

On 2019-07-19 at 12:06:55 +0800, Siliang,Yu wrote:
> From: "Yu,Siliang" <siliangx.yu@intel.com>
> 
> Only on clear linux OS,"top" is a link file.
> If it's clear linux,skip the test.
> 
> Signed-off-by: Yu,Siliang <siliangx.yu@intel.com>
> ---
>  .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh     | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh
> index 18a11197e..d5877d085 100755
> --- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh
> @@ -49,6 +49,10 @@ done
>  
>  LOOP_COUNT=1
>  
> +if [[ -L "/usr/bin/top" ]];then
> +        tst_brkm TCONF "Invalid argument on Clear Linux Skip the test..."
> +fi
> +
>  if [ $(get_present_cpus_num) -lt 2 ]; then
>  	tst_brkm TCONF "system doesn't have required CPU hotplug support"
>  fi
> -- 
> 2.22.0
> 

      reply	other threads:[~2019-07-19 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-19  4:06 [LTP] [PATCH LTP] - cpuhotplug06.sh:Add judgment for command "top" Siliang, Yu
2019-07-19 10:50 ` Zhang, Yixin [this message]

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=20190719105012.GA18145@yixin-dev \
    --to=yixin.zhang@intel.com \
    --cc=ltp@lists.linux.it \
    /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