From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] Simplify grep actions in power_management.
Date: Mon, 9 Nov 2015 07:10:45 -0500 (EST) [thread overview]
Message-ID: <1718322603.5529740.1447071045814.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1447056334-28420-1-git-send-email-sunyuan3@huawei.com>
----- Original Message -----
> From: "Yuan Sun" <sunyuan3@huawei.com>
> To: chrubis@suse.cz, jstancek@redhat.com
> Cc: ltp@lists.linux.it
> Sent: Monday, 9 November, 2015 9:05:33 AM
> Subject: [PATCH 1/2] Simplify grep actions in power_management.
>
> Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Both pushed.
Regards,
Jan
> ---
> testcases/kernel/power_management/pm_include.sh | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/testcases/kernel/power_management/pm_include.sh
> b/testcases/kernel/power_management/pm_include.sh
> index 366c914..d06286b 100755
> --- a/testcases/kernel/power_management/pm_include.sh
> +++ b/testcases/kernel/power_management/pm_include.sh
> @@ -87,8 +87,8 @@ get_supporting_govr() {
> }
>
> is_hyper_threaded() {
> - siblings=`cat /proc/cpuinfo | grep siblings | uniq | cut -f2 -d':'`
> - cpu_cores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | cut -f2 -d':'`
> + siblings=`grep siblings /proc/cpuinfo | uniq | cut -f2 -d':'`
> + cpu_cores=`grep "cpu cores" /proc/cpuinfo | uniq | cut -f2 -d':'`
> [ $siblings -gt $cpu_cores ]; echo $?
> }
>
> @@ -131,8 +131,8 @@ is_multi_socket() {
> }
>
> is_multi_core() {
> - siblings=`cat /proc/cpuinfo | grep siblings | uniq | cut -f2 -d':'`
> - cpu_cores=`cat /proc/cpuinfo | grep "cpu cores" | uniq | cut -f2 -d':'`
> + siblings=`grep siblings /proc/cpuinfo | uniq | cut -f2 -d':'`
> + cpu_cores=`grep "cpu cores" /proc/cpuinfo | uniq | cut -f2 -d':'`
> if [ $siblings -eq $cpu_cores ]; then
> [ $cpu_cores -gt 1 ]; echo $?
> else
> @@ -142,8 +142,8 @@ is_multi_core() {
> }
>
> is_dual_core() {
> - siblings=`cat /proc/cpuinfo | grep siblings | uniq | cut -f2 -d':'`
> - cpu_cores=`cat /proc/cpuinfo | grep "cpu cores" | uniq \
> + siblings=`grep siblings /proc/cpuinfo | uniq | cut -f2 -d':'`
> + cpu_cores=`grep "cpu cores" /proc/cpuinfo | uniq \
> | cut -f2 -d':'`
> if [ $siblings -eq $cpu_cores ]; then
> [ $cpu_cores -eq 2 ]; echo $?
> --
> 1.9.1
>
>
prev parent reply other threads:[~2015-11-09 12:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 8:05 [LTP] [PATCH 1/2] Simplify grep actions in power_management Yuan Sun
2015-11-09 8:05 ` [LTP] [PATCH 2/2] Simplify grep actions in cpuset_syscall_test Yuan Sun
2015-11-09 12:10 ` Jan Stancek [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=1718322603.5529740.1447071045814.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.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