From: Andrew Chen <yanpai.chen@gmail.com>
To: ltp-list@lists.sourceforge.net
Cc: ypchen@faraday-tech.com
Subject: [LTP] [PATCH 3/7] testcases: controllers: fix wrong cpu number calculated
Date: Thu, 30 Jun 2011 14:19:43 +0800 [thread overview]
Message-ID: <1309414787-2022-3-git-send-email-yanpai.chen@gmail.com> (raw)
In-Reply-To: <1309414787-2022-1-git-send-email-yanpai.chen@gmail.com>
From: Andrew Chen <ypchen@faraday-tech.com>
Only "Processor" will be showed up in /proc/cpuinfo for ARM non-SMP CPUs.
Ignore case to fix this issue.
Signed-off-by: Andrew Chen <ypchen@faraday-tech.com>
---
.../kernel/controllers/cpuacct/run_cpuacct_test.sh | 2 +-
.../controllers/cpuctl/run_cpuctl_latency_test.sh | 4 ++--
.../controllers/cpuctl/run_cpuctl_stress_test.sh | 2 +-
.../kernel/controllers/cpuctl/run_cpuctl_test.sh | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ltp-full-20101031/testcases/kernel/controllers/cpuacct/run_cpuacct_test.sh b/ltp-full-20101031/testcases/kernel/controllers/cpuacct/run_cpuacct_test.sh
index 38b2ab6..332a5ae 100755
--- a/ltp-full-20101031/testcases/kernel/controllers/cpuacct/run_cpuacct_test.sh
+++ b/ltp-full-20101031/testcases/kernel/controllers/cpuacct/run_cpuacct_test.sh
@@ -68,7 +68,7 @@ cleanup
mes="CPU Accounting Controller"
cg_path="/dev/cpuacct";
-num_online_cpus=`cat /proc/cpuinfo | grep -w processor | wc -l`
+num_online_cpus=`cat /proc/cpuinfo | grep -w -i processor | wc -l`
#Function to create tasks equal to num_online_cpus.
nr_tasks ()
diff --git a/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_latency_test.sh b/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_latency_test.sh
index 51d6df0..d75d356 100755
--- a/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_latency_test.sh
+++ b/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_latency_test.sh
@@ -99,7 +99,7 @@ calc_allowed_latency()
sys_latency=`cat /proc/sys/kernel/sched_wakeup_granularity_ns`
allowed_latency=`expr $sys_latency / 1000` # in microseconds
else
- num_cpus=`cat /proc/cpuinfo | grep -w processor | wc -l`
+ num_cpus=`cat /proc/cpuinfo | grep -w -i processor | wc -l`
log2 $num_cpus;
ln_num_cpus=$?
ln_num_cpus=`expr $ln_num_cpus + 1`
@@ -170,7 +170,7 @@ PWD=`pwd`
"2") # With group scheduling
echo TINFO "Running cpuctl Latency Test 2"
- NUM_CPUS=`cat /proc/cpuinfo | grep -w processor | wc -l`;
+ NUM_CPUS=`cat /proc/cpuinfo | grep -w -i processor | wc -l`;
get_num_groups; # NUM_GROUPS is set now
do_setup;
diff --git a/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_stress_test.sh b/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_stress_test.sh
index aa5b57d..faf810b 100755
--- a/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_stress_test.sh
+++ b/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_stress_test.sh
@@ -64,7 +64,7 @@ SCRIPT_PID=$$;
FILE="stress-678"; # suffix for results file
TEST_NAME="CPUCTL NUM_GROUPS vs NUM_TASKS TEST:";
-NUM_CPUS=`cat /proc/cpuinfo | grep -w processor | wc -l`
+NUM_CPUS=`cat /proc/cpuinfo | grep -w -i processor | wc -l`
N=$NUM_CPUS; # Default total num of groups (classes)
M=10; # Default total num of tasks in a group
diff --git a/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_test.sh b/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_test.sh
index dd38443..260c97b 100755
--- a/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_test.sh
+++ b/ltp-full-20101031/testcases/kernel/controllers/cpuctl/run_cpuctl_test.sh
@@ -59,7 +59,7 @@ NICEVALUE=-20; # Nice value to renice a task with
SCRIPT_PID=$$;
PWD=`pwd`
cd $LTPROOT/testcases/bin/
-NUM_CPUS=`cat /proc/cpuinfo | grep -w processor | wc -l`
+NUM_CPUS=`cat /proc/cpuinfo | grep -w -i processor | wc -l`
. parameters.sh
--
1.6.5
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2011-06-30 6:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-30 6:19 [LTP] [PATCH 1/7] testcases: fs_bind: fix hanging of testscript Andrew Chen
2011-06-30 6:19 ` [LTP] [PATCH 2/7] testcases: cgroup: correct wrong variable used in the testscript Andrew Chen
2011-07-11 14:45 ` Cyril Hrubis
2011-07-11 16:07 ` Cyril Hrubis
2011-06-30 6:19 ` Andrew Chen [this message]
2011-07-21 16:57 ` [LTP] [PATCH 3/7] testcases: controllers: fix wrong cpu number calculated Cyril Hrubis
2011-06-30 6:19 ` [LTP] [PATCH 4/7] testcases: memcg_function: set hugepage size to zero when no hugepage support Andrew Chen
2011-06-30 6:19 ` [LTP] [PATCH 5/7] runltp: precise pattern matching for skipped testcases Andrew Chen
2011-06-30 6:19 ` [LTP] [PATCH 6/7] runtest/fs: change parameters of growfiles Andrew Chen
2011-07-29 11:45 ` Cyril Hrubis
[not found] ` <CANj_sbC3+eO+6=_S4MO8Wr1o6b7Oo9mbX=EehBFaQb6dj=xOww@mail.gmail.com>
[not found] ` <CAGH67wROk8oOO85TVCZxfNofy2M1NdQXPTkuEHezgUJy8Jx-zw@mail.gmail.com>
2011-08-10 12:12 ` Cyril Hrubis
2011-08-10 12:16 ` Cyril Hrubis
2011-09-08 12:09 ` Cyril Hrubis
[not found] ` <1316411646-1886-1-git-send-email-yanpai.chen@gmail.com>
[not found] ` <CANj_sbD=c+R4YVwqh1tSw-4LanVimNos5rFc0tU872ouCLf-8g@mail.gmail.com>
2011-10-13 14:00 ` [LTP] [PATCH 6/7 V2] " Cyril Hrubis
2011-06-30 6:19 ` [LTP] [PATCH 7/7] testcases: syscalls: close file descriptors before unlinking Andrew Chen
2011-07-11 16:45 ` Cyril Hrubis
2011-07-21 17:01 ` Cyril Hrubis
[not found] ` <CANj_sbBZGdHond=dOHRKtgBrEHYiK8-iQD=hM-iv3ZU1J5_aYQ@mail.gmail.com>
[not found] ` <CANj_sbB1KoHxDCBEnGGX66LihMY-00N+mj+rv-4zPYA7XpkssQ@mail.gmail.com>
[not found] ` <20110727121238.GB20610@saboteur.suse.cz>
[not found] ` <20110728180131.GA3307@saboteur.suse.cz>
[not found] ` <CANj_sbCv=TKkRuaPmfWOBz4qArC1eKEuCoDiMb2oLrWCOf_GWQ@mail.gmail.com>
2011-08-10 12:10 ` Cyril Hrubis
[not found] ` <1316411928-1941-1-git-send-email-yanpai.chen@gmail.com>
2011-10-13 13:45 ` [LTP] [PATCH] testcases: syscalls: use tst_tmpdir() interface Cyril Hrubis
2011-07-21 16:55 ` [LTP] [PATCH 1/7] testcases: fs_bind: fix hanging of testscript Cyril Hrubis
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=1309414787-2022-3-git-send-email-yanpai.chen@gmail.com \
--to=yanpai.chen@gmail.com \
--cc=ltp-list@lists.sourceforge.net \
--cc=ypchen@faraday-tech.com \
/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