| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 2/2] xfstests: generic/273: do not use /proc/cpuinfo |
| From: | Stanislav Kholmanskikh <stanislav.kholmanskikh@xxxxxxxxxx> |
| Date: | Wed, 23 Oct 2013 15:58:44 +0400 |
| Cc: | vasily.isaenko@xxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1382529524-2184-1-git-send-email-stanislav.kholmanskikh@xxxxxxxxxx> |
| References: | <1382529524-2184-1-git-send-email-stanislav.kholmanskikh@xxxxxxxxxx> |
The content of /proc/cpuinfo file is platform-dependent.
So we can not use it reliably to check a number of available cpus.
It would be better to use sysfs interface, as _no_of_online_cpus() does.
Signed-off-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@xxxxxxxxxx>
---
tests/generic/273 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/generic/273 b/tests/generic/273
index d149808..c028438 100755
--- a/tests/generic/273
+++ b/tests/generic/273
@@ -47,7 +47,7 @@ count=2
_threads_set()
{
- _cpu_num=`cat /proc/cpuinfo | grep "processor" | wc -l`
+ _cpu_num=`_no_of_online_cpus`
threads=$(($_cpu_num * 50))
if [ $threads -gt 200 ]
then
--
1.7.1
|
| Previous by Date: | [PATCH 1/2] xfstests: implemented _no_of_online_cpus() function, Stanislav Kholmanskikh |
|---|---|
| Next by Date: | Avoid of using /proc/cpuinfo in generic tests, Stanislav Kholmanskikh |
| Previous by Thread: | Re: [PATCH] xfstests: src/feature.c: print a number of online CPUs, Carlos Maiolino |
| Next by Thread: | Re: [PATCH 2/2] xfstests: generic/273: do not use /proc/cpuinfo, Carlos Maiolino |
| Indexes: | [Date] [Thread] [Top] [All Lists] |