From: Stanislav Kholmanskikh Date: Wed, 23 Oct 2013 11:58:44 +0000 (+0000) Subject: xfstests: generic/273: do not use /proc/cpuinfo X-Git-Tag: v2022.05.01~3336 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fd080d64b6e9677cb9d0a15dc7e308b6ca0e273f;p=xfstests-dev.git xfstests: generic/273: do not use /proc/cpuinfo 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 Reviewed-by: Carlos Maiolino Signed-off-by: Rich Johnston --- diff --git a/tests/generic/273 b/tests/generic/273 index d1498088..c0284383 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