From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH LTP] -Cpuhotplug06:Skip the test if "htop" is used.
Date: Thu, 25 Jul 2019 22:27:24 +0200 [thread overview]
Message-ID: <20190725202723.GA23767@x230> (raw)
In-Reply-To: <20190724234502.105332-1-siliangx.yu@intel.com>
Hi,
> From: "Yu,Siliang" <siliangx.yu@intel.com>
> In some distro, "htop" is used instead "top", which doesn't support '-b'. Skip the test if "htop" is used.
Could you be more specific (which distro, ...)?
Do you mean binary is top and it's a symlink (or something) to htop?
Trying to detect '>' suggests you target to symlink and the command on linew 76 is top
top -b -d 00.10 > /dev/null 2>&1 &
But in that case it'd be better to parse 'top -v'.
> ---
> .../kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh | 5 +++++
> 1 file changed, 5 insertions(+)
> diff --git a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh
> index 18a11197e..ecf4eedea 100755
> --- a/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh
> +++ b/testcases/kernel/hotplug/cpu_hotplug/functional/cpuhotplug06.sh
> @@ -49,6 +49,11 @@ done
> LOOP_COUNT=1
> +LNTOP=$(ls -l $(which top) | cut -s -d ">" -f2)
> +if [[ -n $LNTOP ]] && [[ $LNTOP != "top" ]] ; then
[[ ]] is a bashism, please use [ ].
https://github.com/linux-test-project/ltp/wiki/Test-Writing-Guidelines#132-shell-coding-style
> + tst_brkm TCONF "Command doesn't support , Skip the test..."
> +fi
> +
> if [ $(get_present_cpus_num) -lt 2 ]; then
> tst_brkm TCONF "system doesn't have required CPU hotplug support"
> fi
Kind regards,
Petr
prev parent reply other threads:[~2019-07-25 20:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-24 23:45 [LTP] [PATCH LTP] -Cpuhotplug06:Skip the test if "htop" is used Siliang, Yu
2019-07-25 2:15 ` Yu, SiliangX
2019-07-25 20:27 ` Petr Vorel [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=20190725202723.GA23767@x230 \
--to=pvorel@suse.cz \
--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